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

Update cockroachcloud/ links in Cloud 2.0 to use Liquid syntax #18846

Merged
merged 6 commits into from
Aug 23, 2024

Conversation

mdlinville
Copy link
Contributor

@mdlinville mdlinville commented Aug 21, 2024

Update cockroachcloud/ links in Cloud 2.0 to use Liquid syntax

Relates to DOC-10953
Relates to #18844

What I did:

  1. Fix links without anchors:
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)\)}{({% link cockroachcloud/$1.md %})}g' cockroachcloud/*.md _includes/cockroachcloud/*.md
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)\)}{({% link cockroachcloud/$1.md %})}g' v24.2/*.md _includes/v24.2/*.md
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)\)}{({% link cockroachcloud/$1.md %})}g' v24.1/*.md _includes/v24.1/*.md
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)\)}{({% link cockroachcloud/$1.md %})}g' v23.2/*.md _includes/v23.2/*.md
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)\)}{({% link cockroachcloud/$1.md %})}g' v23.1/*.md _includes/v23.1/*.md
    
  2. Fix links with anchors:
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)#([a-z\-0-9]+)\)}{({% link cockroachcloud/$1.md %}#$2)}g' cockroachcloud/*.md _includes/cockroachcloud/*.md
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)#([a-z\-0-9]+)\)}{({% link cockroachcloud/$1.md %}#$2)}g' v24.2/*.md _includes/v24.2/*.md
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)#([a-z\-0-9]+)\)}{({% link cockroachcloud/$1.md %}#$2)}g' v24.1/*.md _includes/v24.1/*.md
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)#([a-z\-0-9]+)\)}{({% link cockroachcloud/$1.md %}#$2)}g' v23.2/*.md _includes/v23.2/*.md
    perl -p -i -e 's{\(https://www.cockroachlabs.com/docs/cockroachcloud/([a-z\-]+)#([a-z\-0-9]+)\)}{({% link cockroachcloud/$1.md %}#$2)}g' v23.1/*.md _includes/v23.1/*.md
    
  3. Manually fix links that now break because they are Markdown links and not fully-qualified <a> links, which our link checker ignores.
  4. Manually fix other links in a few separate commits, in one case by adding a file and updating a filter-tabset.
  5. Built locally (no errors).
  6. Ran make linkcheck locally (no errors for real this time).

@mdlinville mdlinville changed the base branch from main to cloud-2.0 August 21, 2024 19:42
Copy link

netlify bot commented Aug 21, 2024

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 110a7c0
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/66c6433118d4910008b9ace8

Copy link

netlify bot commented Aug 21, 2024

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 110a7c0
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/66c64331abe7e5000854fba7

Copy link

netlify bot commented Aug 21, 2024

Netlify Preview

Name Link
🔨 Latest commit 285c0f7
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/66c8e94be01e0b0008de0fc3
😎 Deploy Preview https://deploy-preview-18846--cockroachdb-docs.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.

@rmloveland
Copy link
Contributor

There are broken anchor links (check the deploy preview - screenshot below)

This happened on a smaller scale with #18844

The anchor links were always broken, they just weren't being checked before

Screenshot 2024-08-21 at 3 54 35 PM

Copy link

github-actions bot commented Aug 21, 2024

Files changed:

Copy link
Contributor

@rmloveland rmloveland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looked at about 40 file diffs with my eyes and since the transformation is largely mechanical and the build is green (i.e., no broken links), I'm good with this!

@mdlinville mdlinville merged commit 1a21e62 into cloud-2.0 Aug 23, 2024
3 of 4 checks passed
@mdlinville mdlinville deleted the markdown_links_cloud-20 branch August 23, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants