Commit first draft of schema.org structured data

This commit is contained in:
Ryan Watters
2017-03-12 22:57:04 -05:00
parent bec843de86
commit 20bfa6322d
3 changed files with 25 additions and 2 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
archetypedir = "archetypes"
baseurl = "/"
baseurl = "https://hugodocs.info"
buildDrafts = false
buildFuture = false
canonifyurls = true
@@ -72,7 +72,7 @@ watch = true
defaultsocialimage = "hugodefaultsocial.png"
## Setting this to true will add a "noindex" to *every* page on the site
removefromexternalsearch = false
## This is used when the BaseURL does not need to modified (eg, in share links or in prerender, prefetch, etc to control for relativeURLs setting)
## This is used when the BaseURL does not need to modified (eg, in share links or in prerender, prefetch, etc to control for relativeURLs setting); do not include trailing slash
siteaddress = "https://hugodocs.info"
## Gh repo for site footer (include trailing slash)
ghrepo = "https://github.com/spf13/hugo/"
@@ -0,0 +1,22 @@
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "TechArticle",
{{ with .Section }}
"articleSection": "{{ . | title}}",
{{ end }}
"headline": "{{.Title}}",
"name": "{{.Title}}",
"url": "{{ .Permalink }}",
"mainEntityOfPage": "{{.Permalink}}",
"datePublished": {{.PublishDate.Format "2006-01-02"}},
"dateModified": {{.Date.Format "2006-01-02"}},
"wordCount": {{.WordCount}},
"image": {
"@type": "ImageObject",
"url": "{{.Site.Params.siteaddress}}/images/{{.Site.Params.defaultsocialimage }}",
"height": 800,
"width": 1500
}
}
</script>
+1
View File
@@ -5,6 +5,7 @@
{{- partial "head/metadata-standard.html" . -}}
{{- partial "head/metadata-twitter.html" . -}}
{{- partial "head/metadata-opengraph.html" . -}}
{{- partial "head/metadata-schemaorg.html" . -}}
{{- partial "head/metadata-favicons.html" . -}}
{{- partial "head/metadata-prefetch.html" . -}}
{{- partial "head/metadata-rss.html" . -}}