From 5c16494325d4e0d769842fcaa829eb31521abead Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Tue, 30 Mar 2021 18:34:52 -0700 Subject: [PATCH] Add support for multi author blog posts --- config.toml | 5 +- content/authors/alekos-filini/_index.md | 8 +++ .../authors/gabriele-domenichini/_index.md | 8 +++ content/authors/riccardo-casatta/_index.md | 8 +++ content/authors/steve-myers/_index.md | 8 +++ content/authors/thunderbiscuit/_index.md | 8 +++ content/blog/2020/descriptors_in_the_wild.md | 3 +- content/blog/2020/hello-world.md | 3 +- content/blog/2020/release-0.2.0.md | 3 +- .../2021/descriptor_based_paper_wallet.md | 4 +- ...fee_estimation_for_light_clients_part_1.md | 3 +- ...fee_estimation_for_light_clients_part_2.md | 3 +- ...fee_estimation_for_light_clients_part_3.md | 3 +- content/blog/2021/release-0.3.0.md | 3 +- content/blog/2021/release-0.4.0.md | 3 +- content/blog/2021/release-0.5.0.md | 3 +- content/blog/2021/spending_policy_demo.md | 4 +- layouts/authors/list.html | 53 +++++++++++++++++++ layouts/blog/list.html | 12 ++++- layouts/partials/header.html | 13 +++-- 20 files changed, 140 insertions(+), 18 deletions(-) create mode 100644 content/authors/alekos-filini/_index.md create mode 100644 content/authors/gabriele-domenichini/_index.md create mode 100644 content/authors/riccardo-casatta/_index.md create mode 100644 content/authors/steve-myers/_index.md create mode 100644 content/authors/thunderbiscuit/_index.md create mode 100644 layouts/authors/list.html diff --git a/config.toml b/config.toml index 60e9bb6ab2..bf32f9ed37 100644 --- a/config.toml +++ b/config.toml @@ -35,12 +35,13 @@ disableInlineCopyToClipBoard = true [permalinks] tags = "/blog/tags/:slug" -author = "/blog/author/:slug" +author = "/blog/authors/:slug" blog = "/blog/:year/:month/:title/" [taxonomies] tag = "tags" -author = "author" +author = "authors" +category = "categories" # render raw html [markup.goldmark.renderer] diff --git a/content/authors/alekos-filini/_index.md b/content/authors/alekos-filini/_index.md new file mode 100644 index 0000000000..db7e6452cb --- /dev/null +++ b/content/authors/alekos-filini/_index.md @@ -0,0 +1,8 @@ +--- +name: Alekos Filini +photo: +twitter: afilini +mastodon: https://bitcoinhackers.org/@afilini +github: https://github.com/afilini/ +web: https://afilini.com +--- diff --git a/content/authors/gabriele-domenichini/_index.md b/content/authors/gabriele-domenichini/_index.md new file mode 100644 index 0000000000..2fc54d6fd7 --- /dev/null +++ b/content/authors/gabriele-domenichini/_index.md @@ -0,0 +1,8 @@ +--- +name: Gabriele Domenichini +photo: +twitter: Gabridome +mastodon: https://bitcoinhackers.org/@Gabridome +github: https://github.com/gabridome/ +web: +--- diff --git a/content/authors/riccardo-casatta/_index.md b/content/authors/riccardo-casatta/_index.md new file mode 100644 index 0000000000..ae30b1da87 --- /dev/null +++ b/content/authors/riccardo-casatta/_index.md @@ -0,0 +1,8 @@ +--- +name: Riccardo Casatta +photo: +twitter: RCasatta +mastodon: https://bitcoinhackers.org/@rcasatta +github: https://github.com/RCasatta/ +web: +--- diff --git a/content/authors/steve-myers/_index.md b/content/authors/steve-myers/_index.md new file mode 100644 index 0000000000..b52d8a7ccf --- /dev/null +++ b/content/authors/steve-myers/_index.md @@ -0,0 +1,8 @@ +--- +name: Steve Myers +photo: +twitter: notmandatory +mastodon: https://bitcoinhackers.org/@notmandatory +github: https://github.com/notmandatory/ +web: https://notmandatory.org +--- diff --git a/content/authors/thunderbiscuit/_index.md b/content/authors/thunderbiscuit/_index.md new file mode 100644 index 0000000000..f03daff947 --- /dev/null +++ b/content/authors/thunderbiscuit/_index.md @@ -0,0 +1,8 @@ +--- +name: Thunderbiscuit +photo: +twitter: thunderB__ +mastodon: https://fosstodon.org/@thunderbiscuit +github: https://github.com/thunderBiscuit +web: https://thunderbiscuit.com/ +--- diff --git a/content/blog/2020/descriptors_in_the_wild.md b/content/blog/2020/descriptors_in_the_wild.md index fc50a48d3a..1ac3c905fe 100644 --- a/content/blog/2020/descriptors_in_the_wild.md +++ b/content/blog/2020/descriptors_in_the_wild.md @@ -1,7 +1,8 @@ --- title: "Descriptors in the wild" description: "Guide to setup a 2-of-2 multisig using Bitcoin Core and BDK" -author: "Gabriele Domenichini" +authors: + - Gabriele Domenichini date: "2020-11-18" tags: ["guide", "descriptor"] hidden: true diff --git a/content/blog/2020/hello-world.md b/content/blog/2020/hello-world.md index c222df3cf6..02b74785c7 100644 --- a/content/blog/2020/hello-world.md +++ b/content/blog/2020/hello-world.md @@ -1,7 +1,8 @@ --- title: "Hello World!" description: "Getting started using the BDK library in a very simple Rust project" -author: "Alekos Filini" +authors: + - Alekos Filini date: "2020-12-18" tags: ["getting started", "rust"] hidden: true diff --git a/content/blog/2020/release-0.2.0.md b/content/blog/2020/release-0.2.0.md index fc469fd7d0..1eccd6a73d 100644 --- a/content/blog/2020/release-0.2.0.md +++ b/content/blog/2020/release-0.2.0.md @@ -1,7 +1,8 @@ --- title: "Release v0.2.0" description: "Announcing the v0.2.0 release of BDK" -author: "Alekos Filini" +authors: + - Alekos Filini date: "2020-12-21" tags: ["rust", "release"] hidden: true diff --git a/content/blog/2021/descriptor_based_paper_wallet.md b/content/blog/2021/descriptor_based_paper_wallet.md index af63291ba6..0e1c34999c 100644 --- a/content/blog/2021/descriptor_based_paper_wallet.md +++ b/content/blog/2021/descriptor_based_paper_wallet.md @@ -1,7 +1,9 @@ --- title: "Descriptor-based paper wallets" description: "Demonstrate how to create descriptor-based paper wallet and how to spend them with bdk" -author: "Riccardo Casatta and Steve Myers" +authors: + - Riccardo Casatta + - Steve Myers date: "2021-03-30" tags: ["guide", "descriptor", "paper wallets"] hidden: true diff --git a/content/blog/2021/fee_estimation_for_light_clients_part_1.md b/content/blog/2021/fee_estimation_for_light_clients_part_1.md index 4af9dd9871..460e463ff4 100644 --- a/content/blog/2021/fee_estimation_for_light_clients_part_1.md +++ b/content/blog/2021/fee_estimation_for_light_clients_part_1.md @@ -1,7 +1,8 @@ --- title: "Fee estimation for light-clients (Part 1)" description: "Applying machine learning to the bitcoin fee estimation problem" -author: "Riccardo Casatta" +authors: + - Riccardo Casatta date: "2021-01-25" tags: ["fee", "machine learning"] hidden: true diff --git a/content/blog/2021/fee_estimation_for_light_clients_part_2.md b/content/blog/2021/fee_estimation_for_light_clients_part_2.md index aed4884d0d..3ff87771e6 100644 --- a/content/blog/2021/fee_estimation_for_light_clients_part_2.md +++ b/content/blog/2021/fee_estimation_for_light_clients_part_2.md @@ -1,7 +1,8 @@ --- title: "Fee estimation for light-clients (Part 2)" description: "Applying machine learning to the bitcoin fee estimation problem" -author: "Riccardo Casatta" +authors: + - Riccardo Casatta date: "2021-01-25" tags: ["fee", "machine learning"] hidden: true diff --git a/content/blog/2021/fee_estimation_for_light_clients_part_3.md b/content/blog/2021/fee_estimation_for_light_clients_part_3.md index 0177c5da68..78ec4ac3b2 100644 --- a/content/blog/2021/fee_estimation_for_light_clients_part_3.md +++ b/content/blog/2021/fee_estimation_for_light_clients_part_3.md @@ -1,7 +1,8 @@ --- title: "Fee estimation for light-clients (Part 3)" description: "Applying machine learning to the bitcoin fee estimation problem" -author: "Riccardo Casatta" +authors: + - Riccardo Casatta date: "2021-01-25" tags: ["fee", "machine learning"] hidden: true diff --git a/content/blog/2021/release-0.3.0.md b/content/blog/2021/release-0.3.0.md index 2d4cc04d89..a155c2462c 100644 --- a/content/blog/2021/release-0.3.0.md +++ b/content/blog/2021/release-0.3.0.md @@ -1,7 +1,8 @@ --- title: "Release v0.3.0" description: "Announcing the v0.3.0 release of BDK" -author: "Alekos Filini" +authors: + - Alekos Filini date: "2021-01-20" tags: ["rust", "release"] hidden: true diff --git a/content/blog/2021/release-0.4.0.md b/content/blog/2021/release-0.4.0.md index 0fa57ba613..0dc8cfec6a 100644 --- a/content/blog/2021/release-0.4.0.md +++ b/content/blog/2021/release-0.4.0.md @@ -1,7 +1,8 @@ --- title: "Release v0.4.0" description: "Announcing the v0.4.0 release of BDK" -author: "Alekos Filini" +authors: + - Alekos Filini date: "2021-02-17" tags: ["rust", "release"] hidden: true diff --git a/content/blog/2021/release-0.5.0.md b/content/blog/2021/release-0.5.0.md index 67f274c4ca..09f177c16f 100644 --- a/content/blog/2021/release-0.5.0.md +++ b/content/blog/2021/release-0.5.0.md @@ -1,7 +1,8 @@ --- title: "Release v0.5.0" description: "Announcing the v0.5.0 release of BDK" -author: "Alekos Filini" +authors: + - Alekos Filini date: "2021-03-18" tags: ["rust", "release"] hidden: true diff --git a/content/blog/2021/spending_policy_demo.md b/content/blog/2021/spending_policy_demo.md index 2b18c01e70..9be9f32f75 100644 --- a/content/blog/2021/spending_policy_demo.md +++ b/content/blog/2021/spending_policy_demo.md @@ -1,7 +1,9 @@ --- title: "Spending Policy Demo" description: "Demonstrate how to use a descriptor wallet with different spending policies" -author: "Steve Myers and Thunderbiscuit" +authors: + - Steve Myers + - Thunderbiscuit" date: "2021-02-23" tags: ["guide", "descriptor"] hidden: true diff --git a/layouts/authors/list.html b/layouts/authors/list.html new file mode 100644 index 0000000000..54fe9ccdd4 --- /dev/null +++ b/layouts/authors/list.html @@ -0,0 +1,53 @@ +{{ partial "header.html" . }} + +

