You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
separates folder metata from the index/folder info pages
note: while this is a breaking change, there are no backward
compatibility considerations yet since the project is only in light use.
Copy file name to clipboardExpand all lines: docs/Configuration.md
+38-5Lines changed: 38 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,23 @@ All styles strip the `.md` extension and preserve directory structure. Per-page
44
44
url_style = "preserve-case"
45
45
```
46
46
47
+
### Folder URLs
48
+
49
+
A folder renders at `/folder/` when it contains either:
50
+
51
+
-`index.md` — the canonical form
52
+
- a folder-note: a file matching the folder name, e.g. `attend/attend.md` (Obsidian folder-note convention). The slug is rewritten internally to `attend/index`.
53
+
54
+
Both forms produce the same URL (`/attend/`) and are interchangeable. When both `index.md` and a folder-note coexist, `index.md` wins and a warning is logged.
55
+
56
+
To place a page literally at `/folder/folder/` (bypassing the folder-note rewrite), set an explicit `slug` in the page's frontmatter:
57
+
58
+
```yaml
59
+
---
60
+
slug: attend/attend
61
+
---
62
+
```
63
+
47
64
## `[build]`
48
65
49
66
| Field | Type | Default | Description |
@@ -88,7 +105,7 @@ Theme-specific display and rendering options. These are supported by the default
88
105
89
106
### Per-folder sort overrides
90
107
91
-
Override `sort` and `reverse` for specific folders via config or frontmatter.
108
+
Override `sort` and `reverse` for specific folders via config or per-folder metadata file.
92
109
93
110
**In `rockgarden.toml`:**
94
111
@@ -98,7 +115,7 @@ sort = "date"
98
115
reverse = true
99
116
```
100
117
101
-
**In a folder's `index.md` frontmatter** (takes priority over config):
118
+
**In a folder's `_folder.md` frontmatter** (takes priority over config):
102
119
103
120
```yaml
104
121
---
@@ -107,10 +124,27 @@ sort_reverse: true
107
124
---
108
125
```
109
126
110
-
Priority: frontmatter > `[nav.overrides.<path>]` > global `[nav]` defaults.
127
+
Priority: `_folder.md` > `[nav.overrides.<path>]` > global `[nav]` defaults.
111
128
112
129
The `"date"` sort strategy orders by file modified time and is only available on folder index pages. In the nav sidebar, `"date"` falls back to `"files-first"`.
113
130
131
+
## Folder Metadata (`_folder.md`)
132
+
133
+
An optional `_folder.md` file inside any content folder holds folder-level metadata. Only the frontmatter is consumed — any body content is ignored. The file is not published as a page and is not indexed for wiki-link resolution.
|`sort_reverse`|`bool`| Reverse the child sort order |
143
+
|`unlisted`|`bool`| Hide the folder (and its descendants) from navigation entirely |
144
+
|`show_index`|`bool`| Render the auto-generated folder listing at `/folder/` instead of the folder's `index.md` page. If an `index.md` also exists, its body is used as prose above the auto-listing. |
145
+
146
+
`_folder.md` is strictly optional — folders work without one, using defaults.
147
+
114
148
## `[feed]`
115
149
116
150
Atom feed generation. Requires `site.base_url` to be set.
@@ -205,8 +239,7 @@ Per-page options set in YAML frontmatter:
205
239
|`aliases`|`str` or `list`| Alternative names for wikilink resolution |
206
240
|`author`|`str`| Page author (used in Atom feed, overrides site-level feed author) |
207
241
|`subtitle`|`str`| Subtitle shown below the page title, in folder indexes, and tag indexes |
|`unlisted`|`bool`| Hide page from sidebar navigation and folder indexes (still accessible by URL) |
242
+
|`unlisted`|`bool`| Hide page from sidebar navigation and folder indexes (still accessible by URL). On an `index.md` / folder-note, the page still renders at `/folder/` but no nav entry links to it; the folder itself remains visible. To hide an entire folder, set `unlisted: true` in a `_folder.md`. |
Copy file name to clipboardExpand all lines: site/Configuration.md
+28-10Lines changed: 28 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,21 +76,39 @@ title: Page Title # Used in nav and <title>
76
76
slug: custom-slug # Override generated URL slug
77
77
nav_order: 1# Pin position in nav (lower = first)
78
78
tags: [doc, guide] # Shown in folder listings
79
-
show_index: true # For index.md: add folder listing
79
+
unlisted: true # Hide from nav (URL still works)
80
80
---
81
81
```
82
82
83
-
### Folder Index Pages
83
+
`unlisted: true` on an `index.md` or folder-note keeps the page at `/folder/` reachable by URL but removes the nav link to it; the folder itself stays in nav with its children.
84
+
85
+
### Folder Metadata (`_folder.md`)
86
+
87
+
Per-folder options live in an optional `_folder.md` file inside the folder. Frontmatter only — body is ignored. The file is not published as a page.
88
+
89
+
```yaml
90
+
---
91
+
nav_order: 2# Pin folder in parent nav
92
+
label: My Folder # Folder display label override
93
+
sort: alphabetical # Child sort strategy
94
+
sort_reverse: false
95
+
unlisted: true # Hide folder (and descendants) from nav
96
+
show_index: true # Use auto-listing at /folder/ even if index.md exists
97
+
---
98
+
```
84
99
85
-
The `show_index` option controls how `index.md` files are rendered:
100
+
See [[Navigation]] for full details.
101
+
102
+
### Folder Index Pages
86
103
87
-
| Scenario | Result |
88
-
|----------|--------|
89
-
| No `index.md` in folder | Auto-generated folder listing |
90
-
|`index.md` exists (default) | Renders as normal page |
91
-
|`index.md` with `show_index: true`| Page content + folder listing |
104
+
A folder is served at `/folder/` when it contains any of:
92
105
93
-
This lets you write custom landing pages for folders while still optionally including the file listing.
106
+
| Scenario | Result at `/folder/`|
107
+
|----------|----------------------|
108
+
| Nothing | Auto-generated folder listing |
109
+
|`index.md`|`index.md` renders as a normal page |
110
+
| Folder-note (`folder/folder.md`) | Equivalent to `index.md` — same URL |
111
+
|`_folder.md` with `show_index: true` and `index.md`| Auto-listing with `index.md` body as prose prefix |
94
112
95
113
## URL Slugs
96
114
@@ -116,7 +134,7 @@ slug: quickstart
116
134
---
117
135
```
118
136
119
-
This produces `/quickstart/` instead of `/getting-started/`.
137
+
This produces `/quickstart/` instead of `/getting-started/`. Use this as the escape hatch to place a page literally at `/folder/folder/` (bypassing the folder-note rewrite).
@@ -65,7 +66,7 @@ Each page shows a breadcrumb trail from root to current location.
65
66
66
67
Folders without an `index.md` automatically get a generated index page listing their contents.
67
68
68
-
If you create `folder/index.md`, it renders as a normal page:
69
+
If you create `folder/index.md`, it renders as a normal page at `/folder/`:
69
70
70
71
```yaml
71
72
---
@@ -75,15 +76,35 @@ title: My Folder
75
76
This is a custom landing page for the folder.
76
77
```
77
78
78
-
To show both your content and the folder listing, add `show_index: true`:
79
+
Obsidian's folder-note convention also works: a file matching the folder name (`folder/folder.md`) renders at the same URL (`/folder/`). Both forms are equivalent.
80
+
81
+
### Folder Metadata (`_folder.md`)
82
+
83
+
Per-folder options live in an optional `_folder.md` file inside the folder. The file is frontmatter-only — any body is ignored — and is never published as a page.
79
84
80
85
```yaml
81
86
---
82
-
title: My Folder
83
-
show_index: true
87
+
nav_order: 2
88
+
label: "My Folder"
89
+
sort: alphabetical
90
+
sort_reverse: false
84
91
---
85
-
86
-
Custom intro text above the listing.
87
92
```
88
93
94
+
Supported fields:
95
+
96
+
-`nav_order` — pin the folder's position in its parent nav
-`unlisted` — hide the folder (and all its descendants) from nav
100
+
-`show_index` — render the auto-generated listing at `/folder/` instead of the `index.md` page (if both exist, the `index.md` body appears as prose above the listing)
101
+
102
+
### Unlisted Behavior
103
+
104
+
`unlisted: true` on a regular page hides it from nav and folder listings (URL still works).
105
+
106
+
`unlisted: true` on an `index.md` or folder-note: the page still renders at `/folder/`, but no nav entry links to it. The folder itself remains in nav with its children. Use this for section overview pages that you want reachable via direct URL but not linked from the menu.
107
+
108
+
To hide an entire folder, set `unlisted: true` in the folder's `_folder.md`.
109
+
89
110
See [Examples](/examples/) for a live example with custom content.
0 commit comments