camunda / camunda-docs

Camunda 8 Documentation, including all components and features
https://docs.camunda.io/
Other
54 stars 186 forks source link

Prevent linking to double-slash URLs #3003

Open pepopowitz opened 11 months ago

pepopowitz commented 11 months ago

As discussed in https://camunda.slack.com/archives/C026U8GBNSW/p1701965858544789?thread_ts=1701820206.124229&cid=C026U8GBNSW, linking to a URL like /path/file.md/#anchor, with a / between .md and #, results in a URL with a double-slash. This results in a 404 when clicking that link, and it also causes Algolia to create invalid search results (containing a double-slash in the URL).

Ideally, these links would cause a broken build. I'm not sure why they aren't caught by the link-checking of Docusaurus or hyperlink.

We can utilize our Vale linting rules to fail the build when links are formatted this way.

### Tasks
- [ ] #3004
- [ ] Update documentation-guidelines.md to call out `.md/#` as an incorrect practice
- [ ] Update the vale linting rules to err when this incorrect format is detected
- [ ] Correct any instances that were re-introduced before the linting was added
akeller commented 11 months ago

Option - partner with Christina on writing the docs-on-docs.