mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-25 06:20:40 +00:00
cleaup
This commit is contained in:
parent
07f124360d
commit
fd7c3a72c1
@ -119,7 +119,7 @@ enableGitInfo = true
|
|||||||
# (Optional, default true) Copy anchor url to clipboard on click.
|
# (Optional, default true) Copy anchor url to clipboard on click.
|
||||||
geekblogAnchorCopy = true
|
geekblogAnchorCopy = true
|
||||||
|
|
||||||
# (Optional, default none) Sites main author, used for the site author filed in Atom feeds.
|
# (Optional, default none) Sites main author.
|
||||||
geekblogAuthor = "john-doe"
|
geekblogAuthor = "john-doe"
|
||||||
|
|
||||||
# (Optional, default none) Adds a "Hosted on <provider>" line to the footer.
|
# (Optional, default none) Adds a "Hosted on <provider>" line to the footer.
|
||||||
@ -230,7 +230,7 @@ params:
|
|||||||
# (Optional, default true) Copy anchor url to clipboard on click.
|
# (Optional, default true) Copy anchor url to clipboard on click.
|
||||||
geekblogAnchorCopy: true
|
geekblogAnchorCopy: true
|
||||||
|
|
||||||
# (Optional, default none) Sites main author, used for the site author filed in Atom feeds.
|
# (Optional, default none) Sites main author.
|
||||||
geekblogAuthor: john-doe
|
geekblogAuthor: john-doe
|
||||||
|
|
||||||
# (Optional, default none) Adds a "Hosted on <provider>" line to the footer.
|
# (Optional, default none) Adds a "Hosted on <provider>" line to the footer.
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
{{ $description := default (default .Site.Title .Site.Params.description) (default .Summary .Description) }}
|
{{ $description := default (default .Site.Title .Site.Params.description) (default .Summary .Description) }}
|
||||||
{{ $keywords := default .Site.Params.Keywords .Keywords }}
|
{{ $keywords := default .Site.Params.Keywords .Keywords }}
|
||||||
{{ $author := default (slice .Site.Params.GeekblogAuthor) .Params.authors }}
|
{{ $author := default (slice .Site.Params.GeekblogAuthor) .Params.authors }}
|
||||||
|
|
||||||
{{ with $description }}
|
{{ with $description }}
|
||||||
<meta name="description" content="{{ . }}">
|
<meta name="description" content="{{ . }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with $keywords }}
|
{{ with $keywords }}
|
||||||
<meta name="keywords" content="{{ delimit . "," }}">
|
<meta name="keywords" content="{{ delimit . "," }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with $author }}
|
{{ with $author }}
|
||||||
{{ $authors := slice }}
|
{{ $authors := slice }}
|
||||||
|
@ -5,6 +5,4 @@
|
|||||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ "<!--" | safeHTML }}
|
{{ printf "<!-- %s -->" "Made with Geekblog theme https://github.com/xoxys/hugo-geekblog" | safeHTML }}
|
||||||
Made with Geekblog theme https://github.com/xoxys/hugo-geekblog
|
|
||||||
{{- "-->" | safeHTML }}
|
|
||||||
|
@ -8,13 +8,19 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
"name": "{{ .Site.Title }}",
|
"name": "{{ .Site.Title }}",
|
||||||
"url": "{{ .Site.BaseURL }}",
|
"url": "{{ .Site.BaseURL }}",
|
||||||
"description": "{{ .Site.Params.description }}",
|
{{- with .Site.Params.description }}
|
||||||
"thumbnailUrl": "{{ (default "brand.svg" .Site.Params.logo) | absURL }}"{{ with .Site.Params.GeekblogContentLicense }},
|
"description": "{{ . }}",
|
||||||
"license": "{{ .name }}"{{ end }}
|
{{- end }}
|
||||||
|
"thumbnailUrl": "{{ (default "brand.svg" .Site.Params.logo) | absURL }}"
|
||||||
|
{{- with .Site.Params.GeekblogContentLicense }},
|
||||||
|
"license": "{{ .name }}"
|
||||||
|
{{- end }}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{ else if .IsPage }}
|
{{ else if .IsPage }}
|
||||||
{{ $authors := default (slice .Site.Params.GeekblogAuthor) .Params.authors }}
|
{{ $authors := default (slice .Site.Params.GeekblogAuthor) .Params.authors }}
|
||||||
|
{{ $images := default (slice (default "brand.svg" .Site.Params.logo)) .Params.images }}
|
||||||
|
{{ $description := default .Site.Params.description (default .Description .Summary) }}
|
||||||
{{ $ac := 0 }}
|
{{ $ac := 0 }}
|
||||||
{{ $ac_max := default 0 (len $authors) }}
|
{{ $ac_max := default 0 (len $authors) }}
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
@ -25,15 +31,17 @@
|
|||||||
"name": "{{ .Title | safeJS }}",
|
"name": "{{ .Title | safeJS }}",
|
||||||
"headline": "{{ .Title | safeJS }}",
|
"headline": "{{ .Title | safeJS }}",
|
||||||
"alternativeHeadline": "{{ .Params.lead }}",
|
"alternativeHeadline": "{{ .Params.lead }}",
|
||||||
"description": "{{ if .Description }}{{ .Description | safeJS }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}",
|
{{- with $description }}
|
||||||
|
"description": "{{ . }}",
|
||||||
|
{{- end }}
|
||||||
"inLanguage": {{ .Site.Language.Lang }},
|
"inLanguage": {{ .Site.Language.Lang }},
|
||||||
"isFamilyFriendly": "true",
|
"isFamilyFriendly": "true",
|
||||||
"mainEntityOfPage": {
|
"mainEntityOfPage": {
|
||||||
"@type": "WebPage",
|
"@type": "WebPage",
|
||||||
"@id": "{{ .Permalink }}"
|
"@id": "{{ .Permalink }}"
|
||||||
},
|
},
|
||||||
|
{{- with $authors }}
|
||||||
"author" : [
|
"author" : [
|
||||||
{{- with $authors -}}
|
|
||||||
{{- range sort . }}
|
{{- range sort . }}
|
||||||
{{- $ac = (add $ac 1) }}
|
{{- $ac = (add $ac 1) }}
|
||||||
{{- $author := index $.Site.Data.authors . }}
|
{{- $author := index $.Site.Data.authors . }}
|
||||||
@ -41,9 +49,9 @@
|
|||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"name": "{{ $author.name }}"
|
"name": "{{ $author.name }}"
|
||||||
}{{ if lt $ac $ac_max }},{{ end }}
|
}{{ if lt $ac $ac_max }},{{ end }}
|
||||||
{{- end -}}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
],
|
],
|
||||||
|
{{- end }}
|
||||||
"copyrightHolder" : "{{ .Site.Title }}",
|
"copyrightHolder" : "{{ .Site.Title }}",
|
||||||
"copyrightYear" : "{{ .Date.Format "2006" }}",
|
"copyrightYear" : "{{ .Date.Format "2006" }}",
|
||||||
"dateCreated": "{{ .Date.Format "2006-01-02T15:04:05.00Z" | safeJS }}",
|
"dateCreated": "{{ .Date.Format "2006-01-02T15:04:05.00Z" | safeJS }}",
|
||||||
@ -60,10 +68,10 @@
|
|||||||
"height":"32"
|
"height":"32"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"image": {{ if .Params.images }}[{{ range $i, $e := .Params.images }}{{ if $i }}, {{ end }}{{ $e | absURL }}{{ end }}]{{ else}}{{.Site.Params.logo | absURL }}{{ end }},
|
"image": [{{ range $i, $image := $images }}{{ if $i }}, {{ end }}{{ $image | absURL }}{{ end }}],
|
||||||
"url" : "{{ .Permalink }}",
|
"url" : "{{ .Permalink }}",
|
||||||
"wordCount" : "{{ .WordCount }}",
|
"wordCount" : "{{ .WordCount }}",
|
||||||
"genre" : [ {{ range $index, $tag := .Params.tags }}{{ if $index }}, {{ end }}"{{ $tag }}" {{ end }}]
|
"genre" : [ {{ range $i, $tag := .Params.tags }}{{ if $i }}, {{ end }}"{{ $tag }}" {{ end }}]
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user