diff --git a/doc/Command-line.md b/doc/Command-line.md index b531604..26cb826 100644 --- a/doc/Command-line.md +++ b/doc/Command-line.md @@ -154,7 +154,7 @@ The file is read by hablo when the blog is generated and its content gets includ `-R, --rss` -Enables the generation of RSS feeds for each [lists](https://git.marvid.fr/Tissevert/hablo/wiki/Architectural%20choices#page-types) of articles. The feed consists in an additional `rss.xml` file placed in the same directory as the `index.html` and `all.html` files generated for. The feeds only include the most recent articles exactly as the «short» versions of each list, which means that they are affected by the use of the [`--preview-articles`](#number-of-articles-previewed) option. +Enables the generation of RSS feeds for each [list](https://git.marvid.fr/Tissevert/hablo/wiki/Architectural%20choices#page-types) of articles. The feed consists in an additional `rss.xml` file placed in the same directory as the `index.html` and `all.html` files generated for. The feeds only include the most recent articles exactly as the «short» versions of each list, which means that they are affected by the use of the [`--preview-articles`](#number-of-articles-previewed) option. When this option is enabled, hablo will also include links to the generated feeds in the list pages. Two [template variables](https://git.marvid.fr/Tissevert/hablo/wiki/Template%20variables#rsslinks) control respectively the content and the title of the link. Note that this feature requires setting your site URL with [`--site-url`](#site-url). diff --git a/doc/Template-variables.md b/doc/Template-variables.md index 270b753..45b1a3e 100644 --- a/doc/Template-variables.md +++ b/doc/Template-variables.md @@ -68,6 +68,14 @@ metadata = {?by ${author} ?}on ${date}{? tagged ${tags}?} If an article has an author, the rendered `metadata` string will start with «by », otherwise it will directly start with «on ». Likewise all articles with tags will have their `metadata` end with « tagged » and then the list of comma-separated tags but if an article doesn't have tags, it will simply end after the date. +## rssLink + +This template variable contains the text displayed in the link element pointing to the [RSS feed](https://git.marvid.fr/Tissevert/hablo/wiki/Command-line#rss) to each [list page](https://git.marvid.fr/Tissevert/hablo/wiki/Architectural%20choices#list-pages). This template is a constant and doesn't expect any templating variable. + +## rssTitle + +This template variable contains the title attribute of the link element pointing to the [RSS feed](https://git.marvid.fr/Tissevert/hablo/wiki/Command-line#rss) to each [list page](https://git.marvid.fr/Tissevert/hablo/wiki/Architectural%20choices#list-pages) that will be visible on mouse hover. The only templating variable it expects is `$tag` (which should be preferably [protected](https://git.marvid.fr/Tissevert/hablo/wiki/Template%20variables#template-variables) if you use it because `$tag` will be null on the main page containing a link to the general feed containing all the articles published on your blog). + ## tagsList The content of the `

` element in the navigation `
` that lists all the tags of your blog. diff --git a/share/defaultWording.conf b/share/defaultWording.conf index 0fd4281..6aa51f1 100644 --- a/share/defaultWording.conf +++ b/share/defaultWording.conf @@ -8,4 +8,6 @@ latestLink = See only latest latestPage = Latest articles latestTaggedPage = Latest articles tagged ${tag} metadata = {?by ${author} ?}on ${date}{? tagged ${tags}?} +rssLink = Subscribe +rssTitle = Follow articles{? tagged ${tag}?} tagsList = Tags diff --git a/src/Blog/Wording.hs b/src/Blog/Wording.hs index e20e2d9..b696f4d 100644 --- a/src/Blog/Wording.hs +++ b/src/Blog/Wording.hs @@ -39,6 +39,8 @@ variables = Map.fromList [ , ("latestPage", []) , ("latestTaggedPage", ["tag"]) , ("metadata", ["author", "date", "tags"]) + , ("rssLink", []) + , ("rssTitle", ["tag"]) , ("tagsList", []) ]