1
0
Fork 0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-06-08 08:16:09 +02:00

docs: Move feeds after tasks

This commit is contained in:
adnano 2021-09-03 01:04:06 -04:00
parent b0cf8c0713
commit 1d78b726d5

View File

@ -185,33 +185,6 @@ The following keys are supported:
Site URLs may contain paths, but should not end with a trailing slash. Multiple
site URLs may be specified for sites that are available at multiple locations.
## FEEDS
Feeds can be specified in [[tasks.feeds]] for every task needing them.
Example feed configuration:
```
# This will generate a feed which will be written to public/blog/atom.xml
[[tasks.feeds]]
input_dir = "blog"
title = "My Blog"
template = "atom.xml"
output = "blog/atom.xml"
```
*input_dir*
the content folder for which the feed will be generated
*title*
the title of the feed, accessible via {{ .Title }} in the template
*template*
the template to use for the feed
*output*
the absolute path for the rendered feed
## PERMALINKS
Permalinks can be used to rewrite page paths. Permalinks are specified in the
@ -382,6 +355,47 @@ configuration makes use of the *markdown*(1) comand to convert Markdown to HTML.
output_dir = "public"
```
## FEEDS
Feeds can be specified in the [[tasks.feeds]] array of tables. Multiple feeds
can be specified per task.
Example feed configuration:
```
[[tasks]]
# ...
# This generates a feed for the files in content/blog
# and writes it to blog/atom.xml (relative to the output directory)
[[tasks.feeds]]
input_dir = "blog"
title = "My Blog"
template = "atom.xml"
output = "blog/atom.xml"
# You can generate multiple feeds per task
# The generated feed can be written anywhere
# Here it is written to feed.xml (relative to the output directory)
[[tasks.feeds]]
input_dir = "blog"
title = "My Blog"
template = "custom_feed.xml"
output = "feed.xml"
```
*input_dir*
the content folder with which to populate the feed
*title*
the title of the feed, accessible via {{ .Title }} in the feed template
*template*
the template to use for the feed
*output*
the output path for the rendered feed
# TEMPLATES
Templates have certain data and functions available to them.
@ -673,7 +687,7 @@ Feed templates are provided with the following data:
: Title of the feed
| Permalink
: The permanent link to the feed directory
| Entries
| Pages
: List of pages in this feed
## PARTIAL TEMPLATES