noindex a specific post or page?
Is there a way to add <meta name="robots" content="noindex" />
to an individual markdown page? Presumably if I put the HTML tag in the markdown it'll appear within <body></body>
and so will be noncompliant with the HTML specification. Thanks!
Yes! You'll need to edit your template and add some custom metadata to posts you want noindexed, for example:
noindex: yes
Then add the following to your template's <head> tag, usually in the head.html file:
{{#entry.metadata.noindex}}
<meta>...</meta>
{{/entry.metadata.noindex}}
Please let me know if you have any questions about this or anything else.
Answered 3 years ago · Edit answerThanks — this is really helpful. Didn't realise you'd replied, otherwise I'd have acknowledged it sooner.
Answered 3 years ago · Edit answer