Markdown nofollow recipes Eleventy
Add rel="nofollow" to one link in Eleventy Markdown
Write the link as an inline <a> tag with rel="nofollow".
Eleventy sets markdown-it's html option to true, so the tag reaches
the built page.
- Eleventy 3.1.8
- markdown-it 14.3.3
- Node.js 24.1.0
- Built on 10 November 2026
Write the link, then build
Put the tag in the sentence where the link belongs. Eleventy runs .md files
through Liquid first by default; that step left the tag alone in the test.
You write
blog/retry-failed-jobs.md Record the job ID, attempt number and error. Keep the entries consistent. Logsift's <a href="https://logsift.example/guides/job-logs" rel="nofollow">guide to structured job logs</a> shows a format you can search later.
The build wrote
_site/blog/retry-failed-jobs/index.html <p>Record the job ID, attempt number and error. Keep the entries consistent. Logsift's <a href="https://logsift.example/guides/job-logs" rel="nofollow">guide to structured job logs</a> shows a format you can search later.</p>
Eleventy kept the straight apostrophe and the link attributes as written.
For comparison, the same page has a plain Markdown link to the same guide. The build wrote it like this:
_site/blog/retry-failed-jobs/index.html <p>Plain Markdown link: <a href="https://logsift.example/guides/job-logs">guide to structured job logs</a>.</p>
Markdown link syntax, [text](url), has nowhere to put a rel, so
the plain link has none.
Gotcha
A replaced markdown-it library escapes the tag
Eleventy's docs list html: true as an Eleventy default; markdown-it's own
default is false. When the config replaces the library with
markdownIt() and no options, the tag is escaped and shows up on the page as
text.
Passing markdownIt({ html: true }) brought the link back in the same test. To
add plugins, Eleventy's docs use amendLibrary, which changes Eleventy's own
instance instead of replacing it.
You write
eleventy.config.js import markdownIt from "markdown-it";
export default function (eleventyConfig) {
eleventyConfig.setLibrary("md", markdownIt());
}The build wrote
_site/blog/retry-failed-jobs/index.html <p>Record the job ID, attempt number and error. Keep the entries consistent. Logsift's <a href="https://logsift.example/guides/job-logs" rel="nofollow">guide to structured job logs</a> shows a format you can search later.</p>
Check the built page before you merge
Run this against the built file. The output below is what the command printed for the test project.
The command prints two tags: the inline link with rel="nofollow", then the
plain Markdown link.
To see every outside link on a page with its anchor text and rel value, paste
the built file into the built HTML link audit. It runs in your
browser and uploads nothing.
grep -o '<a [^>]*logsift[^>]*>' _site/blog/retry-failed-jobs/index.html
<a href="https://logsift.example/guides/job-logs" rel="nofollow"> <a href="https://logsift.example/guides/job-logs">
Sources and what was tested
The test project is one Markdown page with one paragraph, built locally with the versions listed at the top. Every HTML excerpt on this page is copied from that build without edits. Other versions, and plugins that rewrite links, can build different HTML, so check your own output.
Using another generator? See all six recipes.
Next steps with LinkBunny
Placing a LinkBunny exchange link?
LinkBunny exchange links must use nofollow. Your coding agent can follow this
recipe when it places one, and the first exchange is free for one site.
After the deploy, check the live page
LinkBunny's nofollow link checker fetches a public page and lists each link on it with its
rel value, so you can confirm the link survived the deploy.