-
Notifications
You must be signed in to change notification settings - Fork 342
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
Only include latest version of docs in sitemap #1319
Only include latest version of docs in sitemap #1319
Conversation
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
✅ Deploy Preview for cert-manager-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Tim.
richard@LAPTOP-HJEQ9V9G:~/projects/cert-manager/website$ curl -sSL https://deploy-preview-1319--cert-manager-website.netlify.app/sitemap-0.xml | wc -l
175
richard@LAPTOP-HJEQ9V9G:~/projects/cert-manager/website$ curl -sSL https://cert-manager.io/sitemap-0.xml | wc -l
1158
$ diff -u <(curl -sSL https://cert-manager.io/sitemap-0.xml | grep -o -P 'https://[^<]+') <(curl -sSL https://deploy-preview-1319--cert-manager-website.netlify.app/sitemap-0.xml | grep -o -P 'https://[^<]+')
...
-https://cert-manager.io/v1.9-docs/cli/
-https://cert-manager.io/v1.9-docs/cli/acmesolver/
-https://cert-manager.io/v1.9-docs/cli/cainjector/
-https://cert-manager.io/v1.9-docs/cli/cmctl/
-https://cert-manager.io/v1.9-docs/cli/controller/
-https://cert-manager.io/v1.9-docs/cli/webhook/
-https://cert-manager.io/v1.9-docs/reference/api-docs/
Looks right to me.
Another additional thing we could do in another PR is to configure netlify to add a no-index header to those pages. Similar to what we do to prevent the preview sites being indexed.
Lines 16 to 20 in 2ff494e
# Prevent search engines from indexing preview sites for branch deploys. See | |
# - https://docs.netlify.com/routing/headers/#custom-headers-for-different-branch-or-deploy-contexts | |
# - https://developers.google.com/search/docs/crawling-indexing/block-indexing | |
[context.branch-deploy] | |
command = "./scripts/build-release && cp ./custom-headers/branch-deploy-site-headers ./out/_headers" |
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wallrj The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The current sitemap contains
/vX.Y-docs/...
pages: https://cert-manager.io/sitemap-0.xmlThis PR removes all those docs from the sitemap.
This way, Google will hopefully only show the latest docs.