diff --git a/docs/content/documentation/templates/feeds.md b/docs/content/documentation/templates/feeds/index.md similarity index 54% rename from docs/content/documentation/templates/feeds.md rename to docs/content/documentation/templates/feeds/index.md index fb0dec5e..77630f6b 100644 --- a/docs/content/documentation/templates/feeds.md +++ b/docs/content/documentation/templates/feeds/index.md @@ -32,3 +32,27 @@ Feeds for taxonomy terms get two more variables, using types from the - `taxonomy`: of type `TaxonomyConfig` - `term`: of type `TaxonomyTerm`, but without `term.pages` (use `pages` instead) + +Enable feed autodiscovery allows feed readers and browsers to notify user about a RSS or Atom feed available on your web site. So it is easier for user to subscribe. +As an example this is how it looks like using [Firefox](https://en.wikipedia.org/wiki/Mozilla_Firefox) [Livemarks](https://addons.mozilla.org/en-US/firefox/addon/livemarks/?src=search) addon. + +![RSS feed autodiscovery example.](rss_feed.png) + +You can enable posts autodiscovery modifying your blog `base.html` template adding the following code in between the `` tags. +```html +{% block rss %} + +{% endblock %} +``` +You can as well use an Atom feed using `type="application/atom+xml"` and `path="atom.xml"`. + +All pages on your site will refer to your post feed. + +In order to enable the tag feeds as well, you can overload the `block rss` using the following code in your `tags/single.html` template. +```html +{% block rss %} + {% set rss_path = "tags/" ~ term.name ~ "/rss.xml" %} + +{% endblock rss %} +``` +Each tag page will refer to it's dedicated feed. diff --git a/docs/content/documentation/templates/feeds/rss_feed.png b/docs/content/documentation/templates/feeds/rss_feed.png new file mode 100644 index 00000000..81abb702 Binary files /dev/null and b/docs/content/documentation/templates/feeds/rss_feed.png differ diff --git a/docs/content/documentation/templates/overview.md b/docs/content/documentation/templates/overview.md index e9c967a7..4a0d6f2d 100644 --- a/docs/content/documentation/templates/overview.md +++ b/docs/content/documentation/templates/overview.md @@ -37,7 +37,7 @@ The page and section variables are described in more detail in the next section. ## Built-in templates Zola comes with four built-in templates: `atom.xml` and `rss.xml` (described in -[Feeds](@/documentation/templates/feeds.md)), `sitemap.xml` (described in [Sitemap](@/documentation/templates/sitemap.md)), +[Feeds](@/documentation/templates/feeds/index.md)), `sitemap.xml` (described in [Sitemap](@/documentation/templates/sitemap.md)), and `robots.txt` (described in [Robots.txt](@/documentation/templates/robots.md)). Additionally, themes can add their own templates, which will be applied if not overridden. You can override built-in or theme templates by creating a template with