Creates an instance of url to and calls super
so YassbBaseDirective assigns the args to the protected properties. Because the name of the js file is known, the only value actually used is fileContents
.
The absolute url to the page to be used in links.
Anchors found in the fragment url as separated by the symbol #
.
Full config options
Directive full string found in the file
File contents there the yassb directive was found
Full path to the file being processed
The full path found in the sitemap.
Url fragment in kebab case (kebab-case) to more easily match filenames.
Lang being processed
The sitemap used to match the url fragment.
Url fragment in snake case (kebab_case) to more easily match filenames.
Url fragment passed to the variable. It can be the full url or just few characters.
Regex to match the comments to invoke the directive.
On error removes the directive from the fileContents to avoid issues.
text of the error to be displayed in console.
the fileContent cleaned from the directiveFullString
.
Looks for the url fragment in the sitemap. If multiple results are found selects the first. If nothing is found it returns without setting the value of foundUrl
.
Inits url to. Aborts if no URL fragment is passed to the directive or if there is no url matching the url fragment.
init
Sets the absolute url to be used as a link.
If the URL fragment had anchors these are readded to the final URL.
Sets the URL fragment in kebab case
Loads the sitemap
Sets the URL fragment in snake case
Sets the url fragment by invoking DirectivePropsGetter
. Aborts if no URL was found.
Options for url-to. Warning: deafult true. If false, the warning of multiple matches is suppressed.
Creates a full URL from a URL fragment by matching the values in the sitemap. If multiple values are found, the closet one is selected.