mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
docs: Move feeds after tasks
This commit is contained in:
parent
b0cf8c0713
commit
1d78b726d5
|
@ -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 contain paths, but should not end with a trailing slash. Multiple
|
||||||
site URLs may be specified for sites that are available at multiple locations.
|
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
|
||||||
|
|
||||||
Permalinks can be used to rewrite page paths. Permalinks are specified in the
|
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"
|
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
|
||||||
|
|
||||||
Templates have certain data and functions available to them.
|
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
|
: Title of the feed
|
||||||
| Permalink
|
| Permalink
|
||||||
: The permanent link to the feed directory
|
: The permanent link to the feed directory
|
||||||
| Entries
|
| Pages
|
||||||
: List of pages in this feed
|
: List of pages in this feed
|
||||||
|
|
||||||
## PARTIAL TEMPLATES
|
## PARTIAL TEMPLATES
|
||||||
|
|
Loading…
Reference in a new issue