Skip to content
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

Merged

Conversation

inteon
Copy link
Member

@inteon inteon commented Oct 5, 2023

The current sitemap contains /vX.Y-docs/... pages: https://cert-manager.io/sitemap-0.xml

This PR removes all those docs from the sitemap.
This way, Google will hopefully only show the latest docs.

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 5, 2023
@netlify
Copy link

netlify bot commented Oct 5, 2023

Deploy Preview for cert-manager-website ready!

Name Link
🔨 Latest commit 70f72c0
🔍 Latest deploy log https://app.netlify.com/sites/cert-manager-website/deploys/651ea8005f4adb000813e4ba
😎 Deploy Preview https://deploy-preview-1319--cert-manager-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@wallrj wallrj left a 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.

website/netlify.toml

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

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 6, 2023
@jetstack-bot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 6, 2023
@jetstack-bot jetstack-bot merged commit 9cbf1cb into cert-manager:master Oct 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants