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

GH-36590: [Docs] Support Pydata Sphinx Theme 0.14.0 #36591

Merged
merged 31 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e9ac3f7
Unpin sphinx theme version
AlenkaF Jun 27, 2023
d8c3a6c
Update layout to use the new pydata theme
AlenkaF Jul 10, 2023
7fc77e2
Put the logo back on the left sidebar, remove jquery install and add …
AlenkaF Jul 11, 2023
a587e90
Increase header hight, remove env-index.rst and use dropdown for lang…
AlenkaF Jul 11, 2023
5f81509
Rever html_theme_options change - show_toc_level
AlenkaF Jul 11, 2023
b419680
Pin to the dev version of the theme, remove custom colors, change pan…
AlenkaF Jul 13, 2023
551da4e
Try to fix spec files error
AlenkaF Jul 13, 2023
ebcfbf6
Move the pip install to the dockerfile
AlenkaF Jul 13, 2023
040d709
Add buttons to link to languages from main landing page and remove se…
AlenkaF Jul 17, 2023
4bc4841
Update colors for svg icons
AlenkaF Jul 17, 2023
d62971c
Change button color and hide TOC on the front page, join dev index pa…
AlenkaF Jul 17, 2023
73ee2ca
Remove headings from front page
AlenkaF Jul 17, 2023
614ea75
Update expected
kou Jul 18, 2023
aa3e5e3
Add more weight to the headings
AlenkaF Aug 18, 2023
5faf286
Remove card shadow
AlenkaF Aug 18, 2023
53abd8c
Let Python Cookbook be visible from the left side menu
AlenkaF Aug 18, 2023
628e36e
Apply suggestions from code review
AlenkaF Aug 31, 2023
fd1363d
Move version warnings to use show_version_warning_banner theme option
AlenkaF Sep 7, 2023
1656b37
Update dev/release/utils-update-docs-versions.py to also include pref…
AlenkaF Sep 7, 2023
5c702db
Fix typo
AlenkaF Sep 7, 2023
d8776f5
Add newline at the end of versions.json
AlenkaF Sep 7, 2023
6711bbf
Redo a change to fix Dev CI errors
AlenkaF Sep 11, 2023
a9107ef
Try to fix dev CI errors with extra change
AlenkaF Sep 11, 2023
e94fdbb
Change grid names and links
AlenkaF Sep 13, 2023
e05eedb
Change implementation buttons from first page back to a list
AlenkaF Sep 13, 2023
803a336
Remove buttons from front page altogether
AlenkaF Sep 13, 2023
0cb970c
Fix typo in Specifications and protocols
AlenkaF Sep 14, 2023
5d66af2
Pin to newer theme dev branch to use header_dropdown_text
AlenkaF Sep 18, 2023
9ad6293
Unpin pydata-sphinx-theme
AlenkaF Sep 19, 2023
689f63b
Link to the official versions.json
AlenkaF Sep 25, 2023
2cdcbd1
Try to fix dev CI error
AlenkaF Sep 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/conda_env_sphinx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ breathe
doxygen
ipython
numpydoc
pydata-sphinx-theme==0.8
AlenkaF marked this conversation as resolved.
Show resolved Hide resolved
pydata-sphinx-theme
sphinx-autobuild
sphinx-design
sphinx-copybutton
Expand Down
3 changes: 2 additions & 1 deletion dev/release/01-prepare-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def test_version_pre_tag
"+ \"name\": \"#{@release_compatible_version} (stable)\",",
"+ {",
"+ \"name\": \"#{@previous_compatible_version}\",",
"+ \"version\": \"#{@previous_compatible_version}/\"",
"+ \"version\": \"#{@previous_compatible_version}/\",",
"+ \"url\": \"https://arrow.apache.org/docs/#{@previous_compatible_version}/\"",
"+ },",
],
],
Expand Down
3 changes: 2 additions & 1 deletion dev/release/post-11-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def test_version_post_tag
"+ \"name\": \"#{@release_compatible_version} (stable)\",",
"+ {",
"+ \"name\": \"#{@previous_compatible_version}\",",
"+ \"version\": \"#{@previous_compatible_version}/\"",
"+ \"version\": \"#{@previous_compatible_version}/\",",
"+ \"url\": \"https://arrow.apache.org/docs/#{@previous_compatible_version}/\"",
"+ },",
],
],
Expand Down
10 changes: 7 additions & 3 deletions dev/release/utils-update-docs-versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@
# Create new versions
new_versions = [
{"name": f"{dev_compatible_version} (dev)",
"version": "dev/"},
"version": "dev",
"url": "https://arrow.apache.org/docs/dev/"},
{"name": f"{stable_compatible_version} (stable)",
"version": ""},
"version": "",
"url": "https://arrow.apache.org/docs/",
"preferred": True},
{"name": previous_compatible_version,
"version": f"{previous_compatible_version}/"},
"version": f"{previous_compatible_version}/",
"url": f"https://arrow.apache.org/docs/{previous_compatible_version}/"},
*old_versions[2:],
]
with open(main_versions_path, 'w') as json_file:
Expand Down
3 changes: 1 addition & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
breathe
ipython
numpydoc
pydata-sphinx-theme==0.8
pydata-sphinx-theme
sphinx-autobuild
sphinx-design
sphinx-copybutton
sphinxcontrib-jquery
sphinx==6.2
pandas
Binary file added docs/source/_static/arrow-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 6 additions & 79 deletions docs/source/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,15 @@
/* Customizing with theme CSS variables */