{{ .Params.name }}

+ +{{ with .Params.photo }} + +{{ end }} + +{{ with .Content }} +

Bio

+{{ .Content }} +{{ end }} + +

Links

+{{ with .Params.twitter }} + + +

Articles

+ + +{{ partial "footer.html" . }} \ No newline at end of file diff --git a/layouts/blog/list.html b/layouts/blog/list.html index 98fb326413..6f53037a94 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -11,8 +11,16 @@

{{ .Date.Format "Jan 2" }}

{{ if isset .Params "tags" }} - {{ if isset .Params "author" }} - By {{ .Params.author }} · + {{ if isset .Params "authors" }} + By + {{- range $index, $author := .Params.authors }} + {{- with $.Site.GetPage "taxonomyTerm" (printf "authors/%s" (urlize .)) }} + {{ if gt $index 0 }} + , + {{ end }} + {{ .Params.name }} + {{ end }} + {{ end }} {{ end }} {{ $list := .Params.tags }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 3aab16ccc0..427face8ea 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -99,10 +99,17 @@ {{if and (not .IsHome) (not .Params.chapter) }} {{ if (eq .Type "blog") }}

{{ .Title }}

- {{ if isset .Params "author" }} - By {{ .Params.author }} -
+ {{ if isset .Params "authors" }} + By + {{- range $index, $author := .Params.authors }} + {{- with $.Site.GetPage "taxonomyTerm" (printf "authors/%s" (urlize .)) }} + {{ if gt $index 0 }} + , + {{ end }} + {{ .Params.name }} + {{ end }} {{ end }} + {{ end }} {{ else }}

{{ if or (eq .Kind "taxonomy") (eq .Kind "term") }} -- 2.49.0