Skip to content

Commit b7879d8

Browse files
committed
docs: update & clarify details
1 parent 5382a1b commit b7879d8

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

docs/index.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ For a fully-featured example, view the [demo] source code: <https://github.com/P
7272
$ tree -F --dirsfirst
7373
.
7474
├── drafts/
75-
│   └── 997-untitled.md
75+
│   └── 000-untitled.md
7676
├── pages/
77-
│   ── about.md
77+
│   ── about.md
7878
├── posts/
7979
│   ├── 998-foo-bar.md
8080
│   └── 999-hello-world.md
@@ -87,6 +87,7 @@ $ tree -F --dirsfirst
8787
│   └── script.js
8888
├── __feed.rss
8989
├── __index.html
90+
├── __tag.html
9091
├── _footer.html
9192
├── _head.html
9293
├── _header.html
@@ -95,7 +96,9 @@ $ tree -F --dirsfirst
9596
├── index.html
9697
├── page.html
9798
├── robots.txt
98-
└── sitemap.xml
99+
├── sitemap.xml
100+
├── tag.html
101+
└── tags.html
99102
```
100103

101104
## Config
@@ -129,14 +132,15 @@ Optional, change if needed:
129132
Anything listed above or added additionally to a `.env` will be available
130133
_globally_ within templates.
131134

132-
Some specific keys used within entries (posts or drafts) and pages:
135+
Some specific keys used within entries (posts or drafts) and pages (except where
136+
noted):
133137

134138
- `slug`, to be used in URL (does _not_ contain the `.html` file extension)
135139
- `title`, taken from first line of file `# ...`
136140
- `date`, literally the `mtime` of the file
137-
- `id`, the number prefix for an _entry_ encoded with [Sqids]
141+
- `id`, the number prefix for an _entry_ (_not_ page) encoded with [Sqids]
138142
- `body`, converted Markdown to HTML contents (sans title)
139-
- `tags`, list of all tags for the _entry_
143+
- `tags`, list of all tags for the _entry_ (_not_ page)
140144

141145
Drafts will have a `draft` key set. Likewise, posts will have a `post` key set.
142146

@@ -149,8 +153,8 @@ Each page in `pages/*.md` is rendered against a `page.html`.
149153
template partial of the same name e.g., `{{__index}}` from `__index.html`.
150154
{% endraw %}
151155

152-
`tags.html` has access to an associative array of `all_tags` mapped to the
153-
number of entries tagged by that tag.
156+
`tags.html` has access to an associative array of `all_tags` where the keys are
157+
the tags themselves and the values are the number of entries tagged by that tag.
154158

155159
`sitemap.xml` has access to an array of slugs with the `slugs` key.
156160

0 commit comments

Comments
 (0)