-
Notifications
You must be signed in to change notification settings - Fork 777
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix baseURL in Netlify deployments (needed to fix
twitter:image
) (#…
…3821) * Fix baseURL in Netlify deployments (needed to fix `twitter:image`) Signed-off-by: Mathew Wicks <[email protected]> * Fix `netlify-plugin-checklinks` failing Signed-off-by: Mathew Wicks <[email protected]> * Ensure social meta tags are ordered correctly Signed-off-by: Mathew Wicks <[email protected]> * Fix malformatted LD+JSON schema Signed-off-by: Mathew Wicks <[email protected]> * Add Twitter account for meta tags Signed-off-by: Mathew Wicks <[email protected]> * Fix missing descriptions on LD+JSON + prevent 404 page Signed-off-by: Mathew Wicks <[email protected]> --------- Signed-off-by: Mathew Wicks <[email protected]>
- Loading branch information
1 parent
2554073
commit fff5659
Showing
5 changed files
with
78 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,46 @@ | ||
{{- if and (not .IsHome) .File }} | ||
<script type="application/ld+json"> | ||
[ | ||
{ | ||
"@context" : "http://schema.org", | ||
"@type" : "WebSite", | ||
"mainEntityOfPage": { | ||
"@type": "WebPage", | ||
"@id": "{{ .Site.BaseURL }}" | ||
}, | ||
"articleSection" : "{{ .Section }}", | ||
"name" : "{{ .Title }}", | ||
"headline" : "{{ .Title }}", | ||
"description" : "{{ if .Description }}{{ .Description }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}", | ||
"@type" : "Article", | ||
"articleSection" : {{ .Section }}, | ||
"name" : {{ .Title }}, | ||
"headline" : {{ .Title }}, | ||
{{- if .Description }} | ||
"description" : {{ .Description }}, | ||
{{- else if .IsPage }} | ||
"description" : {{ .Summary }}, | ||
{{- end }} | ||
"inLanguage" : "en-US", | ||
"author" : "{{ range .Site.Author }}{{ . }}{{ end }}", | ||
"creator" : "{{ range .Site.Author }}{{ . }}{{ end }}", | ||
"publisher": "{{ range .Site.Author }}{{ . }}{{ end }}", | ||
"accountablePerson" : "{{ range .Site.Author }}{{ . }}{{ end }}", | ||
"copyrightHolder" : "{{ range .Site.Author }}{{ . }}{{ end }}", | ||
"copyrightYear" : "{{ .Date.Format "2006" }}", | ||
"datePublished": "{{ .Date }}", | ||
"dateModified" : "{{ .Date }}", | ||
"url" : "{{ .Permalink }}", | ||
"wordCount" : "{{ .WordCount }}", | ||
"copyrightHolder" : {{ .Site.Param "copyright" }}, | ||
"copyrightYear" : {{ .Lastmod.Year }}, | ||
"dateModified" : {{ .Lastmod }}, | ||
"url" : {{ .Permalink }}, | ||
"wordCount" : {{ .WordCount }}, | ||
"keywords" : [ {{ if isset .Params "tags" }}{{ range .Params.tags }}"{{ . }}",{{ end }}{{ end }}"Kubeflow" ] | ||
} | ||
</script> | ||
{{- if gt (len .Ancestors) 1 }}, | ||
{ | ||
"@context" : "http://schema.org", | ||
"@type" : "BreadcrumbList", | ||
"itemListElement" : [ | ||
{{- $finalIndex := sub (len .Ancestors) 1 }} | ||
{{- range $index, $item := .Ancestors.Reverse }} | ||
{{- if gt $index 0 }} | ||
{ | ||
"@type" : "ListItem", | ||
"position" : {{ $index }}, | ||
"item" : { | ||
"@id" : {{ $item.Permalink }}, | ||
"name" : {{ $item.Title }} | ||
} | ||
}{{ if ne $index $finalIndex }},{{ end }} | ||
{{- end }} | ||
{{- end }} | ||
] | ||
} | ||
{{- end }} | ||
] | ||
</script> | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters