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

Fix improperly formatted internal deep links; prevent them from happening again. #4902

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

pepopowitz
Copy link
Collaborator

@pepopowitz pepopowitz commented Jan 24, 2025

Description

Discovered in #4872.

  • Adjusts internal deep-links to use a format that works in both docusaurus 2 and 3.
  • Adds a vale rule to prevent these from happening in the future (although once we're on docusaurus 3, the build will just not pass when they're introduced 😅 )

Once this is merged, I'll propagate to my docusaurus 3 branch.

What's wrong with these links?

The links in question are internal, targeting a document via file path including extension...and they include a slash (/) before the hash (#) of the anchor on the target page.

Docusaurus 2 appears to have no problem rendering links with this format. None of the links I've adjusted in this PR seem to be broken in production.

In Docusaurus 3, the engine does not treat these links as internal, and it does not attempt to translate the file path into the corresponding URL. You can see this happening in this build, in my docusaurus 3 working branch.

Both versions of Docusaurus appear to have no problem with the format where the slash is removed. Thus, we can update these links in main now, instead of in the docusaurus 3 branch.

What it looks like when an infraction is introduced

I temporarily added some infractions to this PR, to generate these comments:

image

When should this change go live?

  • This is a bug fix, security concern, or something that needs urgent release support. (add bug or support label)
  • This is already available but undocumented and should be released within a week. (add available & undocumented label)
  • This is on a specific schedule and the assignee will coordinate a release with the DevEx team. (create draft PR and/or add hold label)
  • This is part of a scheduled alpha or minor. (add alpha or minor label)
  • There is no urgency with this change (add low prio label)

PR Checklist

  • My changes are for the next minor and are in /docs directory (aka /next/).
  • My changes are for an already released minor and are in /versioned_docs directory.

Copy link
Contributor

github-actions bot commented Jan 24, 2025

👋 🤖 🤔 Hello, @pepopowitz! Did you make your changes in all the right places?

These files were changed only in docs/. You might want to duplicate these changes in versioned_docs/version-8.6/.

  • docs/components/concepts/job-workers.md
  • docs/components/modeler/web-modeler/deploy-process-application.md
  • docs/components/modeler/web-modeler/run-or-publish-your-process.md
  • docs/self-managed/setup/deploy/amazon/aws-ec2.md

You may have done this intentionally, but we wanted to point it out in case you didn't. You can read more about the versioning within our docs in our documentation guidelines.

@pepopowitz pepopowitz force-pushed the pepopowitz/3736-docusaurus/fix-deep-links branch from 2a41435 to d6b80af Compare January 24, 2025 20:49
@@ -1,5 +1,5 @@
extends: existence
message: "Improper link format: '%s'. Please use relative URLs."
message: "Improper link format: `%s`. Please use relative URLs."
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I noticed that my rule was emitting the links and GitHub was actually processing them as markdown, turning them into a clickable link 😅 That's not what we want, we want to see the source of the link. So I changed all these other rules to do the same.

@pepopowitz pepopowitz added kind/cleanup Issues related with clean-up the documentation dx Documentation infrastructure typically handled by the Camunda DX team labels Jan 24, 2025
@pepopowitz pepopowitz requested review from akeller and a team January 24, 2025 20:52
Copy link
Member

@akeller akeller left a comment

Choose a reason for hiding this comment

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

😍 🤩

Ok, I was creeping on this PR earlier and I LOOOOOVE that we can lint for it! 🙌 Thank you for correcting and linting it. See ya never improperly formatted internal deep links!

@pepopowitz pepopowitz merged commit 0d8ce3c into main Jan 24, 2025
13 checks passed
@pepopowitz pepopowitz deleted the pepopowitz/3736-docusaurus/fix-deep-links branch January 24, 2025 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Documentation infrastructure typically handled by the Camunda DX team kind/cleanup Issues related with clean-up the documentation
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants