summaryrefslogtreecommitdiff
path: root/layouts/blog
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-01-29 16:17:09 +0100
committerMateja <mail@matejamaric.com>2021-01-29 16:17:09 +0100
commitdfce7e8e7a7ea9120ea18f5b50643dc12aaec331 (patch)
treedbe794088cf2b8e378aebe4ce624df90f98674e9 /layouts/blog
parentefa71ff90fb0fe6727d9b2fc2cb496a1ea514951 (diff)
downloadblog-dfce7e8e7a7ea9120ea18f5b50643dc12aaec331.tar.gz
blog-dfce7e8e7a7ea9120ea18f5b50643dc12aaec331.zip
Using Schema.org microdata.
Diffstat (limited to 'layouts/blog')
-rw-r--r--layouts/blog/single.html18
1 files changed, 15 insertions, 3 deletions
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 }}