:root {
--pst-color-active-navigation: 215, 70, 51;
--pst-color-link-hover: 215, 70, 51;
--pst-color-headerlink: 215, 70, 51;
/* Use normal text color (like h3, ..) instead of primary color */
--pst-color-h1: var(--color-text-base);
--pst-color-h2: var(--color-text-base);
/* Use softer blue from bootstrap's default info color */
--pst-color-info: 23, 162, 184;
--pst-header-height: 0px;
}

code {
color: rgb(215, 70, 51);
}

.footer {
text-align: center;
}

/* Ensure the logo is properly displayed */

.navbar-brand {
height: auto;
width: auto;
}

a.navbar-brand img {
height: auto;
width: auto;
max-height: 15vh;
max-width: 100%;
/* Change header hight to make the logo a bit larger */
--pst-header-height: 6rem;
AlenkaF marked this conversation as resolved.
Show resolved Hide resolved
/* Make headings more bold */
--pst-font-weight-heading: 600;
jorisvandenbossche marked this conversation as resolved.
Show resolved Hide resolved
}

/* Contibuting landing page overview cards */

.contrib-card {
background: #fff;
border-radius: 0;
padding: 30px 10px 20px 10px;
margin: 10px 0px;
Expand All @@ -70,12 +42,12 @@ a.navbar-brand img {
.contrib-card .sd-card-img-top {
margin: 2px;
height: 75px;
background: none !important;
}

.contrib-card .sd-card-title {
/* color: rgb(var(--pst-color-h1)) !important; */
color: var(--pst-color-primary);
font-size: var(--pst-font-size-h3);
/* font-weight: bold; */
padding: 1rem 0rem 0.5rem 0rem;
}

Expand Down Expand Up @@ -112,48 +84,3 @@ dl.cpp.enumerator {
p.breathe-sectiondef-title {
margin-top: 1rem;
}

/* Limit the max height of the sidebar navigation section. Because in our
custimized template, there is more content above the navigation, i.e.
larger logo: if we don't decrease the max-height, it will overlap with
the footer.
Details: min(15vh, 110px) for the logo size, 8rem for search box etc*/

@media (min-width:720px) {
@supports (position:-webkit-sticky) or (position:sticky) {
.bd-links {
max-height: calc(100vh - min(15vh, 110px) - 8rem)
}
}
}

/* Styling to get the version dropdown and search box side-by-side on wide screens */

#version-search-wrapper {
width: inherit;
display: flex;
flex-wrap: wrap;
justify-content: left;
align-items: center;
}

#version-button {
padding-left: 0.5rem;
padding-right: 1rem;
}

#search-box {
flex: 1 0 12em;
}

