How can I prefix relative links defined in markdown documents when I run eleventy to build static pages from my markdown and templates.
I use ./docs as the output directory to build the documentation pages from markdown documents and a html template in the ./eleventy directory of my project.
npx eleventy --input ./eleventy --output ./docs --formats=md
How could I prefix all the relative links with /foo ?
I had a look at url filter and the pathprefix option for the build command but I don't get it.
Where would I set the url filter? In the markdown? In the eleventy config?
You can pass this as an environment variable, and then create a template function which you use in your templates.
.eleventy.js
: