mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
docs: Document permalinks
This commit is contained in:
parent
0e54f9eec5
commit
758d821b3f
|
@ -153,6 +153,26 @@ Example feed configuration:
|
||||||
"/blog/" = "My blog"
|
"/blog/" = "My blog"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## PERMALINKS
|
||||||
|
|
||||||
|
Permalinks can be used to rewrite page paths. Permalinks are specified in the
|
||||||
|
[permalinks] table of the configuration file. Keys denote a path to a directory,
|
||||||
|
and values use the Go templating language to rewrite the final path of pages in
|
||||||
|
that directory. The templates have the same data that page templates have
|
||||||
|
available to them (see *PAGE TEMPLATES*).
|
||||||
|
|
||||||
|
The following configuration will rewrite the paths of pages in the content/blog
|
||||||
|
directory to /YYYY/MM/DD/slug. For example, the file
|
||||||
|
content/blog/2021-05-12-hello-world.gmi will have a path of
|
||||||
|
/2021/05/12/hello-world/.
|
||||||
|
|
||||||
|
```
|
||||||
|
[permalinks]
|
||||||
|
"/blog/" = "/{{ .Date.Format `2006/01/02` }}/{{ path.Base .Path }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information on templates, see *TEMPLATES*.
|
||||||
|
|
||||||
## TASKS
|
## TASKS
|
||||||
|
|
||||||
Tasks can be specified in the [tasks] table. Each task must have a unique name.
|
Tasks can be specified in the [tasks] table. Each task must have a unique name.
|
||||||
|
|
Loading…
Reference in a new issue