diff options
author | Mateja <mail@matejamaric.com> | 2021-01-29 16:17:09 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-01-29 16:17:09 +0100 |
commit | dfce7e8e7a7ea9120ea18f5b50643dc12aaec331 (patch) | |
tree | dbe794088cf2b8e378aebe4ce624df90f98674e9 /layouts | |
parent | efa71ff90fb0fe6727d9b2fc2cb496a1ea514951 (diff) | |
download | blog-dfce7e8e7a7ea9120ea18f5b50643dc12aaec331.tar.gz blog-dfce7e8e7a7ea9120ea18f5b50643dc12aaec331.zip |
Using Schema.org microdata.
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 8 | ||||
-rw-r--r-- | layouts/blog/single.html | 18 |
2 files changed, 15 insertions, 11 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 4a0c152..56e582c 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,17 +5,9 @@ <meta name="yandex-xverification" content="fc9dd63070a12909"> <meta charset="UTF-8" /> <meta author="Mateja Maric" /> - {{ if .Description }} <meta name="description" content="{{ .Description }}"> {{ end }} - {{ if .PublishDate }} - <meta property="article:published_time" content="{{ .Date.Format `2006-01-02T15:04:05Z0700` }}" /> - {{ end }} - {{ if .Lastmod }} - <meta property="article:modified_time" content="{{ .Lastmod.Format `2006-01-02T15:04:05Z0700` }}" /> - {{ end }} - <link rel="canonical" href="{{ .Permalink }}" /> <meta name="viewport" content="width=device-width initial-scale=1.0" /> <link href="/style.css" rel="stylesheet" type="text/css" /> diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 4db531d..50ec4d8 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -1,7 +1,19 @@ {{ define "main" }} -<h1>{{ .Title }}</h1> +<div itemscope itemtype="http://schema.org/Article"> + <h1 itemprop="headline">{{ .Title }}</h1> -<em>{{ .Date.Format "2 Jan 2006" }}</em> + <em> + Published: + <time itemprop="dateCreated" datetime="{{ .Date.Format `2006-01-02` }}">{{ .Date.Format "2 Jan 2006" }}</time> + {{ if not (eq .Lastmod .Date) }} + <br>Modified: + <time itemprop="dateModified" + datetime="{{ .Lastmod.Format `2006-01-02` }}">{{ .Lastmod.Format "2 Jan 2006" }}</time> + {{ end }} + </em> -{{ .Content }} + <div itemprop="articleBody"> + {{ .Content }} + </div> +</div> {{ end }} |