mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 12:52:10 +00:00
Add u-syndication, clean up interactions
Add a new "Interactions" section to my pages that contain both Syndication and Webmentions. Make the Syndication links u-syndication. Make both these things children of the <article> h-entry.
This commit is contained in:
parent
5037e399d1
commit
36c049d0ef
8 changed files with 137 additions and 106 deletions
|
@ -6,7 +6,15 @@ replyTitle: "Maintaining a blog is probably the best method I have found to hono
|
|||
replyType: "SocialMediaPosting"
|
||||
replyAuthor: "Adrian Rosell"
|
||||
replyAuthorURI: "https://adrianroselli.com/"
|
||||
syndicatedCopies:
|
||||
- title: 'The Fediverse'
|
||||
url: 'https://pleroma.envs.net/notice/APnxPeFcKz4HvBrckS'
|
||||
- title: 'IndieNews'
|
||||
url: 'https://news.indieweb.org/en'
|
||||
- title: 'IndieForums'
|
||||
url: 'https://www.indieforums.net'
|
||||
---
|
||||
The "Don't Repeat Yourself" (<abbr>DRY</abbr>) principle is my main motivation for adding content to my site---especially to [my "notes" section]({{<relref "/notes">}}). I've gone as far as linking my own website in online class discussions (not as a citation; just for <abbr>DRY</abbr>).
|
||||
|
||||
This also combines really well with the [Publish on your Own Site, Syndicate Elsewhere](https://indieweb.org/POSSE) (<abbr>POSSE</abbr>) principle. Often, a post of mine syndicates well to multiple destinations. I might reply to a forum on my site and syndicate it to both that forum and to the Fediverse. People reply in both places, and Webmentions aggregate them together on my site (though I often have to send myself those mentions). I only have to write something once.
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
||||
<main
|
||||
itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Article" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||
<article class="h-entry hentry">
|
||||
{{ partial "full-article.html" . }}
|
||||
{{ partial "webmentions.html" . }}
|
||||
{{ partial "interact.html" . }}
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
<main
|
||||
itemprop="hasPart" itemscope="" itemtype="https://schema.org/SocialMediaPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||
<link itemprop="isPartOf" href="{{ .Site.Params.CanonicalBaseURL }}/" />
|
||||
<article class="h-entry hentry">
|
||||
{{ partial "full-article.html" . }}
|
||||
{{ partial "webmentions.html" . }}
|
||||
{{ partial "interact.html" . }}
|
||||
</article>
|
||||
</main>
|
||||
{{ partial "prev-next.html" . -}}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<article class="h-entry hentry"><!--Once WAI-ARIA 1.3 gains traction, I'll add aria-details for webmentions.-->
|
||||
<header>
|
||||
<h1 itemprop="name headline" class="p-name entry-title" id="h1" tabindex="-1">{{ .Title }}</h1>
|
||||
{{- if not .Params.disableMeta -}}
|
||||
|
@ -14,4 +13,3 @@
|
|||
{{- end -}}
|
||||
{{- partial "processed-content" . -}}
|
||||
</div>
|
||||
</article>
|
||||
|
|
7
layouts/partials/interact.html
Normal file
7
layouts/partials/interact.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<hr />
|
||||
<footer aria-labelledby="interact">
|
||||
<h2 id="interact" tabindex="-1">Interact</h2>
|
||||
<p>You can interact by <a href="#webmentions">sending webmentions</a> or by visiting a syndicated copy of this post.</p>
|
||||
{{- partial "syndication.html" . -}}
|
||||
{{- partial "webmentions.html" . -}}
|
||||
</footer>
|
15
layouts/partials/syndication.html
Normal file
15
layouts/partials/syndication.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{ with .Params.syndicatedCopies }}
|
||||
<h3>Syndication</h3>
|
||||
<p>This post has been syndicated to:</p>
|
||||
<ul>
|
||||
{{- range . -}}
|
||||
{{- $type := "SocialMediaPosting" -}}
|
||||
{{- with ".type" -}}
|
||||
{{- $type = . -}}
|
||||
{{- end }}
|
||||
<li>
|
||||
<a itemprop="discussionUrl" class="u-syndication" rel="syndication" href="{{ .url }}">{{ .title }}</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
|
@ -4,9 +4,7 @@
|
|||
{{- range $i, $r := (getCSV "," "/csv/rewrites.csv") -}}
|
||||
{{- $rewritesDict = merge $rewritesDict (dict (index $r 0) (index $r 1)) -}}
|
||||
{{- end -}}
|
||||
<hr />
|
||||
<section aria-labelledby="webmentions" data-nosnippet=""><!--data-nosnippet means this content shouldn't be used for url summaries in search engines.-->
|
||||
<h2 id="webmentions" tabindex="-1">Web­mentions</h2>
|
||||
<h3 id="webmentions" tabindex="-1">Web­mentions</h3>
|
||||
<p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>, a backlink-based alternative to traditional comment forms.</p>
|
||||
{{ partial "webmention-form.html" . }}
|
||||
{{- $target := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
||||
|
@ -103,4 +101,3 @@
|
|||
<p>This post does not have any approved Webmentions yet.</p>
|
||||
{{- end }}
|
||||
<p>Feel free to contact me directly with feedback; <a href="{{ .Site.BaseURL }}about/#location-seirdy-online">here’s my contact info</a></p>
|
||||
</section>
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
<main
|
||||
itemprop="mainEntity" itemscope="" itemtype="https://schema.org/BlogPosting{{ with .Params.articleType }} https://schema.org/{{ . }}{{ end }}" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||
<link itemprop="isPartOf" href="{{ .Site.Params.CanonicalBaseURL }}/" />
|
||||
<article class="h-entry hentry">
|
||||
{{ partial "full-article.html" . }}
|
||||
{{ partial "webmentions.html" . }}
|
||||
{{ partial "interact.html" . }}
|
||||
</article>
|
||||
</main>
|
||||
{{ partial "prev-next.html" . -}}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue