Skip to content

Commit de80937

Browse files
authored
Document a few more theme features (jupyter-book#700)
1 parent c0eae37 commit de80937

File tree

3 files changed

+119
-0
lines changed

3 files changed

+119
-0
lines changed

docs/myst.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ project:
1717
toc:
1818
- file: index.md
1919
- file: ui.md
20+
- file: permalinks.md
2021
- file: reference/index.md
2122
children:
2223
- pattern: 'reference/!(index)*.md'

docs/permalinks.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Permalinks and URLs
2+
3+
Configuration options for controlling site navigation and URL structure.
4+
5+
## URL Structure
6+
7+
By default, MyST flattens the directory structure when generating URLs.
8+
For example:
9+
10+
A file at
11+
12+
```
13+
a/b/page.md
14+
```
15+
16+
renders at URL
17+
18+
```
19+
/page
20+
```
21+
22+
### Folder structure URLs
23+
24+
To make URLs respect nested folder structure:
25+
26+
```yaml
27+
site:
28+
options:
29+
folders: true
30+
```
31+
32+
For example, a file at
33+
34+
```
35+
a/b/page.md
36+
```
37+
38+
renders at URL
39+
40+
```
41+
/a/b/page
42+
```

docs/ui.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,79 @@ site:
7070
- Appears at the bottom of the primary sidebar (left-side navigation)
7171
- If the `.md` file it points to is empty, the footer will not be visible
7272
- If not configured, falls back to the default "Made with MyST" footer
73+
74+
## Hiding Elements
75+
76+
Control the visibility of various page elements. All options can be set site-wide or per-page.
77+
78+
### Hide Authors
79+
80+
Hide the author and affiliations list from the frontmatter block.
81+
82+
```yaml
83+
site:
84+
options:
85+
hide_authors: true
86+
```
87+
88+
### Hide Table of Contents
89+
90+
Hide the left sidebar table of contents.
91+
92+
```yaml
93+
site:
94+
options:
95+
hide_toc: true
96+
```
97+
98+
### Hide Outline
99+
100+
Hide the right sidebar document outline.
101+
102+
```yaml
103+
site:
104+
options:
105+
hide_outline: true
106+
```
107+
108+
### Hide Title Block
109+
110+
Hide the entire frontmatter block (title, authors, date, etc.).
111+
112+
```yaml
113+
site:
114+
options:
115+
hide_title_block: true
116+
```
117+
118+
### Hide Footer Links
119+
120+
Hide the previous/next navigation links at the bottom of each page.
121+
122+
```yaml
123+
site:
124+
options:
125+
hide_footer_links: true
126+
```
127+
128+
### Hide Search
129+
130+
Disable the search functionality.
131+
132+
```yaml
133+
site:
134+
options:
135+
hide_search: true
136+
```
137+
138+
### Page-level Overrides
139+
140+
Any of these options can be set on individual pages to override site-wide settings:
141+
142+
```yaml
143+
---
144+
site:
145+
hide_authors: true
146+
hide_outline: true
147+
---
148+
```

0 commit comments

Comments
 (0)