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

Added hide_version_dropdown #170

Merged
merged 2 commits into from Jun 3, 2021
Merged

Added hide_version_dropdown #170

merged 2 commits into from Jun 3, 2021

Conversation

dgarcia360
Copy link
Collaborator

@dgarcia360 dgarcia360 commented May 14, 2021

Related issue #157

Adds the new template option hide_version_dropdown, which hides a list of tags and branch names from the multi-version dropdown.

For example, if a docs maintainer wants to build docs for the master branch, but does not want to remove master from the sidebar dropdown, they can define in conf.py:

    html_theme_options = {
        'hide_version_dropdown': ['master'],
    }

Once we release this change, I'll go project by project to make sure they are building docs for the default branch and to set up this new option.

How to test this PR

In conf.py, replace BRANCHES = ['master'] with BRANCHES = ['master', 'new-design'] to build docs for multiple versions.

Then, add the new option hide_version_dropdown': ['new-design'] under html_theme_options. For example:

    html_theme_options = {
        'hide_version_dropdown': ['new-design'],
    }

After running make multiversionpreview, you should see in the dropdown only the option "master", but not "new-design".

@dgarcia360
Copy link
Collaborator Author

@lauranovich I've added instructions on the first message to test the PR.

@lauranovich
Copy link
Contributor

lauranovich commented May 23, 2021

Screenshot_2021-05-23 Contribute to the Theme Scylla Docs
something didn't work in the build

I got the following error:
WARNING: unsupported theme option 'hide_version_dropdown' given. Are you sure this goes in the " html_theme_options"

@dgarcia360
Copy link
Collaborator Author

Yes, hide_version_dropdown goes in html_theme_options.

Please run git log and make sure HEAD points to this commit:

image

If not, please run gh pr checkout 170 to download this PR.

@dgarcia360 dgarcia360 merged commit c60e7e0 into scylladb:master Jun 3, 2021
@dgarcia360 dgarcia360 mentioned this pull request Jun 17, 2021
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.

None yet

2 participants