mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-25 07:48:52 +00:00
Commit first draft of schema.org structured data
This commit is contained in:
+2
-2
@@ -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>
|
||||
@@ -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" . -}}
|
||||
|
||||
Reference in New Issue
Block a user