2023-10-12 20:20:41

This commit is contained in:
z17CX 2023-10-12 20:20:41 +00:00
parent 97071b9de7
commit c34052ddfc
Signed by: z17cx
GPG key ID: 3F5F87C84EE943E4
11 changed files with 44 additions and 32 deletions

View file

@ -84,8 +84,7 @@
{{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }}
{{ (partial "seo/twitter" .) }}
{{ (partial "seo/opengraph" .) }}
{{ (partial "seo/common" .) }}
{{ (partial "seo/dc" .) }}
{{ (partial "seo/schema" .) }}
{{ (partial "seo/schema/schema" .) }}
<!--[ / seo ]-->

View file

@ -0,0 +1,30 @@
{{ $description := (site.Params.description) }}
{{ with (.Summary) }}{{ $description = . }}{{ end }}
{{ with (.Description) }}{{ $description = . }}{{ end }}
{{ $image := (index (.Param "images") 0) }}
<meta property="og:locale" content="{{ ((replace (site.LanguageCode) "-" "_") | default "en_US") }}"/>
<meta property="og:site_name" content="{{ (site.Title) }}"/>
{{ if ($.IsPage) }}
<meta name="aiturec:title" content="{{ (.Title) }}"/>
<meta property="aiturec:description" content="{{ ($description) }}"/>
<meta property="aiturec:image" content="{{ ($image) }}"/>
<meta property="aiturec:item_id" content="{{ (.Param "uuid") }}"/>
<meta property="aiturec:datetime" content="{{ (.Date.Format "2006-01-02T15:04:05Z07:00") }}"/>
<meta itemprop="description" content="{{ ($description) }}"/>
<meta itemprop="image" content="{{ ($image) }}"/>
<meta property="vk:image" content="{{ ($image) }}"/>
{{ with (.GetTerms "authors") }}
{{ range . }}
<meta property="article:author" content="{{ (.Title) }}"/>
{{ end }}
{{ end }}
{{ with (.GetTerms "tags") }}
{{ range . }}
<meta property="article:tag" content="{{ (.Title) }}"/>
{{ end }}
{{ end }}
{{ end }}

View file

@ -1,15 +0,0 @@
{{ if ($.IsPage) }}
{{ with (.GetTerms "authors") }}
{{ range . }}
<meta property="article:author" content="{{ (.Title) }}"/>
{{ end }}
{{ end }}
{{ with (.GetTerms "tags") }}
{{ range . }}
<meta property="article:tag" content="{{ (.Title) }}"/>
{{ end }}
{{ end }}
{{ end }}

View file

@ -1,8 +0,0 @@
{{ (partial "seo/type/website.html" .) }}
{{ (partial "seo/type/organization.html" .) }}
{{ (partial "seo/type/navigation.html" .) }}
{{ if ($.IsPage) }}
{{ (partial "seo/type/breadcrumbList.html" .) }}
{{ (partial "seo/type/article.html" .) }}
{{ end }}

View file

@ -0,0 +1,8 @@
{{ (partial "seo/schema/type/website.html" .) }}
{{ (partial "seo/schema/type/organization.html" .) }}
{{ (partial "seo/schema/type/navigation.html" .) }}
{{ if ($.IsPage) }}
{{ (partial "seo/schema/type/breadcrumbList.html" .) }}
{{ (partial "seo/schema/type/article.html" .) }}
{{ end }}

View file

@ -1,7 +1,7 @@
{{ $date := ((.Date.UTC.Format "2006-01-02T15:04:05Z07:00") | default "") }}
{{ $datePublished := ((.PublishDate.UTC.Format "2006-01-02T15:04:05Z07:00") | default ($date)) }}
{{ $dateCreated := ((.PublishDate.UTC.Format "2006-01-02T15:04:05Z07:00") | default ($date)) }}
{{ $dateModified := ((.Lastmod.UTC.Format "2006-01-02T15:04:05Z07:00") | default ($date)) }}
{{ $date := ((.Date.Format "2006-01-02T15:04:05Z07:00") | default "") }}
{{ $datePublished := ((.PublishDate.Format "2006-01-02T15:04:05Z07:00") | default ($date)) }}
{{ $dateCreated := ((.PublishDate.Format "2006-01-02T15:04:05Z07:00") | default ($date)) }}
{{ $dateModified := ((.Lastmod.Format "2006-01-02T15:04:05Z07:00") | default ($date)) }}
{{ $description := (site.Params.description) }}
{{ with (.Summary) }}{{ $description = . }}{{ end }}

View file

@ -1,2 +0,0 @@
{{ if ($.IsPage) }}
{{ end }}