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

feat: Version switcher #875

Merged

Conversation

michael-wisely-gravwell
Copy link
Contributor

@michael-wisely-gravwell michael-wisely-gravwell commented Jan 9, 2024

This PR partially addresses #838

This PR proposes adding a version switcher to the docs navbar

image

Couple notes:

  1. We're not currently serving the versions.json file at docs.gravwell.io. As such, when you build with make clean livehtml, you'll see something like this instead of a nice version switcher. You can fake it with the following patch:
    diff --git a/conf.py b/conf.py
    index 40ac78d..321d225 100644
    --- a/conf.py
    +++ b/conf.py
    @@ -96,7 +96,7 @@ html_theme_options = {
         # Version switcher
         #
         "switcher": {
    -        "json_url": "https://docs.gravwell.io/_static/versions.json",
    +        "json_url": "http://localhost:8000/_static/versions.json",
             # The `version` field of each entry in verions.json must match a vN.N.N release  name
             "version_match": release,
         },
  2. Maybe it's just me, but the gravwell logo looks vertically misaligned? Like the center-of-mass is too high or something

    image

@michael-wisely-gravwell michael-wisely-gravwell changed the base branch from master to release/v5.4.3 January 9, 2024 21:31
@ashnwade
Copy link
Collaborator

ashnwade commented Jan 9, 2024

regarding 2, I think that you would like the alignment better if the bottom of "ravwell" was aligned with the bottom of the version switcher box ("g" has the tail going below the line - the line is not visible, but your mind is putting it there), but then the menu header at the top would probably need to be taller so that the "g" isn't outside of the header.

@ashnwade ashnwade self-requested a review January 10, 2024 18:06
Copy link
Collaborator

@ashnwade ashnwade left a comment

Choose a reason for hiding this comment

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

LGTM

@ashnwade ashnwade merged commit 2fe83f6 into gravwell:release/v5.4.3 Jan 10, 2024
@michael-wisely-gravwell michael-wisely-gravwell deleted the version-switcher branch January 26, 2024 22:28
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