From 55e623cc347403219af03911cdca01c7a3b95c2c Mon Sep 17 00:00:00 2001 From: Ben Cotton Date: Thu, 13 Jun 2024 09:16:43 -0400 Subject: [PATCH] Add RSS feed for blog The feed was apparently already being generated, so I just made it visible (and suppressed creating a feed for the home page because it doesn't make sense how we're using it.) As part of making it visible, I added social media links to the footer. We have the RSS and YouTube links to add and for the purposes of improving spacing, I moved GitHub from the text links to be a social icon link. The footer links are largely duplicating the header links anyway, so it doesn't feel like a real loss in usability. Fixes #36 Signed-off-by: Ben Cotton --- config.yaml | 33 ++++++++++--------- .../hugo-fresh/layouts/_default/section.html | 3 ++ .../hugo-fresh/layouts/partials/footer.html | 4 +-- .../layouts/partials/section/content.html | 5 ++- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/config.yaml b/config.yaml index e6a5c6f..1ee0469 100644 --- a/config.yaml +++ b/config.yaml @@ -5,10 +5,19 @@ canonifyURLs: true title: guac theme: hugo-fresh googleAnalytics: G-VVPLWNX4L9 +outputs: + home: + - html + section: + - html + - rss # Disables warnings disableKinds: - taxonomy - taxonomyTerm +services: + rss: + limit: 10 markup: goldmark: renderer: @@ -242,21 +251,16 @@ params: # Logo (from /images/logos/___) logo: guac-logo-squareish.png # Social Media Title - # socialmediatitle: Follow Us + socialmediatitle: Follow GUAC # # Social media links (GitHub, Twitter, etc.). All are optional. - # socialmedia: - # - link: https://github.com/lucperkins/github-fresh + socialmedia: # # Icons are from Font Awesome - # icon: github - # - link: https://dribbble.com/# - # icon: dribbble - # - link: https://facebook.com/# - # icon: facebook - # - link: https://twitter.com/lucperkins - # icon: twitter - # - link: https://bitbucket.org/# - # icon: bitbucket - # bulmalogo: true + - link: /blog/index.xml + icon: rss + - link: https://youtube.com/@guacsec + icon: youtube + - link: https://github.com/guacsec + icon: github quicklinks: column1: title: "Community" @@ -270,6 +274,3 @@ params: column4: title: "Docs" titleLink: https://docs.guac.sh/ - column5: - title: "Github" - titleLink: https://github.com/guacsec/guac diff --git a/themes/hugo-fresh/layouts/_default/section.html b/themes/hugo-fresh/layouts/_default/section.html index 0754806..bdb782e 100644 --- a/themes/hugo-fresh/layouts/_default/section.html +++ b/themes/hugo-fresh/layouts/_default/section.html @@ -4,6 +4,9 @@ {{ partial "meta.html" . }} {{ block "title" . }}{{ .Site.Title }}{{ end }} {{ partial "css.html" . }} + {{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} + {{ end }} diff --git a/themes/hugo-fresh/layouts/partials/footer.html b/themes/hugo-fresh/layouts/partials/footer.html index 92fb750..8450e41 100644 --- a/themes/hugo-fresh/layouts/partials/footer.html +++ b/themes/hugo-fresh/layouts/partials/footer.html @@ -32,7 +32,7 @@

{{ .title }}

{{- end }} - + Copyright © {{ .Site.Params.mysite.copystart }} - {{ dateFormat "2006" now }} GUAC a Series of LF Projects, LLC. For web site terms of use, trademark policy and other project policies please see https://lfprojects.org/ diff --git a/themes/hugo-fresh/layouts/partials/section/content.html b/themes/hugo-fresh/layouts/partials/section/content.html index a20e248..fd511cf 100644 --- a/themes/hugo-fresh/layouts/partials/section/content.html +++ b/themes/hugo-fresh/layouts/partials/section/content.html @@ -2,7 +2,10 @@
-

{{ .Title }}

+

{{ .Title }} + {{ with .OutputFormats.Get "rss" -}} +

+ {{ end }}
{{ range .Pages }}