@@ -72,9 +72,9 @@ For a fully-featured example, view the [demo] source code: <https://github.com/P
72
72
$ tree -F --dirsfirst
73
73
.
74
74
├── drafts/
75
- │ └── 997 -untitled.md
75
+ │ └── 000 -untitled.md
76
76
├── pages/
77
- │ └ ── about.md
77
+ │ ├ ── about.md
78
78
├── posts/
79
79
│ ├── 998-foo-bar.md
80
80
│ └── 999-hello-world.md
@@ -87,6 +87,7 @@ $ tree -F --dirsfirst
87
87
│ └── script.js
88
88
├── __feed.rss
89
89
├── __index.html
90
+ ├── __tag.html
90
91
├── _footer.html
91
92
├── _head.html
92
93
├── _header.html
@@ -95,7 +96,9 @@ $ tree -F --dirsfirst
95
96
├── index.html
96
97
├── page.html
97
98
├── robots.txt
98
- └── sitemap.xml
99
+ ├── sitemap.xml
100
+ ├── tag.html
101
+ └── tags.html
99
102
```
100
103
101
104
## Config
@@ -129,14 +132,15 @@ Optional, change if needed:
129
132
Anything listed above or added additionally to a ` .env ` will be available
130
133
_ globally_ within templates.
131
134
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):
133
137
134
138
- ` slug ` , to be used in URL (does _ not_ contain the ` .html ` file extension)
135
139
- ` title ` , taken from first line of file ` # ... `
136
140
- ` 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]
138
142
- ` 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)
140
144
141
145
Drafts will have a ` draft ` key set. Likewise, posts will have a ` post ` key set.
142
146
@@ -149,8 +153,8 @@ Each page in `pages/*.md` is rendered against a `page.html`.
149
153
template partial of the same name e.g., ` {{__index}} ` from ` __index.html ` .
150
154
{% endraw %}
151
155
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.
154
158
155
159
` sitemap.xml ` has access to an array of slugs with the ` slugs ` key.
156
160
0 commit comments