You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure whether there's a natural way for it to play nicely with eleventy's global path prefix.
The path prefix mechanism prepends something to all URLs in case your website doesn't start at /. E.g., building with eleventy --pathprefix 'website-3' would produce URLs that start with /website-3/.
When I build with a --pathprefix, then link_to still produces URLs without the prefix.
I thought to pipe them through eleventy's filter for adding path prefixes, url, like so:
{%link_to"/posts/paralysis/" | url%}
This produces the correct URL, but I get an error in the build log that link_to is looking for the new path, and couldn't find it:
[link_to] Couldn't find any content with slug '/website-3/posts/paralysis/'
I'm not sure whether there is a workaround, or whether the plugin would require changes to support the path prefix?
Many thanks for your time!
The text was updated successfully, but these errors were encountered:
That's a great question. Haven't touched plugin code so I hadn't even considered that it might be awkward to plumb through, but looking now I see the plugin doesn't refer to anything eleventy! From the docs it looks like this is a top-level config option, so we'd need access to the eleventy config object somehow?
Hi there,
Thank you for writing this plugin!
I'm not sure whether there's a natural way for it to play nicely with eleventy's global path prefix.
The path prefix mechanism prepends something to all URLs in case your website doesn't start at
/. E.g., building witheleventy --pathprefix 'website-3'would produce URLs that start with/website-3/.When I build with a
--pathprefix, thenlink_tostill produces URLs without the prefix.I thought to pipe them through eleventy's filter for adding path prefixes,
url, like so:This produces the correct URL, but I get an error in the build log that
link_tois looking for the new path, and couldn't find it:I'm not sure whether there is a workaround, or whether the plugin would require changes to support the path prefix?
Many thanks for your time!
The text was updated successfully, but these errors were encountered: