From 2af6e03dfd79063ee40b5c4cc9e1cb16d9d70387 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 22 May 2024 21:34:09 -0500 Subject: [PATCH] Work on List of people This is a future project that will use a json file to list out a JSON array of people, which will include many, many different people. This is not finished, and I need to work on the syntax that I will use. This should not be considered production-ready. The idea here, is to us a JSON asset to list out the full array of people. This will include their sites, fediverse, and other links... This will have to be statically typed... and should be a niceity. I also do like organizing stuff in JSON, as it is superior IMO to XML, I really hate XML. I prefer JSON over XML in most things, and will not ever ultize XML inside of this project, beyond the RSS feed. The Syntax of JSON is just much simpler and exactly what I am looking for --- assets/data/people.json | 6 ++++ content/people.md | 44 ++++++++++++++++++++++++++++++ content/test.md | 8 ++++++ layouts/shortcodes/peoplelist.html | 16 +++++++++++ 4 files changed, 74 insertions(+) create mode 100644 assets/data/people.json create mode 100644 content/people.md create mode 100644 content/test.md create mode 100644 layouts/shortcodes/peoplelist.html diff --git a/assets/data/people.json b/assets/data/people.json new file mode 100644 index 0000000..658bf53 --- /dev/null +++ b/assets/data/people.json @@ -0,0 +1,6 @@ +[ + { + "Name": "Benjamin Hollon", + "Website": "benjaminhollon.com" + } +] diff --git a/content/people.md b/content/people.md new file mode 100644 index 0000000..53e39af --- /dev/null +++ b/content/people.md @@ -0,0 +1,44 @@ +--- +title: "A List of People" +date: 2024-05-22T20:21:36-05:00 +draft: false +tags: + - info +--- +This is a list of people that I have collected over time: +1) Benjamin Hollon for his work on [readable.css](https://readable-css.freedomtowrite.org/) and his support on the fediverse. + * [Website](https://benjaminhollon.com/) + * Fediverse + * [@amin@alpha.polymaths.social](https://alpha.polymaths.social/@amin) + * [Codeberg](https://codeberg.org/benjaminhollon) + * [Github](https://github.com/benjaminbhollon) (Dead) + * [Other](https://benjaminhollon.com/social/) + * [Contact](https://benjaminhollon.com/contact/) +2) CJ for his work on [hugo-theme-readable](https://github.com/cjtheham/hugo-theme-readable/tree/main/layouts) + * [Website](https://ww0cj.radio/) + * Fediverse + * [@roguefoam@alpha.polymaths.social](https://alpha.polymaths.social/@roguefoam) +3) Sire for making me laugh + * Fediverse + * [@sire@alpha.polymaths.social](https://alpha.polymaths.social/@sire) +4) Tyil for teaching me a few things + * [Website](https://www.tyil.nl) + * [Fediverse](https://fedi.tyil.nl/@tyil) +5) R.L Dane for being around + * [Blog](https://rldane.space/) + * Fediverse + * [@RL_Dane@fosstodon.org](https://fosstodon.org/@RL_Dane) +8) Orbital Martian for being around + * [Blog](https://orbitalmartian.codeberg.page/) + * Fediverse + * [@orbitalmartian@alpha.polymaths.social](https://alpha.polymaths.social/@orbitalmartian) +9) Sotolf for being around + * Fediverse + * [@sotolf@alpha.polymaths.social](https://alpha.polymaths.social/@sotolf) + * [@sotolf@social.linux.pizza](https://social.linux.pizza/@sotolf) +10) Ivan for being around + * [Website](https://vmst.io/@libreivan) + * Fediverse + * [@libreivan@vmst.io](https://vmst.io/@libreivan) + * [@ivan@alpha.polymaths.social](https://alpha.polymaths.social/@ivan) +11) Krafter diff --git a/content/test.md b/content/test.md new file mode 100644 index 0000000..1ca8421 --- /dev/null +++ b/content/test.md @@ -0,0 +1,8 @@ +--- +title: "A List of People" +date: 2024-05-22T20:21:36-05:00 +draft: false +tags: + - info +--- +{{}} diff --git a/layouts/shortcodes/peoplelist.html b/layouts/shortcodes/peoplelist.html new file mode 100644 index 0000000..b41486d --- /dev/null +++ b/layouts/shortcodes/peoplelist.html @@ -0,0 +1,16 @@ +{{ $data := dict }} +{{ $path := "data/people.json" }} +{{ with resources.Get $path }} + {{ with . | transform.Unmarshal }} + {{ $data = . }} + {{ end }} +{{ else }} + {{ errorf "Unable to get global resource %q" $path }} +{{ end }} + +{{ range $data }} + {{ .Name }} +