Skip to content

Commit 6ed5cd5

Browse files
committed
📝 Adds sub-items docs
1 parent 8b5a605 commit 6ed5cd5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/pages-and-sections.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,43 @@ The following example shows creating a config, publishing it as a [Gist](https:/
5656
Only top-level fields supported by sub-pages are `pageInfo` and `sections`. The `appConfig` and `pages` will always be inherited from your main `conf.yml` file. Other than that, sub-pages behave exactly the same as your default view, and can contain sections, items, widgets and page info like nav links, title and logo.
5757

5858
Note that since page paths are required by the router, they are set at build-time, not run-time, and so a rebuild (happens automatically) is required for changes to page paths to take effect (this only applies to changes to the `pages` array, rebuild isn't required for editing page content).
59+
60+
61+
## Sub-Items
62+
63+
A normal section will contain zero or more items, for example:
64+
65+
```yaml
66+
- name: Coding
67+
icon: far fa-code
68+
items:
69+
- title: GitHub
70+
url: https://github.com/
71+
- title: StackOverflow
72+
url: http://stackoverflow.com/
73+
```
74+
75+
But items can also be grouped together, referred to as sub-items. This is useful for a group of less frequently used items, which you don't want to take up too much space, or for action buttons (_coming soon_).
76+
77+
Item groups may also have an optional title.
78+
79+
```yaml
80+
- name: Coding
81+
icon: far fa-code
82+
items:
83+
- title: Normal Item 1
84+
- title: Normal Item 2
85+
- subItems:
86+
- title: JavaScript
87+
url: https://developer.mozilla.org
88+
icon: si-javascript
89+
- title: TypeScript
90+
url: https://www.typescriptlang.org/docs
91+
icon: si-typescript
92+
- title: Svelt
93+
url: https://svelte.dev/docs
94+
icon: si-svelte
95+
- title: Go
96+
url: https://go.dev/doc
97+
icon: si-go
98+
```

0 commit comments

Comments
 (0)