Alternative content (RSS, (offline) JSON), social media partial

This commit is contained in:
Franz Klotsche
2025-11-19 11:16:40 +01:00
parent 1c9e04e308
commit dc0b5d8cfc
15 changed files with 501 additions and 17 deletions

View File

@@ -1,3 +1,5 @@
<footer>
<small>Copyright {{now.Format "2006"}} Me.</small>
<small>Copyright {{now.Format "2006"}} {{ .Site.Params.author }} -
Find me on: {{- partial "social-media.html" . -}}
</small>
</footer>

View File

@@ -1,7 +1,9 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta lang="de"> <!-- HowTo correct?-->
<meta name="author" content="{{ .Site.Params.author }}">
<meta name="keywords" content="{{ delimit .Keywords `, ` `, und ` }}">
<meta name="description" content="
{{- with .Page.Description -}}
{{ . }}
@@ -10,6 +12,17 @@
{{- end -}}">
<link rel="stylesheet" href="{{ "css/style.css"
| relURL }}">
<!-- RSS -->
{{ range .AlternativeOutputFormats -}}
{{- $link := `<link rel="%s" type="%s" href="%s" title="%s">` -}}
{{- $title := printf "%s - %s" $.Page.Title $.Site.Title -}}
{{- if $.Page.IsHome -}}
{{ $title = $.Site.Title }}
{{- end -}}
{{ printf $link .Rel .MediaType.Type .Permalink $title | safeHTML }}
{{- end }}
<title>
{{- if .Page.IsHome -}}
{{ .Site.Title }}

View File

@@ -0,0 +1,5 @@
<ul>
{{ range .Site.Data.socialmedia.accounts }}
<li><a href="{{ .url }}">{{ .name }}</a></li>
{{ end }}
</ul>

View File

@@ -0,0 +1,12 @@
{
"projects": [
{{- range $index, $page := (where .Site.RegularPages "Type" "in" "projects") }}
{{- if $index -}} , {{- end }}
{
"url": {{ .Permalink | jsonify }},
"title": {{ .Title | jsonify }},
"keywords": {{ delimit .Keywords ", " | jsonify }}
}
{{- end }}
]
}

View File

@@ -11,8 +11,15 @@ nav {
display: flex;
flex-direction: column;
}
nav > a {
footer li, footer ul {
display: inline;
margin: 0;
padding: 0;
}
footer li::after {
content: " | "
}
nav > a, footer a {
flex: 1;
text-align: center;
text-decoration: none;