Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,36 @@ def generate_combined_markdown(app, exception):
encoding="utf-8",
)

# Pages (by docname) whose primary (left) sidebar should be collapsed by default.
# #pst-primary-sidebar-checkbox restores the sidebar.

COLLAPSE_PRIMARY_SIDEBAR = {"system-admin/cluster"}

_COLLAPSE_SIDEBAR_STYLE = """
<style id="default-collapsed-primary-sidebar">
html .bd-container .bd-sidebar-primary {
margin-left: -20%;
opacity: 0;
visibility: hidden;
}
html body #pst-primary-sidebar-checkbox:checked ~ .bd-container .bd-sidebar-primary {
margin-left: 0;
opacity: 1;
visibility: visible;
}
html body .prev-next-footer {
display: none;
}
</style>
"""


def collapse_primary_sidebar(app, pagename, templatename, context, doctree):
if pagename in COLLAPSE_PRIMARY_SIDEBAR:
context["metatags"] = context.get("metatags", "") + _COLLAPSE_SIDEBAR_STYLE


def setup(app):
app.add_css_file("css/index.css")
app.connect("html-page-context", collapse_primary_sidebar)
app.connect("build-finished", generate_combined_markdown)
2 changes: 2 additions & 0 deletions docs/sphinx/_toc.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ subtrees:
title: Instinct Customer Acceptance Guide
- url: https://instinct.docs.amd.com/projects/gpu-cluster-networking/en/latest/
title: Networking
- url: https://instinct.docs.amd.com/projects/MI3XX-reference/latest/overview.html
title: MI3XX Reference Design
- file: system-admin/cloud.md
title: Cloud
subtrees:
Expand Down
2 changes: 1 addition & 1 deletion docs/system-admin/cluster.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Cluster
# Cluster Networking and Design Hub

## System and Design Guides

Expand Down
Loading