/* Fix table text wrapping in RTD theme,
* see https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
*/

@media screen {
table.docutils td {
/* !important prevents the common CSS stylesheets from overriding
this as on RTD they are loaded after this stylesheet */
white-space: normal !important;
}
}
47 changes: 29 additions & 18 deletions docs/source/_static/versions.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,73 @@
[
{
"name": "14.0 (dev)",
"version": "dev/"
"version": "dev",
"url": "https://arrow.apache.org/docs/dev/"
},
{
"name": "13.0 (stable)",
"version": ""
"version": "",
"url": "https://arrow.apache.org/docs/",
"preferred": true
},
{
"name": "12.0",
"version": "12.0/"
},
{
"name": "12.0",
"version": "12.0/"
"version": "12.0/",
"url": "https://arrow.apache.org/docs/12.0/"
},
{
"name": "11.0",
"version": "11.0/"
"version": "11.0/",
"url": "https://arrow.apache.org/docs/11.0/"
},
{
"name": "10.0",
"version": "10.0/"
"version": "10.0/",
"url": "https://arrow.apache.org/docs/10.0/"
},
{
"name": "9.0",
"version": "9.0/"
"version": "9.0/",
"url": "https://arrow.apache.org/docs/9.0/"
},
{
"name": "8.0",
"version": "8.0/"
"version": "8.0/",
"url": "https://arrow.apache.org/docs/8.0/"
},
{
"name": "7.0",
"version": "7.0/"
"version": "7.0/",
"url": "https://arrow.apache.org/docs/7.0/"
},
{
"name": "6.0",
"version": "6.0/"
"version": "6.0/",
"url": "https://arrow.apache.org/docs/6.0/"
},
{
"name": "5.0",
"version": "5.0/"
"version": "5.0/",
"url": "https://arrow.apache.org/docs/5.0/"
},
{
"name": "4.0",
"version": "4.0/"
"version": "4.0/",
"url": "https://arrow.apache.org/docs/4.0/"
},
{
"name": "3.0",
"version": "3.0/"
"version": "3.0/",
"url": "https://arrow.apache.org/docs/3.0/"
},
{
"name": "2.0",
"version": "2.0/"
"version": "2.0/",
"url": "https://arrow.apache.org/docs/2.0/"
},
{
"name": "1.0",
"version": "1.0/"
"version": "1.0/",
"url": "https://arrow.apache.org/docs/dev/"
}
]
2 changes: 2 additions & 0 deletions docs/source/_static/versionwarning.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

(function() {
// adapted 2022-11 from https://mne.tools/versionwarning.js
// Not used anymore for versions 14.0.0 and higher
// Kept for older docs versions (13.0.0 and lower)
if (location.hostname == 'arrow.apache.org') {
$.getJSON("https://arrow.apache.org/docs/_static/versions.json", function(data){
var latestStable = data[1].name.replace(" (stable)","");
Expand Down
25 changes: 0 additions & 25 deletions docs/source/_templates/docs-sidebar.html

This file was deleted.

10 changes: 0 additions & 10 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,3 @@
</script>
<!-- End Matomo Code -->
{% endblock %}

{# Silence the navbar #}
{% block docs_navbar %}
{% endblock %}

{# Add version warnings #}
{% block footer %}
{{ super() }}
<script type="text/javascript" src="/docs/_static/versionwarning.js"></script>
{% endblock %}
60 changes: 0 additions & 60 deletions docs/source/_templates/version-switcher.html

This file was deleted.

2 changes: 2 additions & 0 deletions docs/source/c_glib/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
.. specific language governing permissions and limitations
.. under the License.
.. _c-glib:

C/GLib docs
===========

Expand Down
Loading