mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Fix data feeds
This commit is contained in:
parent
2204ae8861
commit
db2410ed32
2 changed files with 10 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
{{ define "main" }}
|
||||
<main class="h-feed hfeed" itemscope itemtype="https://schema.org/DataFeed">
|
||||
<main itemprop="mainEntity" class="h-feed hfeed" itemscope itemtype="https://schema.org/DataFeed">
|
||||
<h1 id="bookmarks" class="p-name" itemprop="name headline">My book­marks</h1>
|
||||
{{ .Content }}
|
||||
<p role="doc-tip">
|
||||
|
@ -9,17 +9,18 @@
|
|||
{{ $bookmarks := getJSON "https://seirdy.one/data/bookmarks.json" -}}
|
||||
{{ range sort $bookmarks "tags" "desc" -}}
|
||||
{{ $bookmark := . -}}
|
||||
<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-->
|
||||
{{- $tags := split $bookmark.tags "," -}}
|
||||
{{- $firstTag := index $tags 0 }}
|
||||
{{- $timestamp := dateFormat "2006-01-02 15:04:05-0700" $firstTag }}
|
||||
<li itemprop="dataFeedElement" itemscope itemtype="https://schema.org/DataFeedItem">
|
||||
<meta itemprop="dateCreated" content="{{ $timestamp }}"><!--Just because we can't have one timestap refer to two items-->
|
||||
<article class="h-entry hentry" itemprop="item" itemscope itemtype="https://schema.org/SocialMediaPosting">
|
||||
<meta itemprop="headline" content="{{ $bookmark.title }}"><!--Just because we can't have one headline refer to two items-->
|
||||
<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­alisation` | safeHTML }}</span>
|
||||
</a>
|
||||
</h2>
|
||||
{{- $tags := split $bookmark.tags "," -}}
|
||||
{{- $firstTag := index $tags 0 }}
|
||||
{{- $timestamp := dateFormat "2006-01-02 15:04:05-0700" $firstTag }}
|
||||
<p>
|
||||
Bookmarked on: <time class="dt-published published" itemprop="datePublished" datetime="{{ dateFormat "2006-01-02 15:04:05Z07:00" $timestamp }}">{{ dateFormat "2006-01-02 15:04" $timestamp }}</time>
|
||||
<br>Tags: <span itemprop="keywords">
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
{{- end -}}
|
||||
{{- range $posts -}}
|
||||
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
|
||||
<li itemprop="dataFeedElement" itemscope itemtype="https://schema.org/DataFeedItem https://schema.org/BlogPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||
<article class="h-entry hentry">
|
||||
<li itemprop="dataFeedElement" itemscope itemtype="https://schema.org/DataFeedItem">
|
||||
<article class="h-entry hentry" itemprop="item" itemscope itemtype="https://schema.org/BlogPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||
{{ if $isStandalone -}}
|
||||
<h2
|
||||
{{- else -}}
|
||||
|
|
Loading…
Reference in a new issue