Skip to content

Commit 155f074

Browse files
committed
left nav TOC reduced only have page titles
1 parent dd1b03f commit 155f074

4 files changed

Lines changed: 27 additions & 26 deletions

File tree

CHANGES.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ CHANGES
66
Unreleased
77
----------
88

9+
- CrateDB Cloud: Removed special handling for the ``feature/index`` page as it
10+
no longer exists.
11+
- Updated left navbar TOC to only show titles of pages, but not "subsections" or
12+
headings within the page itself. That is already done by the right-hand TOC sidebar.
13+
914
2025/06/11 0.38.6
1015
-----------------
1116
- Fixed favicon HTML. Thanks, @michaelkremmel.
@@ -178,7 +183,7 @@ Thanks, @msbt.
178183
- Removed legacy ``.woff`` font-files
179184
- Update SQL-99 config (``html_baseurl``, ``url_path``
180185
and ``canonical_url_path``)
181-
- Removed ``webflow.js``, artifacts from the abandoned
186+
- Removed ``webflow.js``, artifacts from the abandoned
182187
feedback box and rating system, removed unused css
183188
- Added "Guides and Tutorials" section
184189

src/crate/theme/rtd/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import os
2525

26-
VERSION = (0, 38, 6)
26+
VERSION = (0, 38, 7)
2727

2828
__version__ = ".".join(str(v) for v in VERSION)
2929
__version_full__ = __version__

src/crate/theme/rtd/crate/base.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,29 @@
3535

3636
{# Favicon #}
3737
<link rel="icon" type="image/png" href="{{ pathto('_static', 1) }}/images/favicon.png"/>
38-
38+
3939
{%- endblock site_meta -%}
4040

4141
{% block head_extra %}
4242
<!-- Algolia DNS Prefetch -->
4343
<link rel="preconnect" href="https://az1nev7cg0-dsn.algolia.net" crossorigin />
4444
<!-- Algolia stylesheet -->
4545
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" />
46-
46+
4747
<!-- Google Tag Manager -->
4848
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
4949
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
5050
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
5151
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5252
})(window,document,'script','dataLayer','GTM-WHMDSK');</script>
5353
<!-- End Google Tag Manager -->
54-
54+
5555
<noscript>
5656
<style>
5757
.cr-nojs-hide { display: none; }
5858
</style>
5959
</noscript>
60-
60+
6161
{%- if custom_baseurl %}
6262
{%- set canonical_page = pagename + ".html" %}
6363
<!--
@@ -138,7 +138,7 @@
138138
<div class="content-wrapper container">
139139
<div class="row">
140140
<div class="col-md-3">
141-
<h4>Subscribe to the CrateDB Newsletter now</h4>
141+
<h4>Subscribe to the CrateDB Newsletter</h4>
142142
</div>
143143
<div class="col-md-9">
144144
<div class="footer-subs-form">

