Alternative content (RSS, (offline) JSON), social media partial
This commit is contained in:
@@ -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>
|
||||
@@ -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 }}
|
||||
|
||||
5
themes/basic/layouts/partials/social-media.html
Normal file
5
themes/basic/layouts/partials/social-media.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<ul>
|
||||
{{ range .Site.Data.socialmedia.accounts }}
|
||||
<li><a href="{{ .url }}">{{ .name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
12
themes/basic/layouts/projects/list.json
Normal file
12
themes/basic/layouts/projects/list.json
Normal 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 }}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user