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

Compare commits

...

2 commits

Author SHA1 Message Date
Rohan Kumar
9ae8d87908
Fix build info hyperlink escaping 2023-11-27 19:48:07 -08:00
Rohan Kumar
76a18c2541
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.
2023-11-27 19:38:56 -08:00
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 = printf `<a href="%s">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