src/crate/theme/rtd/crate/sidebartoc.html

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@
2727
{% if project == 'CrateDB Cloud' %}
2828
<li class="current">
2929
<a class="current-active" href="{{ pathto(master_doc) }}">CrateDB Cloud</a>
30-
{% if pagename == 'feature/index' %}
31-
{{ toctree(maxdepth=0|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
32-
{% else %}
33-
{{ toctree(maxdepth=4|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
34-
{% endif %}
30+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
3531
</li>
3632
{% else %}
3733
<li class="navleft-item"><a href="/docs/cloud/">CrateDB Cloud</a></li>
@@ -40,7 +36,7 @@
4036
{% if project == 'CrateDB: Guide' and pagename != 'home/index' %}
4137
<li class="current">
4238
<a class="current-active" href="{{ pathto(master_doc) }}">Guides and Tutorials</a>
43-
{{ toctree(maxdepth=4|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
39+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
4440
</li>
4541
{% else %}
4642
<li class="navleft-item"><a href="/docs/guide/">Guides and Tutorials</a></li>
@@ -49,7 +45,7 @@
4945
{% if project == 'CrateDB: Reference' %}
5046
<li class="current">
5147
<a class="current-active" href="{{ pathto(master_doc) }}">Reference Manual</a>
52-
{{ toctree(maxdepth=3|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
48+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
5349
</li>
5450
{% else %}
5551
<li class="navleft-item"><a href="/docs/crate/reference/">Reference Manual</a></li>
@@ -60,7 +56,7 @@
6056
{% if project == 'CrateDB: Admin UI' %}
6157
<li class="current border-top">
6258
<a class="current-active" href="{{ pathto(master_doc) }}">Admin UI</a>
63-
{{ toctree(maxdepth=1|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
59+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
6460
</li>
6561
{% else %}
6662
<li class="navleft-item border-top"><a href="/docs/crate/admin-ui/">Admin UI</a></li>
@@ -69,7 +65,7 @@
6965
{% if project == 'CrateDB: Crash CLI' %}
7066
<li class="current">
7167
<a class="current-active" href="{{ pathto(master_doc) }}">CrateDB CLI</a>
72-
{{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
68+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
7369
</li>
7470
{% else %}
7571
<li class="navleft-item"><a href="/docs/crate/crash/">CrateDB CLI</a></li>
@@ -78,7 +74,7 @@
7874
{% if project == 'CrateDB Cloud: Croud CLI' %}
7975
<li class="current">
8076
<a class="current-active" href="{{ pathto(master_doc) }}">Cloud CLI</a>
81-
{{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
77+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
8278
</li>
8379
{% else %}
8480
<li class="navleft-item"><a href="/docs/cloud/cli/">Cloud CLI</a></li>
@@ -94,7 +90,7 @@
9490
<li class="current">
9591
{% if project == 'CrateDB: Clients and Tools' %}
9692
<a class="current-active" href="{{ pathto(master_doc) }}">Drivers and Integrations</a>
97-
{{ toctree(maxdepth=3|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
93+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
9894
{% else %}
9995
<a class="current-active" href="/docs/crate/clients-tools/">Drivers and Integrations</a>
10096
{% endif %}
@@ -103,47 +99,47 @@
10399
{% if project == 'CrateDB JDBC' %}
104100
<li class="current">
105101
<a class="current-active" href="{{ pathto(master_doc) }}">JDBC</a>
106-
{{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
102+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
107103
</li>
108104
{% else %}
109105
<li class="navleft-item"><a href="/docs/jdbc/">JDBC</a></li>
110106
{% endif %}
111107
{% if project == 'CrateDB DBAL' %}
112108
<li class="current">
113109
<a class="current-active" href="{{ pathto(master_doc) }}">PHP DBAL</a>
114-
{{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
110+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
115111
</li>
116112
{% else %}
117113
<li class="navleft-item"><a href="/docs/dbal/">PHP DBAL</a></li>
118114
{% endif %}
119115
{% if project == 'CrateDB PDO' %}
120116
<li class="current">
121117
<a class="current-active" href="{{ pathto(master_doc) }}">PHP PDO</a>
122-
{{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
118+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
123119
</li>
124120
{% else %}
125121
<li class="navleft-item"><a href="/docs/pdo/">PHP PDO</a></li>
126122
{% endif %}
127123
{% if project == 'CrateDB Python' %}
128124
<li class="current">
129125
<a class="current-active" href="{{ pathto(master_doc) }}">Python</a>
130-
{{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
126+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
131127
</li>
132128
{% else %}
133129
<li class="navleft-item"><a href="/docs/python/">Python</a></li>
134130
{% endif %}
135131
{% if project == 'SQLAlchemy Dialect' %}
136132
<li class="current">
137133
<a class="current-active" href="{{ pathto(master_doc) }}">SQLAlchemy</a>
138-
{{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
134+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
139135
</li>
140136
{% else %}
141137
<li class="navleft-item"><a href="/docs/sqlalchemy-cratedb/">SQLAlchemy</a></li>
142138
{% endif %}
143139
{% if project == 'CrateDB Npgsql' %}
144140
<li class="current">
145141
<a class="current-active" href="{{ pathto(master_doc) }}">.NET Npgsql</a>
146-
{{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
142+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
147143
</li>
148144
{% else %}
149145
<li class="navleft-item"><a href="/docs/npgsql/">.NET Npgsql</a></li>
@@ -167,14 +163,14 @@
167163
{% if project == 'CrateDB documentation theme' %}
168164
<li class="current border-top">
169165
<a class="current-active" href="{{ pathto(master_doc) }}">Documentation theme</a>
170-
{{ toctree(maxdepth=3|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
166+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
171167
</li>
172168
{% endif %}
173169

174170
{% if project == 'Doing Docs' %}
175171
<li class="current">
176172
<a class="current-active" href="{{ pathto(master_doc) }}">Doing Docs at CrateDB</a>
177-
{{ toctree(maxdepth=2|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
173+
{{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
178174
</li>
179175
{% endif %}
180176

0 commit comments

Comments
 (0)