mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-14 01:32:11 +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" }}
|
{{ 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>
|
<h1 id="bookmarks" class="p-name" itemprop="name headline">My book­marks</h1>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
<p role="doc-tip">
|
<p role="doc-tip">
|
||||||
|
@ -9,17 +9,18 @@
|
||||||
{{ $bookmarks := getJSON "https://seirdy.one/data/bookmarks.json" -}}
|
{{ $bookmarks := getJSON "https://seirdy.one/data/bookmarks.json" -}}
|
||||||
{{ range sort $bookmarks "tags" "desc" -}}
|
{{ range sort $bookmarks "tags" "desc" -}}
|
||||||
{{ $bookmark := . -}}
|
{{ $bookmark := . -}}
|
||||||
<li>
|
{{- $tags := split $bookmark.tags "," -}}
|
||||||
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/SocialMediaPosting https://schema.org/DataFeedItem">
|
{{- $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-->
|
<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">
|
<h2 itemprop="sharedContent" itemscope itemtype="https://schema.org/WebPage" class="p-name">
|
||||||
<a itemprop="url" href="{{ $bookmark.uri }}" class="u-bookmark-of h-cite">
|
<a itemprop="url" href="{{ $bookmark.uri }}" class="u-bookmark-of h-cite">
|
||||||
<span itemprop="headline">{{ $bookmark.title | replaceRE `Defunctionalisation` `Defunction­alisation` | safeHTML }}</span>
|
<span itemprop="headline">{{ $bookmark.title | replaceRE `Defunctionalisation` `Defunction­alisation` | safeHTML }}</span>
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
{{- $tags := split $bookmark.tags "," -}}
|
|
||||||
{{- $firstTag := index $tags 0 }}
|
|
||||||
{{- $timestamp := dateFormat "2006-01-02 15:04:05-0700" $firstTag }}
|
|
||||||
<p>
|
<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>
|
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">
|
<br>Tags: <span itemprop="keywords">
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- range $posts -}}
|
{{- range $posts -}}
|
||||||
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
|
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
|
||||||
<li itemprop="dataFeedElement" itemscope itemtype="https://schema.org/DataFeedItem https://schema.org/BlogPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
<li itemprop="dataFeedElement" itemscope itemtype="https://schema.org/DataFeedItem">
|
||||||
<article class="h-entry hentry">
|
<article class="h-entry hentry" itemprop="item" itemscope itemtype="https://schema.org/BlogPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||||
{{ if $isStandalone -}}
|
{{ if $isStandalone -}}
|
||||||
<h2
|
<h2
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
|
|
Loading…
Reference in a new issue