Skip to content

Commit 465a4ba

Browse files
authored
docs: Revise table of contents and fix typos (#249)
1 parent 90b744e commit 465a4ba

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

docs/source/components.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
single: Plugins
44

55
############################
6-
Standard Component plugins
6+
Standard component plugins
77
############################
88

99
``djangocms-frontend`` adds a set of plugins to Django-CMS to allow for

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ Contents
8080
:maxdepth: 3
8181

8282
getting_started
83-
custom_components
8483
grid
8584
components
85+
custom_components
8686
plugins/toc
8787
how-to/index
8888
reference

docs/source/plugins/toc.rst

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,30 +89,38 @@ To create a table of contents:
8989
Positioning at Top of Page
9090
==========================
9191

92+
Table of contents at the top Example
93+
------------------------------------
94+
9295
Since the TOC must be placed after headings to collect them, use grid layouts to display it at the top:
9396

97+
1. Create a container
98+
2. Add a row with two columns
99+
3. In the first (bottom) column: Add your content with Heading plugins
100+
4. In the second (top) column: Add the TOC plugin
101+
5. Set the column width and order: Both columns should cover full width (typically 12/12),
102+
the second columns should be shown before (i.e., at the top) the first (then at the bottom)
103+
94104
Two Column Layout Example
95105
-------------------------
96106

97107
1. Create a container
98108
2. Add a row with two columns
99-
3. In the first (left) column:
100-
- Add the TOC plugin
101-
4. In the second (right) column:
102-
- Add your content with Heading plugins
109+
3. In the first (left) column: Add your content with Heading plugins
110+
4. In the second (right) column: Add the TOC plugin
103111
5. Set column widths appropriately (e.g., 3/9 split)
104112

105113
Example Structure::
106114

107115
Container
108116
└── Row
109-
├── Column (col-3)
110-
── TOC Plugin
111-
── Column (col-9)
112-
├── Heading Plugin
113-
── Content...
114-
── Heading Plugin
115-
└── More content...
117+
├── Column (col-9)
118+
── Heading Plugin
119+
│ ├── Content...
120+
├── Heading Plugin
121+
── More content...
122+
── Column (col-3)
123+
└── TOC Plugin
116124

117125
This creates a sidebar layout with the TOC always visible while scrolling through content.
118126

0 commit comments

Comments
 (0)