mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Microdata improvements
- Semantically link each blog posting to the greater blog - Fix copyright bullshit - Make some articles TechArticles - Remove unnecessary markup
This commit is contained in:
parent
9077660b9f
commit
2204ae8861
13 changed files with 32 additions and 17 deletions
|
@ -13,7 +13,7 @@ sitemap:
|
|||
Seirdy's Home
|
||||
=============
|
||||
|
||||
I'm <a itemprop="url" href="https://seirdy.one" rel="author home canonical me" class="u-url u-uid url"> {{% indieweb-icon %}} <span itemprop="name" class="p-name fn n"> <span itemprop="givenName" class="p-given-name given-name">Rohan</span> <span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>, a.k.a. <span itemprop="alternateName nickname" class="p-nickname nickname">Seirdy</span> (online handle).
|
||||
I'm <a itemprop="url" href="https://seirdy.one" rel="author home canonical me" class="u-url u-uid url"> {{% indieweb-icon %}} <span itemprop="name" class="p-name fn n"> <span itemprop="givenName" class="p-given-name given-name">Rohan</span> <span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>, a.k.a. <span itemprop="alternateName" class="p-nickname nickname">Seirdy</span> (online handle).
|
||||
|
||||
Other versions of this website
|
||||
------------------------------
|
||||
|
|
|
@ -7,6 +7,7 @@ outputs:
|
|||
- gemtext
|
||||
footnote_heading: Notes
|
||||
featured: 4
|
||||
techarticle: true
|
||||
title: "The right thing for the wrong reasons: FLOSS doesn't imply security"
|
||||
---
|
||||
<section role="doc-preface" itemprop="backstory">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
date: "2020-11-17T13:13:03-08:00"
|
||||
lastmod: "2020-11-19T12:23:18-08:00"
|
||||
description: A seires on setting up resilient git-based project workflows, free of vendor lock-in.
|
||||
outputs:
|
||||
- html
|
||||
|
@ -7,6 +8,7 @@ outputs:
|
|||
tags:
|
||||
- git
|
||||
- foss
|
||||
techarticle: true
|
||||
title: "Resilient Git, Part 0: Introduction"
|
||||
---
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
date: "2020-11-18T18:31:15-08:00"
|
||||
lastmod: "2020-11-19T12:23:18-08:00"
|
||||
description: Efficient redundancy via repository mirroring with nothing but git.
|
||||
outputs:
|
||||
- html
|
||||
|
@ -7,6 +8,7 @@ outputs:
|
|||
tags:
|
||||
- git
|
||||
- foss
|
||||
techarticle: true
|
||||
title: "Resilient Git, Part 1: Hydra Hosting"
|
||||
---
|
||||
<div role="note">
|
||||
|
|
|
@ -17,6 +17,7 @@ sitemap:
|
|||
featured: 2
|
||||
image: "serenity-4x.png"
|
||||
image_alt: "Retro-looking browser with bitmap fonts showing this article's \"code snippet 4\"."
|
||||
techarticle: true
|
||||
title: "Best practices for inclusive textual websites"
|
||||
---
|
||||
<section role="doc-preface">
|
||||
|
@ -1042,7 +1043,7 @@ Where long inline `<code>` elements can trigger horizontal scrolling, consider a
|
|||
|
||||
### Keeping text together
|
||||
|
||||
Soft hyphens are great for splitting up text, but some text should stay together. The phrase "10 cm", for instance, would flow poorly if "10" and "cm" appeared on separate lines. Splitting text becomes especially painful on narrow viewports. A non-breaking space keeps the surrounding text from being re-flowed. Use the ` ` HTML entity instead of a space: `10 cm`. <span itemprop="mentions" itemscope itemtype="https://schema.org/Book">{{<cited-work name="Practical Typography" url="https://practicaltypography.com/">}} by {{<indieweb-person first-name="Matthew" last-name="Butterick" url="https://mbtype.com/bio.html">}},[^17] a typographer,</span> describes [where to use the non-breaking space](https://briefs.video/videos/is-progressive-enhancement-dead-yet/) in more detail.
|
||||
Soft hyphens are great for splitting up text, but some text should stay together. The phrase "10 cm", for instance, would flow poorly if "10" and "cm" appeared on separate lines. Splitting text becomes especially painful on narrow viewports. A non-breaking space keeps the surrounding text from being re-flowed. Use the ` ` HTML entity instead of a space: `10 cm`. <span itemprop="mentions" itemscope itemtype="https://schema.org/Book">{{<cited-work name="Practical Typography" url="https://practicaltypography.com/">}} by {{<indieweb-person itemprop="author" first-name="Matthew" last-name="Butterick" url="https://mbtype.com/bio.html">}},[^17] a typographer</span>, describes [where to use the non-breaking space](https://briefs.video/videos/is-progressive-enhancement-dead-yet/) in more detail.
|
||||
|
||||
One exception to the rules from <cite>Practical Typography</cite>: don't use a non-breaking space if it would trigger two-dimensional scrolling on a narrow viewport. Between broken text and two-dimensional scrolling, broken text is the lesser evil. I personally set a cutoff at 2.5 cm (1 inch) at 125% zoom.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang={{- default "" .Site.LanguageCode }} prefix="og: https://ogp.me/ns# article: https://ogp.me/ns/article# cc: http://creativecommons.org/ns#">
|
||||
{{ partial "head.html" . -}}
|
||||
<body itemscope itemtype="https://schema.org/Blog https://schema.org/WebPage">
|
||||
<body itemscope itemtype="https://schema.org/WebPage">
|
||||
{{ partial "header.html" . -}}
|
||||
{{- block "main" . }}{{- end -}}
|
||||
{{ partialCached "footer.html" . }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<footer id="site-footer">
|
||||
<footer>
|
||||
<p>
|
||||
Copyright<span aria-hidden="true"> ©</span> <span itemprop="copyrightYear">{{now.Year}}</span> <span itemprop="copyrightHolder">{{- partial "indieweb-author.html" -}}</span>
|
||||
Copyright<span aria-hidden="true"> ©</span> <time itemprop="copyrightYear" datetime="{{now.Year}}">{{now.Year}}</time> {{- partial "indieweb-author.html" -}}
|
||||
</p>
|
||||
<nav aria-label="site info">
|
||||
<ul>
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
<header id="banner" itemprop="hasPart" itemscope itemtype="https://schema.org/WPHeader">
|
||||
<header>
|
||||
<nav aria-label="Global">
|
||||
<ul>
|
||||
{{- $currentPage := . -}}
|
||||
{{- $canonicalRelPermalink := $currentPage.RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
||||
{{- $isHome := false -}}
|
||||
{{- if eq $currentPage.Permalink .Site.BaseURL -}}
|
||||
{{- if eq $currentPage.RelPermalink "/" -}}
|
||||
{{- $isHome = true -}}
|
||||
{{- end }}
|
||||
<li itemprop="hasPart" itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||
<li
|
||||
{{ if $isHome -}}
|
||||
itemprop="sameAs"
|
||||
{{ else -}}
|
||||
itemprop="isPartOf"
|
||||
{{ end -}}
|
||||
itemscope itemtype="https://schema.org/Blog https://schema.org/WebSite"
|
||||
itemid="{{ .Site.Params.CanonicalBaseURL }}/">
|
||||
<a rel="home" itemprop="url" href="{{ .Site.BaseURL }}"{{- if $isHome }} aria-current="page"{{- end -}}>
|
||||
{{- if $isHome -}}
|
||||
<strong itemprop="name">{{ .Site.Title }}</strong>
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
{{- if and (ne .Permalink .Site.BaseURL) (ne .RelPermalink "/") -}}
|
||||
{{- $isStandalone = true -}}
|
||||
{{- end -}}
|
||||
{{- if $isStandalone }}
|
||||
{{- if $isStandalone -}}
|
||||
<main itemprop="mainEntity" class="h-feed hfeed" itemscope itemtype="https://schema.org/CompleteDataFeed">
|
||||
<h1 class="p-name" itemprop="name headline" id="posts">Posts</h1>
|
||||
<p>These are all of my posts, sorted by date (newest first).</p>
|
||||
{{- else }}
|
||||
{{- else -}}
|
||||
<section class="h-feed hfeed" itemprop="hasPart" itemscope itemtype="https://schema.org/DataFeed">
|
||||
<h2 class="p-name" itemprop="name" id="posts">Posts</h2>
|
||||
<p>Here’s a selection of my best posts, in featured order. To see the rest, visit <a href="/posts.html">my Posts page</a>.</p>
|
||||
|
@ -21,8 +21,9 @@
|
|||
{{- $posts = sort (where $posts "Params.featured" ">" 0) "Params.featured" -}}
|
||||
{{- end -}}
|
||||
{{- range $posts -}}
|
||||
<li>
|
||||
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/BlogPosting https://schema.org/DataFeedItem">
|
||||
{{- $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">
|
||||
{{ if $isStandalone -}}
|
||||
<h2
|
||||
{{- else -}}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{{- $displayCount = printf "%s thousand" $thousands -}}
|
||||
About
|
||||
{{- end }}
|
||||
<data value="{{ .WordCount }}" itemprop="wordCount">
|
||||
<data itemprop="wordCount" value="{{ .WordCount }}">
|
||||
{{ $displayCount }}
|
||||
</data> words
|
||||
{{- with .ReadingTime -}}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{{- define "main" -}}
|
||||
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
||||
{{- .Scratch.Set "codeIndex" 1 -}}
|
||||
<main itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||
<main itemprop="hasPart" itemscope itemtype="https://schema.org/BlogPosting{{ if .Params.techarticle }} https://schema.org/TechArticle{{ end }}" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||
<link itemprop="isPartOf" href="{{ .Site.Params.CanonicalBaseURL }}/">
|
||||
{{ partial "full-article.html" . }}
|
||||
{{ partial "webmentions.html" . }}
|
||||
</main>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
(btw this is all made of <span> cuz it is supposed to be inline)
|
||||
-->
|
||||
<span itemprop="author" itemscope itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
|
||||
<span itemprop="author copyrightHolder" itemscope itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
|
||||
<a itemprop="url" href="https://seirdy.one" rel="author home cc:attributionURL" class="u-url url" property="cc:attributionName">
|
||||
{{ partial "indieweb-icon.html" -}}
|
||||
<span itemprop="name" class="p-name fn n">
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
{{ $favicon := resources.Get "/favicon.png" -}}
|
||||
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
|
||||
{{- $favicon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
|
||||
{{- $favicon_bigpng := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" -}}
|
||||
<img itemprop="image" class="u-photo photo" width="16" height="16" alt=""
|
||||
{{ if in site.BaseURL ".onion" -}}
|
||||
src="data:image/png;base64,{{ $favicon_base64 }}" srcset="{{ $favicon_bigpng.RelPermalink }} 2x"
|
||||
src="data:image/png;base64,{{ $favicon_base64 }}"
|
||||
{{- else -}}
|
||||
src="{{ $favicon_svg.RelPermalink }}"
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in a new issue