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:
35
layouts/partials/head/schema/article.html
Normal file
35
layouts/partials/head/schema/article.html
Normal 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>
|
28
layouts/partials/head/schema/person.html
Normal file
28
layouts/partials/head/schema/person.html
Normal 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 -}}
|
Reference in New Issue
Block a user