Add series taxonomy

This commit is contained in:
JP Hastings-Spital 2023-07-24 22:23:40 +01:00
parent ff832b25ab
commit c0cd96978f
4 changed files with 31 additions and 5 deletions

View file

@ -27,6 +27,11 @@ paginate = 36
[author] [author]
name = "JP Hastings-Spital" name = "JP Hastings-Spital"
[taxonomies]
series = 'series'
tag = 'tags'
[params] [params]
dateform = "Jan 2, 2006" dateform = "Jan 2, 2006"
dateformShort = "Jan 2" dateformShort = "Jan 2"

View file

@ -10,6 +10,8 @@ tags:
- games - games
- protocol - protocol
summary: How can people play (board/card) games without a trusted third party, and without cheating? (Part 1 of 3) summary: How can people play (board/card) games without a trusted third party, and without cheating? (Part 1 of 3)
series:
- Distributed game protocols
--- ---
Yesterday I wrote a behemoth of a blog post about why I'm excited about distributed protocols, with not-really-that-short descriptions of 4 different projects that are gently ticking over in my head. It was a mess 😂 Yesterday I wrote a behemoth of a blog post about why I'm excited about distributed protocols, with not-really-that-short descriptions of 4 different projects that are gently ticking over in my head. It was a mess 😂
@ -20,9 +22,9 @@ This is the first in the distributed game protocols series, covering what they a
This post series: This post series:
- [Open Games](./) (this post) - [Open games](./) (this post)
- Games with Randomness (Coming soon!) - [Games with randomness](../randomness/)
- Games with Fate and Secrets (Coming soon!) - Games with fate and secrets (Coming soon!)
## What and why? ## What and why?
@ -113,4 +115,4 @@ Credit card manufacturers take their _actual_ credit card number (one digit too
Put an `X` for the last digit of your card (removing the last column of working), and find the new sum in Step 4 — in my example that would be `31`. I note that `40` is the next divisible-by-ten number above `31`, and calculate `40 - 31 = 9`. This means `9` must be the last digit of my fake-card for it to be valid. Put an `X` for the last digit of your card (removing the last column of working), and find the new sum in Step 4 — in my example that would be `31`. I note that `40` is the next divisible-by-ten number above `31`, and calculate `40 - 31 = 9`. This means `9` must be the last digit of my fake-card for it to be valid.
This is a (very simple) consistent hashing algorithm — a way to consistently turn larger data into a smaller number which represents that data. We'll need more of them as we look at **Distributed game protocols: Randomness** in the next post! (Coming soon!) This is a (very simple) consistent hashing algorithm — a way to consistently turn larger data into a smaller number which represents that data. We'll need more of them as we look at [Games with Randomness](../randomness/) in the next post!

View file

@ -0,0 +1,19 @@
{{ $thisPost := . }}
{{ with .Params.series }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-pen-tool meta-icon"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.586 7.586"></path><circle cx="11" cy="11" r="2"></circle></svg>
{{ range . -}}
{{ $series := (index site.Taxonomies.series (. | urlize)).Pages.ByDate }}
{{ $seriesCount := len $series }}
{{ $numInSeries := 0 }}
{{ range $num, $loopPost := $series }}
{{ if eq $loopPost $thisPost }}
{{ $numInSeries = add $num 1 }}
{{ end }}
{{ end }}
<span class="series">{{$numInSeries}} of {{ $seriesCount }} in <a href="{{ "/series/" | absLangURL }}{{ . | urlize }}/">{{.}}</a> series</span>
{{ end }}
</p>
{{ end }}

View file

@ -62,7 +62,7 @@
<div class="post-info"> <div class="post-info">
{{ partial "tags.html" .Params.tags }} {{ partial "tags.html" .Params.tags }}
{{ partial "categories.html" . }} {{ partial "series-tags.html" . }}
<p> <p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text">