diff options
author | Fabian Tamp <fabian.tamp@gmail.com> | 2020-08-18 23:31:17 +0300 |
---|---|---|
committer | Fabian Tamp <fabian.tamp@gmail.com> | 2020-08-18 23:31:17 +0300 |
commit | 08ed3d9a5b5ec37afb1c7f0f45ee10d6976da3f1 (patch) | |
tree | 27d4121433c9e1a179f336bc08288efe6144ed8a | |
parent | a276dcdce94d64c02484759162272cabf475ff2c (diff) |
Readd schema.org
-rw-r--r-- | layouts/posts/single.html | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 50b74a0..27909d9 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -1,11 +1,8 @@ -{{ define "body-classes" }} +{{ define "body-classes" -}} {{ if .Draft }}draft{{ end }} look-sheet-bkg -{{ end }} +{{- end }} {{ define "content" }} -<meta itemprop="author" content="{{ .Site.Params.Author }}" /> -<meta itemprop="publisher" content="{{ .Site.Params.Author }}" /> -<meta itemprop="image" content="{{ partial "feature_image" . }}" /> <div class="nav-bkg"> <nav class="content-container pagewide-bar-padding"> @@ -16,7 +13,14 @@ {{ partial "right-links" . }} </nav> </div> -<section id="main" class="content-container look-sheet article-pad-v {{ if (or .Params.disableMarginNotes .Site.Params.disableMarginNotes) }}no-floating-footnotes{{ end }}" itemprop="mainEntityOfPage"> +<article + id="main" + class="content-container look-sheet article-pad-v {{ if (or .Params.disableMarginNotes .Site.Params.disableMarginNotes) }}no-floating-footnotes{{ end }}" + itemscope + itemtype="https://schema.org/Article" > + <meta itemprop="author" content="{{ .Site.Params.Author }}" /> + <meta itemprop="publisher" content="{{ .Site.Params.Author }}" /> + <meta itemprop="image" content="{{ partial "feature_image" . }}" /> <h1 itemprop="name" id="title">{{ .Title }}</h1> <meta itemprop="headline" content="{{ .Title }}" /> {{ if .Params.tags }} @@ -36,10 +40,10 @@ {{ if .Draft }} <div class="post-date">{{ .WordCount }} words</div> {{ end }} - <article itemprop="articleBody" id="content" class="article-body margin-top-2em"> + <div itemprop="articleBody" id="content" class="article-body margin-top-2em"> {{ .Content }} - </article> -</section> + </div> +</article> <!-- TODO: right now, this gets weird when there's a big title on the right. There might be better info here: https://stackoverflow.com/questions/34995740/css-when-inline-block-elements-line-break-parent-wrapper-does-not-fit-new-width and you can test on the android-development-developer-productivity article. |