diff --git a/config/_default/hugo.yaml b/config/_default/hugo.yaml index f3a58983..7ce1140d 100644 --- a/config/_default/hugo.yaml +++ b/config/_default/hugo.yaml @@ -5,6 +5,9 @@ # An overview of hugo configuration files can be found at: # https://gohugo.io/getting-started/configuration/#configure-server # +# title: The title that appears in the navbar of every page. We have +# edited navbar.html to not show the title in the navbar of the home page. +title: "The Medley Interlisp Project" # relativeURLs: Enable to force all relative URLs to be relative to content root relativeURLs: false @@ -21,7 +24,7 @@ enableRobotsTXT: false assetDir: static # Enable .GitInfo object for each page. This will give values to .Lastmod etc. -enableGitInfo: false +enableGitInfo: true # Top Level Language defaults # See languages.yaml for language specific values @@ -35,7 +38,23 @@ enableMissingTranslationPlaceholders: true disableKinds: - taxonomy - term - - RSS + +outputs: + home: + - HTML + section: + - HTML + +frontmatter: + date: + - date + - pubdate + - :git + - :default + +outputFormats: + rss: + baseName: rss # Code Highlighting configuration # Not Used. Code highlighting is controlled using the highlighting diff --git a/config/_default/params.yaml b/config/_default/params.yaml index 98850125..4b708c24 100644 --- a/config/_default/params.yaml +++ b/config/_default/params.yaml @@ -79,6 +79,10 @@ links: url: "https://bsky.app/profile/interlisp.org" icon: "fa-brands fa-bluesky" desc: "We're on Bluesky too!" + - name: "RSS Feed" + url: "project/status/rss.xml" + icon: "fa fa-rss" + desc: "Subscribe to our feed for the latest updates" # - name: "Stack Overflow" # url: "https://stackoverflow.com/questions/tagged/graphviz" # icon: "fab fa-stack-overflow" diff --git a/content/en/project/status/_index.md b/content/en/project/status/_index.md index fb178090..e1998228 100644 --- a/content/en/project/status/_index.md +++ b/content/en/project/status/_index.md @@ -2,6 +2,9 @@ title: News and Status Reports type: docs weight: 2 +outputs: + - html + - rss aliases: - /hugo/news/ - /medley/project/news/ diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 00000000..22f0c553 --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,64 @@ +{{- $authorName := "" }} +{{- with .Site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- end }} +{{- end }} + +{{- $pctx := . }} +{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} + + +{{- $pages := slice }} +{{- $mainPages := where .Pages "Kind" "in" (slice "page" "section") }} +{{- $pages = $pages | union $mainPages }} + +{{- range .Sections }} + {{- $sectionPages := where .Pages "Kind" "in" (slice "page" "section") }} + {{- $pages = $pages | union $sectionPages }} + {{- range .Sections }} + {{- $subSectionPages := where .Pages "Kind" "in" (slice "page" "section") }} + {{- $pages = $pages | union $subSectionPages }} + {{- end }} +{{- end }} + +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} + {{- $pages = $pages | first $limit }} +{{- end }} + + + + Updates from the Medley Interlisp Project + {{ .Permalink }} + Updates from the Medley Interlisp Project + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Summary | html }} + {{ range .Params.tags }} + {{ . }} + {{ end }} + + {{ end }} + + diff --git a/layouts/partials/footer/links.html b/layouts/partials/footer/links.html new file mode 100644 index 00000000..8fb1e38b --- /dev/null +++ b/layouts/partials/footer/links.html @@ -0,0 +1,17 @@ + diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html new file mode 100644 index 00000000..297808a6 --- /dev/null +++ b/layouts/partials/navbar.html @@ -0,0 +1,75 @@ +{{ $cover := and + (.HasShortcode "blocks/cover") + (not .Site.Params.ui.navbar_translucent_over_cover_disable) +-}} +{{ $baseURL := urls.Parse $.Site.Params.Baseurl -}} + + \ No newline at end of file diff --git a/layouts/partials/page-meta-lastmod.html b/layouts/partials/page-meta-lastmod.html new file mode 100644 index 00000000..1b4e36a0 --- /dev/null +++ b/layouts/partials/page-meta-lastmod.html @@ -0,0 +1,13 @@ +{{ if and .GitInfo .Site.Params.github_repo -}} +
+ +
+{{ end -}} \ No newline at end of file