RSS Author

The default RSS template refers to $.Site.Author.name, however when I specify this author in my top level config.toml no author name appears in the rendered RSS XML.

I have this in my config.toml

[Author]
name = "My name"

Any idea on what’s wrong here?

Do you have

[author]
name = "my name"

and if so is it AFTER all the root config options? (root = those without [sectionname] parts).

Please post the whole config. I did not check the default RSS layout now, but if it indeed refers to $.Site.Author.name then the issue is in your config file(s).

There was an error in my original post, I do have an author section, but its declared before the ‘params’ section.

My whole config looks something like this:

The embedded RSS template contains this code (formatted for clarity):

{{ with .Site.Author.email }}
  <author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>
{{end}}

If you want author information to appear, you must specify the email, while the name is optional.

[author]
email = "john@example.org"    # Required
name = "John Doe"             # Optional
2 Likes

Thanks a lot @jmooring, I totally missed that, being in a hurry.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.