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

Fix skipped heading level

This commit is contained in:
Rohan Kumar 2022-04-25 08:54:42 -07:00
parent de526ce75c
commit 87a89ce514
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 13 additions and 4 deletions

View file

@ -10,11 +10,11 @@
<li>
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/SocialMediaPosting https://schema.org/DataFeedItem">
<meta itemprop="headline" content="{{ $bookmark.title }}"> <!--Just because we can't have one headline refer to two items-->
<h3 itemprop="sharedContent" itemscope itemtype="https://schema.org/WebPage" class="p-name">
<h2 itemprop="sharedContent" itemscope itemtype="https://schema.org/WebPage" class="p-name">
<a itemprop="url" href="{{ $bookmark.uri }}" class="u-bookmark-of h-cite">
<span itemprop="headline">{{ $bookmark.title | replaceRE `Defunctionalisation` `Defunction&shy;alisation` | safeHTML }}</span>
</a>
</h3>
</h2>
{{- $tags := split $bookmark.tags "," -}}
{{- $firstTag := index $tags 0 }}
{{- $timestamp := dateFormat "2006-01-02 15:04:05-0700" $firstTag }}

View file

@ -1,5 +1,5 @@
{{ $isStandalone := false }}
{{ if eq .RelPermalink "/posts.html" -}}
{{ if ne .Permalink .Site.BaseURL -}}
{{ $isStandalone = true }}
{{ end }}
<section class="h-feed hfeed" itemscope itemtype="https://schema.org/{{ if $isStandalone }}Complete{{ end }}DataFeed">
@ -16,11 +16,20 @@
{{- if or ($isStandalone) (.Params.featured) -}}
<li>
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/BlogPosting https://schema.org/DataFeedItem">
<h3 itemprop="name headline" class="p-name entry-title">
{{ if $isStandalone }}
<h2
{{ else }}
<h3
{{ end }}
itemprop="name headline" class="p-name entry-title">
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
{{ .Title -}}
</a>
{{ if $isStandalone }}
</h2>
{{ else }}
</h3>
{{ end }}
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>, updated
<time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>