Skip to content

Commit df65935

Browse files
committed
Add rss Feed to Footer
Update rssFeed url value to project/status page Add frontmatter and enable git info These changes allow us to get the last modified date for pages. Update page-meta-lastmod file to not show git commit info
1 parent d91b494 commit df65935

File tree

8 files changed

+48
-7
lines changed

8 files changed

+48
-7
lines changed

config/_default/hugo.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ enableRobotsTXT: false
2424
assetDir: static
2525

2626
# Enable .GitInfo object for each page. This will give values to .Lastmod etc.
27-
enableGitInfo: false
27+
enableGitInfo: true
2828

2929
# Top Level Language defaults
3030
# See languages.yaml for language specific values
@@ -45,6 +45,13 @@ outputs:
4545
section:
4646
- HTML
4747

48+
frontmatter:
49+
date:
50+
- date
51+
- pubdate
52+
- :git
53+
- :default
54+
4855
# Code Highlighting configuration
4956
# Not Used. Code highlighting is controlled using the highlighting
5057
# section in `markup.yaml`

config/_default/params.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ links:
7979
url: "https://bsky.app/profile/interlisp.org"
8080
icon: "fa-brands fa-bluesky"
8181
desc: "We're on Bluesky too!"
82+
- name: "RSS Feed"
83+
url: "project/status/index.xml"
84+
icon: "fa fa-rss"
85+
desc: "Subscribe to our feed for the latest updates"
8286
# - name: "Stack Overflow"
8387
# url: "https://stackoverflow.com/questions/tagged/graphviz"
8488
# icon: "fab fa-stack-overflow"

content/en/project/_index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
Title: The Medley Interlisp Project
33
weight: 2
44
type: docs
5-
outputs:
6-
- html
7-
- rss
85
aliases:
96
- /hugo/
107
- /medley/project/

content/en/project/status/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: News and Status Reports
33
type: docs
44
weight: 2
5+
outputs:
6+
- html
7+
- rss
58
aliases:
69
- /hugo/news/
710
- /medley/project/news/

content/en/software/_index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
---
22
title: Software
33
type: docs
4-
outputs:
5-
- html
6-
- rss
74
aliases:
85

96
---

layouts/_default/rss.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
{{- $pctx := . }}
1313
{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
1414

15+
<!-- Iterate through all sections and include both sections and
16+
pages in the rss feed. The default rss.xml only includes
17+
pages. -->
1518
{{- $pages := slice }}
1619
{{- $mainPages := where .Pages "Kind" "in" (slice "page" "section") }}
1720
{{- $pages = $pages | union $mainPages }}

layouts/partials/footer/links.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<ul class="td-footer__links-list">
2+
{{ range . }}
3+
{{ if eq .name "RSS Feed" }}
4+
<li class="td-footer__links-item" data-bs-toggle="tooltip" title="RSS" aria-label="RSS">
5+
<a target="_blank" rel="noopener" href="{{ absURL .url }}" aria-label="RSS">
6+
<i class="fas fa-rss"></i>
7+
</a>
8+
</li>
9+
{{ else }}
10+
<li class="td-footer__links-item" data-bs-toggle="tooltip" title="{{ .name }}" aria-label="{{ .name }}">
11+
<a target="_blank" rel="noopener" href="{{ .url }}" aria-label="{{ .name }}">
12+
<i class="{{ .icon }}"></i>
13+
</a>
14+
{{ end }}
15+
{{ end }}
16+
17+
</ul>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{ if and .GitInfo .Site.Params.github_repo -}}
2+
<div class="td-page-meta__lastmod">
3+
<!--
4+
Disable showing of Git Commit info in the footer
5+
{{ T "post_last_mod" }} {{ .Lastmod.Format .Site.Params.time_format_default -}}
6+
{{ with .GitInfo }}: {{/* Trim WS */ -}}
7+
<a data-proofer-ignore href="{{ $.Site.Params.github_repo }}/commit/{{ .Hash }}">
8+
{{- .Subject }} ({{ .AbbreviatedHash }}) {{- /* Trim WS */ -}}
9+
</a>
10+
{{- end }}
11+
-->
12+
</div>
13+
{{ end -}}

0 commit comments

Comments
 (0)