mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Add "notes"
Short-form posts for microblogging. TODO: implement POSSE.
This commit is contained in:
parent
972e025aa3
commit
d409a1ba58
12 changed files with 99 additions and 10 deletions
18
config.toml
18
config.toml
|
@ -1,6 +1,8 @@
|
||||||
baseURL = "https://seirdy.one/" # just the default, I have mirrors
|
baseURL = "https://seirdy.one/" # just the default, I have mirrors
|
||||||
languageCode = "en-us"
|
languageCode = "en-us"
|
||||||
title = "Seirdy's Home"
|
title = "Seirdy's Home"
|
||||||
|
timeZone = "UTC"
|
||||||
|
summaryLength = 150
|
||||||
|
|
||||||
enableInlineShortcodes = true
|
enableInlineShortcodes = true
|
||||||
enableGitInfo = true
|
enableGitInfo = true
|
||||||
|
@ -37,36 +39,44 @@ nick = "Seirdy"
|
||||||
url = "/posts.html"
|
url = "/posts.html"
|
||||||
weight = 10
|
weight = 10
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = "notes"
|
||||||
|
name = "Notes"
|
||||||
|
title = "notes"
|
||||||
|
url = "/notes.html"
|
||||||
|
weight = 15
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
identifier = "bookmarks"
|
identifier = "bookmarks"
|
||||||
name = "Bookmarks"
|
name = "Bookmarks"
|
||||||
title = "bookmarks"
|
title = "bookmarks"
|
||||||
url = "/bookmarks.html"
|
url = "/bookmarks.html"
|
||||||
weight = 11
|
weight = 20
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
identifier = "about"
|
identifier = "about"
|
||||||
name = "About"
|
name = "About"
|
||||||
title = "about"
|
title = "about"
|
||||||
url = "/about.html"
|
url = "/about.html"
|
||||||
weight = 20
|
weight = 30
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
identifier = "resume"
|
identifier = "resume"
|
||||||
name = "Resume"
|
name = "Resume"
|
||||||
title = "resume"
|
title = "resume"
|
||||||
url = "/resume.html"
|
url = "/resume.html"
|
||||||
weight = 30
|
weight = 40
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
identifier = "rss"
|
identifier = "rss"
|
||||||
name = "RSS feed"
|
name = "RSS feed"
|
||||||
title = "rss feed"
|
title = "rss feed"
|
||||||
url = "/posts/index.xml"
|
url = "/posts/index.xml"
|
||||||
weight = 40
|
weight = 50
|
||||||
|
|
||||||
[permalinks]
|
[permalinks]
|
||||||
posts = "/:year/:month/:day/:filename"
|
posts = "/:year/:month/:day/:filename"
|
||||||
|
notes = "/notes/:year/:month/:day/:filename"
|
||||||
|
|
||||||
[markup.goldmark.renderer]
|
[markup.goldmark.renderer]
|
||||||
# Allows HTML in Markdown
|
# Allows HTML in Markdown
|
||||||
|
|
14
content/notes/dark-theme-woes.md
Normal file
14
content/notes/dark-theme-woes.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
title: "Dark theme woes"
|
||||||
|
date: 2022-05-25T00:00:32-07:00
|
||||||
|
---
|
||||||
|
I try to have limited reliance on CSS media queries in favor of being inclusive by as many people as possible by default, including fingerprinting-averse readers. Unfortunately, I have concluded that it is impossible to set one single website color palette that ticks all of the following boxes:
|
||||||
|
|
||||||
|
- Familiar: colors aren't particularly "novel" and don't impose a learning curve. The difference between a visited and unvisited link should be clear enough from the get-go.
|
||||||
|
- Friendly to various types of color blindness
|
||||||
|
- Sufficient contrast for high-contrast needs
|
||||||
|
- Autism-friendly, anxiety-friendly colors that do not trigger overstimulation or imply a warning.
|
||||||
|
- Related: sensitive to cultural norms (is red actually a "warning" to everyone?).
|
||||||
|
|
||||||
|
I set a custom palette for my site's dark theme. Since its contrast is a bit high, I made it respond to the `prefers-contrast: less` media query. Now, My 108% body text typically renders at 17.4 px, which should have an absolute value [below 90 L<sup>c</sup> on the APCA lookup table](https://www.myndex.com/APCA/). I dropped my link contrast to 90 L<sup>c</sup> and my body text to something slightly higher (article body text should have at least as much contrast as link text and buttons to avoid the "piercing glare" effect interactive elements can have; I should add that to my website best practices article sometime).
|
||||||
|
|
7
content/notes/hello-notes.md
Normal file
7
content/notes/hello-notes.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
title: Hello notes
|
||||||
|
date: "2022-05-24T23:34:50-00:00"
|
||||||
|
---
|
||||||
|
This is first "note" on my IndieWeb Site. Notes will be shorter and less formal than typical blog posts; this is a microblog, not a typical weblog.
|
||||||
|
|
||||||
|
Once this is working correctly, I'll need to figure out a solution to <abbr title="Publish on Own Site, Syndicate Elsewhere">POSSE</abbr> these notes to the Fediverse.
|
|
@ -1,3 +1,7 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
{{- if eq .Page.Section "notes" -}}
|
||||||
|
{{- partial "notes.html" . -}}
|
||||||
|
{{- else -}}
|
||||||
{{- partial "posts.html" . -}}
|
{{- partial "posts.html" . -}}
|
||||||
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
29
layouts/_default/notes.html
Normal file
29
layouts/_default/notes.html
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<main itemprop="mainEntity" class="h-feed hfeed" itemscope itemtype="https://schema.org/DataFeed">
|
||||||
|
<h1 class="p-name" itemprop="name headline" id="posts">Notes</h1>
|
||||||
|
<p>This is my microblog. These are my short informal posts, sorted by date (newest first). For longer posts, <a href="../posts.html">see my blog</a>.</p>
|
||||||
|
<p role="doc-tip">
|
||||||
|
Timestamp format: <code>YYYY-MM-DD HH:MM:SS</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite>
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
{{- $posts := (where site.RegularPages "Section" "notes") -}}
|
||||||
|
{{- range $posts -}}
|
||||||
|
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
|
||||||
|
<li itemprop="dataFeedElement" itemscope itemtype="https://schema.org/DataFeedItem">
|
||||||
|
<article class="h-entry hentry" itemprop="item" itemscope itemtype="https://schema.org/SocialMediaPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||||
|
<h2 itemprop="name headline" class="p-name entry-title">
|
||||||
|
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
|
||||||
|
{{ .Title }}
|
||||||
|
</a>
|
||||||
|
</h2>
|
||||||
|
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02 15:04:05" }}</time>
|
||||||
|
{{- if lt .Date .Lastmod -}}
|
||||||
|
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04:05" }}</time>
|
||||||
|
{{- end }}
|
||||||
|
<div class="e-content entry-content" itemprop="articleBody">{{ .Content }}</div>
|
||||||
|
</article>
|
||||||
|
</li>
|
||||||
|
{{- end }}
|
||||||
|
</ol>
|
||||||
|
</main>
|
||||||
|
{{ end }}
|
5
layouts/archetypes/notes.md
Normal file
5
layouts/archetypes/notes.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
date: {{ .Date }}
|
||||||
|
---
|
||||||
|
|
||||||
|
poggies
|
9
layouts/notes/single.html
Normal file
9
layouts/notes/single.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{{- define "main" -}}
|
||||||
|
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
||||||
|
<main itemprop="hasPart" itemscope itemtype="https://schema.org/SocialMediaPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||||
|
<link itemprop="isPartOf" href="{{ .Site.Params.CanonicalBaseURL }}/">
|
||||||
|
{{ partial "full-article.html" . }}
|
||||||
|
{{ partial "webmentions.html" . }}
|
||||||
|
</main>
|
||||||
|
{{ partial "prev-next.html" . -}}
|
||||||
|
{{- end }}
|
|
@ -14,6 +14,8 @@
|
||||||
{{ $description := .Site.Params.Description -}}
|
{{ $description := .Site.Params.Description -}}
|
||||||
{{- if .Params.description -}}
|
{{- if .Params.description -}}
|
||||||
{{- $description = .Params.Description -}}
|
{{- $description = .Params.Description -}}
|
||||||
|
{{- else if .Summary -}}
|
||||||
|
{{- $description = .Summary | replaceRE `\n` ` ` | safeHTML -}}
|
||||||
{{- else if eq $canonicalRelPermalink "/posts.html" -}}
|
{{- else if eq $canonicalRelPermalink "/posts.html" -}}
|
||||||
{{- $description = "All the posts on Seirdy's Home" -}}
|
{{- $description = "All the posts on Seirdy's Home" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -6,5 +6,7 @@ Posted <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished
|
||||||
<br>
|
<br>
|
||||||
Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>. <a href="{{ $logURL | strings.ReplaceRE `\.md` `.gmi` }}">Changelog</a>.
|
Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>. <a href="{{ $logURL | strings.ReplaceRE `\.md` `.gmi` }}">Changelog</a>.
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ if not (eq .Page.Section "notes") -}}
|
||||||
<br>
|
<br>
|
||||||
{{ partial "wordcount.html" . }}
|
{{ partial "wordcount.html" . -}}
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite>
|
Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite>
|
||||||
</p>
|
</p>
|
||||||
<ol>
|
<ol>
|
||||||
{{- $posts := (where site.RegularPages "Type" "in" site.Params.mainSections) -}}
|
{{- $posts := (where site.RegularPages "Section" "posts") -}}
|
||||||
{{- if not $isStandalone -}}
|
{{- if not $isStandalone -}}
|
||||||
{{- $posts = sort (where $posts "Params.featured" ">" 0) "Params.featured" -}}
|
{{- $posts = sort (where $posts "Params.featured" ">" 0) "Params.featured" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -38,8 +38,11 @@
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
</h3>
|
</h3>
|
||||||
{{- end }}
|
{{- 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
|
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||||
<time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
|
{{- if lt .Date .Lastmod -}}
|
||||||
|
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
||||||
<p>{{- partial "wordcount.html" . -}}</p>
|
<p>{{- partial "wordcount.html" . -}}</p>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
{{ $name := "post" -}}
|
||||||
|
{{- if eq .Page.Section "notes" -}}
|
||||||
|
{{- $name = "note" -}}
|
||||||
|
{{- end -}}
|
||||||
<aside aria-labelledby="continue-hd">
|
<aside aria-labelledby="continue-hd">
|
||||||
<nav aria-labelledby="continue-hd">
|
<nav aria-labelledby="continue-hd">
|
||||||
<h2 id="continue-hd">Continue reading</h2>
|
<h2 id="continue-hd">Continue reading</h2>
|
||||||
|
@ -6,7 +10,7 @@
|
||||||
<li>Previous post: <a href="{{ .Permalink }}" rel="prev">{{ .Title }}</a></li>
|
<li>Previous post: <a href="{{ .Permalink }}" rel="prev">{{ .Title }}</a></li>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .NextInSection }}
|
{{- with .NextInSection }}
|
||||||
<li>Next post: <a href="{{ .Permalink }}" rel="next">{{ .Title }}</a></li>
|
<li>Next {{ $name }}: <a href="{{ .Permalink }}" rel="next">{{ .Title }}</a></li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<section aria-labelledby="webmentions">
|
<section aria-labelledby="webmentions">
|
||||||
<h2 id="webmentions" tabindex="-1">Webmen­tions</h2>
|
<h2 id="webmentions" tabindex="-1">Webmen­tions</h2>
|
||||||
<p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>. Webmentions received for this post will appear below after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. Check the <a href="https://web.archive.org/">Wayback Machine</a> if any links are broken.</p>
|
<p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>. Webmentions received for this post will appear in the following list after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. Check the <a href="https://web.archive.org/">Wayback Machine</a> if any links are broken.</p>
|
||||||
<dl>
|
<dl>
|
||||||
{{- $target := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
{{- $target := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
||||||
{{ $url := printf "https://seirdy.one/webmentions/get?status=approved&target=https://seirdy.one%s" $target -}}
|
{{ $url := printf "https://seirdy.one/webmentions/get?status=approved&target=https://seirdy.one%s" $target -}}
|
||||||
|
|
Loading…
Reference in a new issue