Skip to content

Commit

Permalink
fix all occurrences of uppercase links in markdown (ParadiseSS13#26684)
Browse files Browse the repository at this point in the history
  • Loading branch information
warriorstar-orion authored Sep 4, 2024
1 parent 641069e commit ef10113
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/hooks/contributing_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
collisions in this case, because the URL looks nicer.
"""

import re

transforms = {
"CONTRIBUTING": "contributing",
"CODE_OF_CONDUCT": "code_of_conduct",
Expand All @@ -34,3 +36,11 @@ def on_page_markdown(markdown, *, page, config, files):
page.file.url = page.file.url.replace(old, new)
page.file.dest_uri = page.file.dest_uri.replace(old, new)
page.file.abs_dest_path = page.file.abs_dest_path.replace(old, new)

# Can't just replace filename and keep extension,
# mkdocs will get upset it can't find a file with
# that exact name. So we just give it a URL and it
# complains, but ignores it and chugs along.
markdown = re.sub(f"\.+/{old}.md", f"/{new}/", markdown)

return markdown
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ necessary to get started making contributions to Paradise Station.

## Required Reading

All contributors are expected to read and abide by the Paradise Station [Code of
Conduct](./CODE_OF_CONDUCT.md) and [Contribution Guidelines](./CONTRIBUTING.md).
All contributors are expected to read and abide by the Paradise Station [Code of Conduct](./CODE_OF_CONDUCT.md) and
[Contribution Guidelines](./CONTRIBUTING.md).

## New Contributors

Expand Down

0 comments on commit ef10113

Please sign in to comment.