You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by mb...@apache.org on 2025/10/16 14:22:29 UTC
(datafusion-comet) branch main updated: docs: Improve documentation layout (#2587)
This is an automated email from the ASF dual-hosted git repository.
mbutrovich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push:
new 1e9ced5ea docs: Improve documentation layout (#2587)
1e9ced5ea is described below
commit 1e9ced5eae0e11be7651a377eaa76415bf72e4a2
Author: Andy Grove <ag...@apache.org>
AuthorDate: Thu Oct 16 08:22:24 2025 -0600
docs: Improve documentation layout (#2587)
---
docs/build.sh | 4 ++--
docs/requirements.txt | 7 ++++---
docs/source/_static/theme_overrides.css | 29 ++++++++++++++++++++++++++++-
docs/source/_templates/docs-sidebar.html | 11 +----------
docs/source/_templates/layout.html | 4 ----
docs/source/conf.py | 16 +++++++++++++++-
docs/source/index.rst | 8 ++++----
7 files changed, 54 insertions(+), 25 deletions(-)
diff --git a/docs/build.sh b/docs/build.sh
index 0a0829c64..8aa8ee559 100755
--- a/docs/build.sh
+++ b/docs/build.sh
@@ -31,7 +31,7 @@ rm -rf comet-0.10
python3 generate-versions.py
# Remove overview pages (this used to be part of the user guide but is now a top level page)
-rm temp/user-guide/0.9/overview.md
-rm temp/user-guide/0.8/overview.md
+rm temp/user-guide/0.9/overview.md 2> /dev/null
+rm temp/user-guide/0.8/overview.md 2> /dev/null
make SOURCEDIR=`pwd`/temp html
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 8d4f26f55..b072757e4 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -15,9 +15,10 @@
# specific language governing permissions and limitations
# under the License.
-sphinx
+setuptools
+sphinx>=7.0,<8.0
sphinx-reredirects
-pydata-sphinx-theme==0.8.0
-myst-parser
+pydata-sphinx-theme>=0.15.0,<0.16.0
+myst-parser>=2.0,<4.0
maturin
jinja2
diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css
index 3b1b86daa..9406e41d0 100644
--- a/docs/source/_static/theme_overrides.css
+++ b/docs/source/_static/theme_overrides.css
@@ -29,9 +29,36 @@
--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;
+ --pst-content-max-width: 100%; /* center column */
+ --pst-font-size-base: 0.9rem;
}
+/* --- remove the right (secondary) sidebar entirely --- */
+.bd-sidebar-secondary { display: none !important; }
+
+/* Some versions still reserve the grid column for it — collapse it */
+.bd-main {
+ /* left sidebar + content only */
+ grid-template-columns: 20rem minmax(0, 1fr) !important;
+}
+
+/* --- make the left (primary) sidebar small --- */
+.bd-sidebar-primary {
+ width: 20rem !important;
+ flex: 0 0 20rem !important;
+}
+
+/* Optional: make its text a bit tighter */
+.bd-sidebar-primary .bd-sidebar {
+ font-size: 0.9rem;
+}
+
+/* --- let the center content use all remaining width --- */
+.bd-content, .bd-article-container {
+ max-width: none !important; /* remove internal cap */
+}
+
+
code {
color: rgb(215, 70, 51);
}
diff --git a/docs/source/_templates/docs-sidebar.html b/docs/source/_templates/docs-sidebar.html
index 0c876a475..3958eb153 100644
--- a/docs/source/_templates/docs-sidebar.html
+++ b/docs/source/_templates/docs-sidebar.html
@@ -17,18 +17,9 @@ specific language governing permissions and limitations
under the License.
-->
-<form class="bd-search d-flex align-items-center" action="{{ pathto('search') }}" method="get">
- <i class="icon fas fa-search"></i>
- <input type="search" class="form-control" name="q" id="search-input" placeholder="{{ theme_search_bar_text }}" aria-label="{{ theme_search_bar_text }}" autocomplete="off" >
-</form>
-
<nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
<div class="bd-toc-item active">
- {% if "python/api" in pagename or "python/generated" in pagename %}
- {{ generate_nav_html("sidebar", startdepth=0, maxdepth=3, collapse=False, includehidden=True, titles_only=True) }}
- {% else %}
- {{ generate_nav_html("sidebar", startdepth=0, maxdepth=4, collapse=False, includehidden=True, titles_only=True) }}
- {% endif %}
+ {{ toctree(maxdepth=4, collapse=True, includehidden=True, titles_only=True) }}
</div>
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html
index 50405cd2d..f90a9e0b5 100644
--- a/docs/source/_templates/layout.html
+++ b/docs/source/_templates/layout.html
@@ -19,10 +19,6 @@ under the License.
{% extends "pydata_sphinx_theme/layout.html" %}
-{# Silence the navbar #}
-{% block docs_navbar %}
-{% endblock %}
-
<!--
Custom footer
-->
diff --git a/docs/source/conf.py b/docs/source/conf.py
index d5b46a092..081cda9ce 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -86,10 +86,24 @@ autosummary_generate = True
html_theme = 'pydata_sphinx_theme'
html_theme_options = {
- "use_edit_page_button": True,
+ "use_edit_page_button": False,
+ "secondary_sidebar_items": [],
+ "collapse_navigation": True,
+ "navbar_start": [],
+ "navbar_center": ["navbar-nav"],
+ "navbar_end": ["navbar-icon-links", "theme-switcher"],
+ "icon_links": [
+ {
+ "name": "GitHub",
+ "url": "https://github.com/apache/datafusion-comet",
+ "icon": "fa-brands fa-github",
+ },
+ ],
+
}
html_context = {
+ "default_mode": "light",
"github_user": "apache",
"github_repo": "datafusion-comet",
"github_version": "main",
diff --git a/docs/source/index.rst b/docs/source/index.rst
index ceafb0084..9d7da1dac 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -49,10 +49,10 @@ as a native runtime to achieve improvement in terms of query efficiency and quer
:caption: User Guides:
:hidden:
- Comet 0.12.0-SNAPSHOT <user-guide/latest/index>
- Comet 0.10.x <user-guide/0.10/index>
- Comet 0.9.x <user-guide/0.9/index>
- Comet 0.8.x <user-guide/0.8/index>
+ 0.12.0-SNAPSHOT <user-guide/latest/index>
+ 0.10.x <user-guide/0.10/index>
+ 0.9.x <user-guide/0.9/index>
+ 0.8.x <user-guide/0.8/index>
.. _toc.contributor-guide-links:
.. toctree::
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org