Add h-entry and h-feed microformats

* Add h-entry microformat markup to single page template
* Add h-feed wrapper around list of articles in list template
* Add h-entry to summary template
master
Kevin C. Coram 2019-12-07 13:51:12 -05:00
parent 911f999379
commit dccbceb218
Signed by: kevin
GPG Key ID: 0342351B3D61AD35
4 changed files with 17 additions and 9 deletions

View File

@ -29,7 +29,7 @@
{{- end }}
</nav>
</header>
<main>
<main {{ if eq .Kind "page" }}class="h-entry"{{ else if eq .Kind "section" }}class="h-feed"{{ end }}>
<header>
{{- block "content-header" . -}}
{{- end -}}

View File

@ -3,10 +3,10 @@
{{ .Title }} &ndash; {{ .Site.Title }}
{{ end }}
{{ define "content-header" }}
<h1 id="title">{{ .Title }}</h1>
<h1 class="p-name">{{ .Title }}</h1>
{{ end }}
{{ define "content" }}
<header class="list-content">
<header class="list-content e-content">
{{ .Content }}
</header>
{{ range $index, $page := (.Paginate (where .Pages ".Params.hidden" "!=" "true")).Pages }}

View File

@ -3,10 +3,14 @@
{{ .Title }} &ndash; {{ .Site.Title }}
{{ end }}
{{ define "content-header" }}
<h1>{{ .Title }}</h1>
<h1 class="p-name">{{ .Title }}</h1>
<p>
Published by <a class="p-author h-card" href="{{ .Site.BaseURL }}">{{ .Site.Params.Card.Author }}</a> on
<time class="dt-published" datetime="{{ .Date }}">{{ .Date.Format "January 2, 2006" }}</time>
</p>
{{ end }}
{{ define "content" }}
<article>
<article class="e-content">
{{ .Content }}
</article>
{{ end }}

View File

@ -1,9 +1,13 @@
<article class="post">
<article class="h-entry">
<header>
<h2><a href='{{ .Permalink }}'>{{ .Title }}</a> </h2>
<div class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} Words </div>
<h2 class="p-name u-url"><a href='{{ .Permalink }}'>{{ .Title }}</a> </h2>
<p>
Published by <a class="p-author h-card" href="{{ .Site.BaseURL }}">{{ .Site.Params.Card.Author }}</a> on
<time class="dt-published" datetime="{{ .Date }}">{{ .Date.Format "January 2, 2006" }}</time>
&ndash; {{ .FuzzyWordCount }} Words
</p>
</header>
<section>
<section class="p-summary">
{{ .Summary }}
</section>
{{- if .Truncated }}