Skip to content

Commit f29a36f

Browse files
authored
Fixes to tab processing code to stop hiding child pages (#8174)
1 parent 7c3f1a6 commit f29a36f

File tree

4 files changed

+33
-12
lines changed

4 files changed

+33
-12
lines changed

extensions/sphinx_inline_tabs/events.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,24 @@ def doctree_read(app: Sphinx, doctree: nodes.document):
8282
and len(app.env.sphinx_tabs[app.env.docname]) > 0
8383
):
8484
logger.debug(f"{LOG_PREFIX} doctree_read: {app.env.docname} has tabs")
85+
86+
# Store the original toctree structure before replacing it
87+
original_toc = None
88+
if (len(app.env.tocs[app.env.docname][0]) > 1 and
89+
app.env.tocs[app.env.docname][0][1] is not None):
90+
original_toc = app.env.tocs[app.env.docname][0][1]
91+
logger.debug(f"{LOG_PREFIX} doctree_read({app.env.docname}): preserving original toctree")
92+
8593
updated_tocs: nodes.list_item = sectiondata_to_toc(
8694
app.env.docname,
8795
collect_sections(app.env, doctree, app.env.docname, doctree),
8896
)
97+
98+
# If we have an original toctree, use it instead of the tab-based one
99+
if original_toc is not None:
100+
logger.debug(f"{LOG_PREFIX} doctree_read({app.env.docname}): using original toctree instead of tab-based TOC")
101+
updated_tocs = original_toc
102+
89103
logger.debug(
90104
f"{LOG_PREFIX} doctree_read({app.env.docname}): updated_tocs[0][1]={updated_tocs}"
91105
)

source/deploy/server/preparations.rst

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@ Prepare your Mattermost Server environment
44
This guide outlines the key preparation steps required before installing the Mattermost Server, focusing on setting up the database and file storage systems.
55

66
.. toctree::
7-
:maxdepth: 1
8-
:hidden:
9-
:titlesonly:
10-
11-
Review software and hardware requirements </deploy/software-hardware-requirements>
12-
Set up an NGINX proxy </deploy/server/setup-nginx-proxy>
13-
Configure Mattermost Calls </configure/calls-deployment>
14-
Set up TLS </deploy/server/setup-tls>
15-
Use an image proxy </deploy/server/image-proxy>
7+
:maxdepth: 1
8+
:hidden:
9+
:titlesonly:
10+
11+
Review software and hardware requirements </deploy/software-hardware-requirements>
12+
Set up an NGINX proxy </deploy/server/setup-nginx-proxy>
13+
Configure Mattermost Calls </configure/calls-deployment>
14+
Set up TLS </deploy/server/setup-tls>
15+
Use an image proxy </deploy/server/image-proxy>
16+
17+
Before installing Mattermost Server, review the following preparation requirements:
18+
19+
* :doc:`Review software and hardware requirements </deploy/software-hardware-requirements>` - Ensure your system meets the minimum requirements for Mattermost deployment.
20+
* :doc:`Set up an NGINX proxy </deploy/server/setup-nginx-proxy>` - Configure NGINX as a reverse proxy for enhanced security and performance.
21+
* :doc:`Configure Mattermost Calls </configure/calls-deployment>` - Set up real-time communication capabilities for voice and video calls.
22+
* :doc:`Set up TLS </deploy/server/setup-tls>` - Enable secure communication with SSL/TLS encryption.
23+
* :doc:`Use an image proxy </deploy/server/image-proxy>` - Configure image proxy for enhanced privacy and security.
1624

1725
Database preparation
1826
--------------------

source/deploy/server/server-deployment-planning.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Server deployment planning
22
==========================
33

44
.. toctree::
5-
:maxdepth: 1
6-
:hidden:
5+
:maxdepth: 4
76
:titlesonly:
87

98
Preparations </deploy/server/preparations>

source/guides/deployment-guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Welcome to deployment guidance for Mattermost. This guide is organized into sect
66
Whether you're deploying the server application, desktop application, or mobile application, or troubleshooting deployments, this guide has you covered. Use the navigation below to access detailed information about each topic.
77

88
.. toctree::
9-
:maxdepth: 1
9+
:maxdepth: 3
1010
:hidden:
1111
:titlesonly:
1212

0 commit comments

Comments
 (0)