1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-30 15:22:09 +00:00

Microdata: add itemid attributes

This commit is contained in:
Rohan Kumar 2022-05-06 10:33:42 -07:00
parent 372589a57a
commit f5f0785e65
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 7 additions and 5 deletions

View file

@ -8,7 +8,7 @@ sitemap:
- ChangeFreq: weekly - ChangeFreq: weekly
- Priority: 0.9 - Priority: 0.9
--- ---
<div itemprop="author" itemscope itemtype="https://schema.org/Person" class="p-author author h-card vcard"> <div itemprop="author" itemscope itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="p-author author h-card vcard" id="seirdy">
Seirdy's Home Seirdy's Home
============= =============

View file

@ -1,5 +1,6 @@
{{ define "main" }} {{ define "main" }}
<main itemprop="mainEntity" itemscope itemtype="https://schema.org/Article"> {{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
<main itemprop="mainEntity" itemscope itemtype="https://schema.org/Article" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
{{ partial "full-article.html" . }} {{ partial "full-article.html" . }}
</main> </main>
{{ end }} {{ end }}

View file

@ -9,4 +9,4 @@ Posted <time itemprop="dateCreated datePublished" class="dt-published published"
<span itemprop="wordCount">{{ .WordCount }}</span> words <span itemprop="wordCount">{{ .WordCount }}</span> words
{{- with .ReadingTime }}, {{- with .ReadingTime }},
a{{ if hasPrefix (string .) "8" }}n{{ end }} a{{ if hasPrefix (string .) "8" }}n{{ end }}
<span itemprop="timeRequired" content="PT{{ . }}M">{{ . }} minute</span> read{{- end }} <time itemprop="timeRequired" datetime="PT{{ . }}M">{{ . }} minute</time> read{{- end }}

View file

@ -1,6 +1,7 @@
{{- define "main" -}} {{- define "main" -}}
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
{{- .Scratch.Set "codeIndex" 1 -}} {{- .Scratch.Set "codeIndex" 1 -}}
<main itemprop="blogPost mainEntity" itemscope itemtype="https://schema.org/BlogPosting"> <main itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
{{ partial "full-article.html" . }} {{ partial "full-article.html" . }}
{{ partial "webmentions.html" . }} {{ partial "webmentions.html" . }}
</main> </main>

View file

@ -23,7 +23,7 @@
(btw this is all made of <span> cuz it is supposed to be inline) (btw this is all made of <span> cuz it is supposed to be inline)
--> -->
<span itemprop="author" itemscope itemtype="https://schema.org/Person" class="h-card p-author author vcard"> <span itemprop="author" itemscope itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
<a itemprop="url" href="https://seirdy.one" rel="author home cc:attributionURL" class="u-url url" property="cc:attributionName"> <a itemprop="url" href="https://seirdy.one" rel="author home cc:attributionURL" class="u-url url" property="cc:attributionName">
{{ partial "indieweb-icon.html" }} {{ partial "indieweb-icon.html" }}
<span itemprop="name" class="p-name fn n"> <span itemprop="name" class="p-name fn n">