Skip to content

Don't index private pages #2464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2021
Merged

Conversation

jtatum
Copy link
Contributor

@jtatum jtatum commented Sep 12, 2021

Setting the private attribute on pages/posts prevents them from
showing up in Wowchemy search. These pages/posts still appear in
search engines, though. This change instructs search engines to ignore
pages/posts set to private.

Fixes #2444

Documentation

This requires documentation updates as it changes the behavior of the private parameter. I'd propose an MR for this but I can't find the docs on GitHub and there's no edit button on the docs site.

@gcushen
Copy link
Collaborator

gcushen commented Sep 13, 2021

Please also adjust the sitemap template appropriately: https://gohugo.io/templates/sitemap-template/#hugos-sitemapxml

Setting the private attribute on pages/posts prevents them from
showing up in Wowchemy search. These pages/posts still appear in
search engines, though. This change instructs search engines to ignore
pages/posts set to private.

Fixes HugoBlox#2444
@jtatum jtatum force-pushed the noindex-private-pages branch from 925d2d4 to 4fd1f97 Compare September 19, 2021 21:46
@jtatum
Copy link
Contributor Author

jtatum commented Sep 19, 2021

Please also adjust the sitemap template appropriately: https://gohugo.io/templates/sitemap-template/#hugos-sitemapxml

Done! I used a copy from Hugo's repo - the sitemap in the docs is a little old.

@gcushen gcushen merged commit c7616ab into HugoBlox:main Sep 20, 2021
@gcushen gcushen mentioned this pull request Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclude private pages from sitemap (and add noindex meta?)
2 participants