1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 08:55:32 -04:00

fingerprint CSS and JS, set one week browser cache

...and LOTS of tidying partials
This commit is contained in:
2020-04-25 11:15:31 -04:00
parent d2648a68be
commit adfa73b5fc
25 changed files with 86 additions and 110 deletions

View File

@@ -0,0 +1,35 @@
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"url": {{ with .OutputFormats.Get "html" }}{{ .Permalink }}{{ end }},
"mainEntityOfPage": {{ with .OutputFormats.Get "html" }}{{ .Permalink }}{{ end }},
"name": {{ .Title }},
"headline": {{ .Title }},
"datePublished": {{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }},
"dateModified": {{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }},
"keywords": {{ with .Params.tags }}{{ delimit . ", " }}{{ end }},
"description": {{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }},
"wordCount": "{{ .WordCount }}",
"author": {
"@id": {{ path.Join .Site.BaseURL "#author" }}
},
"publisher": {
"@type": "Organization",
"name": {{ .Site.Title }},
"url": {{ .Site.BaseURL }},
"logo": {
"@type": "ImageObject",
"url": {{ .Scratch.Get "logoImage_url" | absURL }},
"width": "{{ .Scratch.Get "logoImage_width" }}",
"height": "{{ .Scratch.Get "logoImage_height" }}"
}
},
"image": {
"@type": "ImageObject",
"url": {{ .Scratch.Get "socialImage_url" | absURL }},
"width": "{{ .Scratch.Get "socialImage_width" }}",
"height": "{{ .Scratch.Get "socialImage_height" }}"
}
}
</script>

View File

@@ -0,0 +1,28 @@
{{- with .Site.Author -}}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Person",
"@id": {{ path.Join $.Site.BaseURL "#author" }},
"name": {{ .name }},
"url": {{ $.Site.BaseURL }},
"description": {{ $.Site.Params.description }},
{{ with .jobtitle }}"jobTitle": {{ . }},{{ end }}
"image": {
"@type": "ImageObject",
"url": {{ $.Scratch.Get "defaultImage_url" | absURL }},
"width": "{{ $.Scratch.Get "defaultImage_width" }}",
"height": "{{ $.Scratch.Get "defaultImage_height" }}"
},
"sameAs": [
{{ $.Site.BaseURL }},
{{ with .github }}{{ printf "%s%s" "https://github.com/" . }},{{ end }}
{{ with .twitter }}{{ printf "%s%s" "https://twitter.com/" . }},{{ end }}
{{ with .linkedin }}{{ printf "%s%s%s" "https://www.linkedin.com/in/" . "/" }},{{ end }}
{{ with .facebook }}{{ printf "%s%s" "https://www.facebook.com/" . }},{{ end }}
{{ with .instagram }}{{ printf "%s%s%s" "https://www.instagram.com/" . "/" }},{{ end }}
{{ with .mastodon }}{{ printf "%s%s" "https://" . }}{{ end }}
]
}
</script>
{{- end -}}