Replies: 3 comments 2 replies
-
Apparently jekyll-sitemap already does what you want :) https://github.com/jekyll/jekyll-sitemap#exclusions Edit: you could also generate a robots.txt file that disallows indexing this page with a "query" like this |
Beta Was this translation helpful? Give feedback.
-
But `sitemap: false` is a variable in each post, if you mean you already
have a variable and it's not called `sitemap`, you can also write a hook
to modify each post's data.
|
Beta Was this translation helpful? Give feedback.
-
@splotsh If you have a |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a large number of pages (1000+), and I'm trying to prevent some of these pages from being indexed by Google as they are mostly empty. Using jekyll-sitemap I was hoping there would be a way I could change/use a variable in frontmatter of all my pages that would set "sitemap:" to true or false depending on some logic I have in my page content.
I've looked at jekyll-liquify to see if it could solve my problem by allowing me to use variables in frontmatter, but the way this plugin does that is not sufficient for me. I'm happy to customize jekyll-sitemap if someone can think of a solution here.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions