Skip to content

Commit

Permalink
Document author (#2347)
Browse files Browse the repository at this point in the history
* Add author to documentation for config.toml

* Add explanation of how author is used for feeds
  • Loading branch information
c-git authored Oct 30, 2023
1 parent 152eccc commit 7d5ce5c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/content/documentation/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ feed_filename = "atom.xml"
# files are always copied, regardless of this setting.
hard_link_static = false

# The default author for pages
author =

# The taxonomies to be rendered for the site and their configuration of the default languages
# Example:
# taxonomies = [
Expand Down
17 changes: 17 additions & 0 deletions docs/content/documentation/templates/feeds/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ need to provide a template yourself.

**Only pages with a date will be available.**

The author in the feed is set as
- The first author in `authors` set in the
[front matter](@/documentation/content/page.md#front-matter)
- If that is not present it falls back to the `author` in the
[Configuration](@/documentation/getting-started/configuration.md)
- If that is also not preset it is set to `Unknown`.

Note that `atom.xml` and `rss.xml` require different formats for specifying the
author. According to [RFC 4287][atom_rfc] `atom.xml` requires the author's
name, for example `"John Doe"`. While according to the
[RSS 2.0 Specification][rss_spec] the email address is required, and the name
optionally included, for example `"lawyer@boyer.net"` or
`"lawyer@boyer.net (Lawyer Boyer)"`.

The feed template gets five variables:

- `config`: the site config
Expand Down Expand Up @@ -63,3 +77,6 @@ In order to enable the tag feeds as well, you can overload the `block rss` using
{% endblock rss %}
```
Each tag page will refer to it's dedicated feed.

[atom_rfc]: https://www.rfc-editor.org/rfc/rfc4287
[rss_spec]: https://www.rssboard.org/rss-specification#ltauthorgtSubelementOfLtitemgt

0 comments on commit 7d5ce5c

Please sign in to comment.