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

WEB: Unpin pydata sphinx theme #48285

Merged
merged 11 commits into from Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/_templates/sidebar-nav-bs.html
@@ -1,9 +1,9 @@
<nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
<div class="bd-toc-item active">
{% if pagename.startswith("reference") %}
{{ generate_nav_html("sidebar", maxdepth=4, collapse=True, includehidden=True, titles_only=True) }}
{{ generate_toctree_html("sidebar", maxdepth=4, collapse=True, includehidden=True, titles_only=True) }}
{% else %}
{{ generate_nav_html("sidebar", maxdepth=4, collapse=False, includehidden=True, titles_only=True) }}
{{ generate_toctree_html("sidebar", maxdepth=4, collapse=False, includehidden=True, titles_only=True) }}
{% endif %}
</div>
</nav>
1 change: 0 additions & 1 deletion doc/source/conf.py
Expand Up @@ -245,7 +245,6 @@
"navbar_end": ["version-switcher", "navbar-icon-links"],
"switcher": {
"json_url": "https://pandas.pydata.org/versions.json",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"json_url": "https://pandas.pydata.org/versions.json",
"json_url": "/versions.json",

If you want to make this relative too, otherwise when testing the website locally, the version switcher fails due to a CORS error.

Copy link
Member Author

Choose a reason for hiding this comment

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

Would you mind adding the dark theme logo? Not really sure where to change the logo based on the theme

"url_template": "https://pandas.pydata.org/{version}/",
"version_match": switcher_version,
},
}
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Expand Up @@ -100,7 +100,7 @@ dependencies:
- natsort # DataFrame.sort_values doctest
- numpydoc
- pandas-dev-flaker=0.5.0
- pydata-sphinx-theme=0.8.0
- pydata-sphinx-theme
- pytest-cython # doctest
- sphinx
- sphinx-panels
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Expand Up @@ -77,7 +77,7 @@ gitdb
natsort
numpydoc
pandas-dev-flaker==0.5.0
pydata-sphinx-theme==0.8.0
pydata-sphinx-theme
pytest-cython
sphinx
sphinx-panels
Expand Down
21 changes: 14 additions & 7 deletions web/pandas/versions.json
@@ -1,30 +1,37 @@
[
{
"name": "dev",
"version": "docs/dev"
"version": "dev",
"url": "https://pandas.pydata.org/docs/dev/index.html"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"url": "https://pandas.pydata.org/docs/dev/index.html"
"url": "/docs/dev/"

Those are the links I was referring to. I think this should still work,without the index.html also if I'm not missing anything. And I think by not having the domain, the website/docs are more portable (if you set up things locally or in a dev server for tests for example, navigation wouldn't take you to the prod server, and would stay in the same website you started).

But no big deal, happy to merge this as is too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah sorry, I changed them locally but I must have edited a non git file.

This is what I wanted to use too, will push an update soon

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

},
{
"name": "1.4 (stable)",
"version": "docs"
"version": "1.4 (stable)",
"url": "https://pandas.pydata.org/docs/index.html"
},
{
"name": "1.4",
"version": "pandas-docs/version/1.4"
"version": "1.4",
"url": "https://pandas.pydata.org/pandas-docs/version/1.4/index.html"
},
{
"name": "1.3",
"version": "pandas-docs/version/1.3"
"version": "1.3",
"url": "https://pandas.pydata.org/pandas-docs/version/1.3/index.html"
},
{
"name": "1.2",
"version": "pandas-docs/version/1.2"
"version": "1.2",
"url": "https://pandas.pydata.org/pandas-docs/version/1.2/index.html"
},
{
"name": "1.1",
"version": "pandas-docs/version/1.1"
"version": "1.1",
"url": "https://pandas.pydata.org/pandas-docs/version/1.1/index.html"
},
{
"name": "1.0",
"version": "pandas-docs/version/1.0"
"version": "1.0",
"url": "https://pandas.pydata.org/pandas-docs/version/1.0/index.html"
}
]