1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

Include more generator information.

- Add generator info to Atom feed.
- Add generator version and commit hash to meta page, along with a link
  to the last CI job if available.
- Use $JOB_URL to detect CI since that variable can be re-used to fetch
  the URL to the latest CI logs.
This commit is contained in:
Rohan Kumar 2023-11-27 19:36:36 -08:00
parent add67b2e0c
commit 76a18c2541
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 20 additions and 1 deletions

View file

@ -124,6 +124,10 @@ disableKinds = ["taxonomy", "term"]
about = ["HTML", "atom", "RSS"]
meta = ["HTML", "atom", "RSS"]
[security]
[security.funcs]
getenv = ['^JOB_URL$']
# https://github.com/nekr0z/static-webmentions
[webmentions]
newDir = "public"

View file

@ -5,6 +5,8 @@ outputs:
- html
description: "About this site. How it's built, why it's built that way, privacy, accessibility, mirrors, etc."
---
{{<build-info>}}
How I run this site
-------------------

View file

@ -52,6 +52,7 @@
<admin:errorReportsTo rdf:resource="mailto:{{ .Site.Author.email }}" />
<link rel="license" type="application/rdf+xml" href="https://creativecommons.org/licenses/by-sa/4.0/rdf" />
<updated>{{ now.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<generator uri="https://gohugo.io/" version="{{ .Site.Hugo.Version }}">Hugo {{ .Site.Hugo.Version }}</generator>
<id>{{ .Permalink }}</id>
{{ range $pages -}}
{{- if not .Params.Private -}}

View file

@ -0,0 +1,12 @@
{{- $now := now -}}
{{- $buildCtx := "on my workstation" -}}
{{- with getenv "JOB_URL" -}}
{{- $buildCtx = `<a href="{{ . }}">on builds.sr.ht</a>` | safeHTML -}}
{{- end -}}
<p>
This site was last built on
<time datetime="{{ $now.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">{{ $now.Format "2006-01-02 15:04:05-07:00" | safeHTML }}</time>
by
<a href="https://github.com/gohugoio/hugo/tree/{{ .Site.Hugo.CommitHash }}">Hugo {{ .Site.Hugo.Version }}</a>
{{ $buildCtx }}.
</p>

View file

@ -49,7 +49,7 @@ trap check_cached_webmentions EXIT
# Grab my long-lived key (password). We will use this to authenticate.
key() {
set +u
if [ -n "$BUILD_SUBMITTER" ]; then
if [ -n "$JOB_URL" ]; then
cat ~/.webmentiond-key
else
pash show webmentiond-ci-key