1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02: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:
Rohan Kumar 2022-11-20 13:26:57 -08:00
parent 5037e399d1
commit 36c049d0ef
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
8 changed files with 137 additions and 106 deletions

View file

@ -6,7 +6,15 @@ replyTitle: "Maintaining a blog is probably the best method I have found to hono
replyType: "SocialMediaPosting" replyType: "SocialMediaPosting"
replyAuthor: "Adrian Rosell" replyAuthor: "Adrian Rosell"
replyAuthorURI: "https://adrianroselli.com/" 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>). 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. 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.

View file

@ -2,7 +2,9 @@
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }} {{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
<main <main
itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Article" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}"> itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Article" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
<article class="h-entry hentry">
{{ partial "full-article.html" . }} {{ partial "full-article.html" . }}
{{ partial "webmentions.html" . }} {{ partial "interact.html" . }}
</article>
</main> </main>
{{ end }} {{ end }}

View file

@ -3,8 +3,10 @@
<main <main
itemprop="hasPart" itemscope="" itemtype="https://schema.org/SocialMediaPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}"> itemprop="hasPart" itemscope="" itemtype="https://schema.org/SocialMediaPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
<link itemprop="isPartOf" href="{{ .Site.Params.CanonicalBaseURL }}/" /> <link itemprop="isPartOf" href="{{ .Site.Params.CanonicalBaseURL }}/" />
<article class="h-entry hentry">
{{ partial "full-article.html" . }} {{ partial "full-article.html" . }}
{{ partial "webmentions.html" . }} {{ partial "interact.html" . }}
</article>
</main> </main>
{{ partial "prev-next.html" . -}} {{ partial "prev-next.html" . -}}
{{- end }} {{- end }}

View file

@ -1,4 +1,3 @@
<article class="h-entry hentry"><!--Once WAI-ARIA 1.3 gains traction, I'll add aria-details for webmentions.-->
<header> <header>
<h1 itemprop="name headline" class="p-name entry-title" id="h1" tabindex="-1">{{ .Title }}</h1> <h1 itemprop="name headline" class="p-name entry-title" id="h1" tabindex="-1">{{ .Title }}</h1>
{{- if not .Params.disableMeta -}} {{- if not .Params.disableMeta -}}
@ -14,4 +13,3 @@
{{- end -}} {{- end -}}
{{- partial "processed-content" . -}} {{- partial "processed-content" . -}}
</div> </div>
</article>

View 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>

View 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 -}}

View file

@ -4,9 +4,7 @@
{{- range $i, $r := (getCSV "," "/csv/rewrites.csv") -}} {{- range $i, $r := (getCSV "," "/csv/rewrites.csv") -}}
{{- $rewritesDict = merge $rewritesDict (dict (index $r 0) (index $r 1)) -}} {{- $rewritesDict = merge $rewritesDict (dict (index $r 0) (index $r 1)) -}}
{{- end -}} {{- end -}}
<hr /> <h3 id="webmentions" tabindex="-1">Web&#173;mentions</h3>
<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&#173;mentions</h2>
<p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>, a backlink-based alternative to traditional comment forms.</p> <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" . }} {{ partial "webmention-form.html" . }}
{{- $target := .RelPermalink | replaceRE "^/~seirdy/" "/" }} {{- $target := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
@ -103,4 +101,3 @@
<p>This post does not have any approved Webmentions yet.</p> <p>This post does not have any approved Webmentions yet.</p>
{{- end }} {{- end }}
<p>Feel free to contact me directly with feedback; <a href="{{ .Site.BaseURL }}about/#location-seirdy-online">heres my contact info</a></p> <p>Feel free to contact me directly with feedback; <a href="{{ .Site.BaseURL }}about/#location-seirdy-online">heres my contact info</a></p>
</section>

View file

@ -4,8 +4,10 @@
<main <main
itemprop="mainEntity" itemscope="" itemtype="https://schema.org/BlogPosting{{ with .Params.articleType }} https://schema.org/{{ . }}{{ end }}" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}"> 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 }}/" /> <link itemprop="isPartOf" href="{{ .Site.Params.CanonicalBaseURL }}/" />
<article class="h-entry hentry">
{{ partial "full-article.html" . }} {{ partial "full-article.html" . }}
{{ partial "webmentions.html" . }} {{ partial "interact.html" . }}
</article>
</main> </main>
{{ partial "prev-next.html" . -}} {{ partial "prev-next.html" . -}}
{{- end }} {{- end }}