Postex v0.1.2 Postex.Validate View Source
For validating at compile time
Link to this section Summary
Functions
Raises if there are any duplicate slugs
Raises unless the prefix is set for the use Macro, i.e.
Raises unless all urls (prefix + slug) are less than 60 characters (for SEO) as per Neil Patel.
Link to this section Functions
Link to this function
no_duplicate_slugs(posts)
View Sourceno_duplicate_slugs([Postex.Post.t()]) :: [Postex.Post.t()]
Raises if there are any duplicate slugs
Raises unless the prefix is set for the use Macro, i.e.
use Postex, prefix: "https://www.yoursite.com/posts/"
or is explicitly disabled, i.e.
use Postex, prefix: false
Link to this function
same_data_fields(posts)
View Sourcesame_data_fields([Postex.Post.t()]) :: [Postex.Post.t()]
Link to this function
url_length(posts, prefix)
View Sourceurl_length([Postex.Post.t()], false | binary()) :: [Postex.Post.t()]
Raises unless all urls (prefix + slug) are less than 60 characters (for SEO) as per Neil Patel.
Feature can be disabled by setting prefix to false