Postex.Validate (Postex v0.1.6) 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
Specs
no_duplicate_slugs([Postex.Post.t()]) :: [Postex.Post.t()]
Raises if there are any duplicate slugs
Specs
prefix_defined(binary() | nil) :: :ok
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
Specs
same_data_fields([Postex.Post.t()]) :: [Postex.Post.t()]
Specs
url_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