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

docs, mkdocs: fix domain, title caps #15

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

woodruffw
Copy link
Member

Fixes the sentence-casing of domains (and some small title inconsistencies) by adding an explicit nav hierarchy.

Downside: requires files to be tracked in the nav hierarchy as well before they get rendered. This downside is shared by the PyPI user + dev docs currently, and is a known limitation of mkdocs.

Before:

Screenshot 2024-07-02 at 4 49 28 PM

After:

Screenshot 2024-07-02 at 4 49 47 PM

CC @miketheman, who made me see these and activated my compulsion to fix them 🙂

Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw
Copy link
Member Author

(NB: I've also made an effort to retain the same nav order that mkdocs was already rendering the hierarchy with.)

Copy link
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

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

I'm generally fine with this - as it does make it explicit and allows us to control the order.

@ewdurbin any objections?

# Terms of use
# Terms of Use
Copy link
Member

Choose a reason for hiding this comment

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

Note: if the case here changes, we'll need an update over here:
https://github.com/pypi/warehouse/blob/83b0c6de32c174208f3a65c061bd8fcc8983213c/warehouse/routes.py#L62
(and associated test case) as mkdocs/rtd are case sensitive.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, I'll make a PR there as well!

Copy link
Member Author

Choose a reason for hiding this comment

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

Signed-off-by: William Woodruff <william@trailofbits.com>
@ewdurbin
Copy link
Member

ewdurbin commented Jul 2, 2024

maybe add a note to README "how to add a page to nav"?

Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw
Copy link
Member Author

maybe add a note to README "how to add a page to nav"?

Done with 934e64e!

@ewdurbin ewdurbin merged commit 42fe963 into psf:main Jul 2, 2024
1 check passed
@woodruffw woodruffw deleted the ww/fix-caps branch July 2, 2024 21:15
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.

3 participants