From 3ffae027ef6f7a6c3b18d72a4ea65f0a15ddcfe6 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sat, 28 May 2022 17:48:18 +0200 Subject: Provide ability to render feeds menu --- CHANGELOG.md | 3 ++- exampleSite/config.toml | 16 ++++++++++++++++ layouts/partials/sidebar.html | 41 ++++++++++++++++++++++++++++------------- 3 files changed, 46 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e8f276..b2990ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add multilanguage support - Add Russian translation -- Provide an ability to use hreflang attribute in raw links +- Provide an ability to use hreflang attribute in `link` shortcode - Add `{{< mini-toc >}}` shortcode - Provide an ability to use `keywords` meta tag +- Provide ability to render feeds menu ### Changed diff --git a/exampleSite/config.toml b/exampleSite/config.toml index b19be14..64401db 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -221,6 +221,22 @@ disableKinds = ['RSS'] [menu.main.params] external = true + [[menu.feeds]] + identifier = 'rss' + name = 'RSS 2.0' + url = '/feeds/feed.rss.xml' + weight = 1 + [[menu.feeds]] + identifier = 'atom' + name = 'Atom' + url = '/feeds/feed.atom.xml' + weight = 2 + [[menu.feeds]] + identifier = 'json' + name = 'Json Feed' + url = '/feeds/feed.json' + weight = 3 + # For more see https://gohugo.io/getting-started/configuration-markup/ [markup] defaultMarkdownHandler = 'goldmark' diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index e6e4bd3..e3da92d 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,24 +1,39 @@ -{{/* Target for toggling the sidebar `.sidebar-checkbox` is for regular styles, `#sidebar-checkbox` for behavior. */}} +{{/* Target for toggling the sidebar `.sidebar-checkbox` is for regular styles, + `#sidebar-checkbox` for behavior. */}} - +{{/* Toggleable sidebar */}}