]> Untitled Git - bitcoindevkit.org/commitdiff
Add support for multi author blog posts
authorSteve Myers <steve@notmandatory.org>
Wed, 31 Mar 2021 01:34:52 +0000 (18:34 -0700)
committerSteve Myers <steve@notmandatory.org>
Wed, 31 Mar 2021 17:12:19 +0000 (10:12 -0700)
20 files changed:
config.toml
content/authors/alekos-filini/_index.md [new file with mode: 0644]
content/authors/gabriele-domenichini/_index.md [new file with mode: 0644]
content/authors/riccardo-casatta/_index.md [new file with mode: 0644]
content/authors/steve-myers/_index.md [new file with mode: 0644]
content/authors/thunderbiscuit/_index.md [new file with mode: 0644]
content/blog/2020/descriptors_in_the_wild.md
content/blog/2020/hello-world.md
content/blog/2020/release-0.2.0.md
content/blog/2021/descriptor_based_paper_wallet.md
content/blog/2021/fee_estimation_for_light_clients_part_1.md
content/blog/2021/fee_estimation_for_light_clients_part_2.md
content/blog/2021/fee_estimation_for_light_clients_part_3.md
content/blog/2021/release-0.3.0.md
content/blog/2021/release-0.4.0.md
content/blog/2021/release-0.5.0.md
content/blog/2021/spending_policy_demo.md
layouts/authors/list.html [new file with mode: 0644]
layouts/blog/list.html
layouts/partials/header.html

index 60e9bb6ab21eeb3e1661b90b89e01b468d0b7956..bf32f9ed3772cd68f34cba83fa73ca028a2bafe0 100644 (file)
@@ -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 (file)
index 0000000..db7e645
--- /dev/null
@@ -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 (file)
index 0000000..2fc54d6
--- /dev/null
@@ -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 (file)
index 0000000..ae30b1d
--- /dev/null
@@ -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 (file)
index 0000000..b52d8a7
--- /dev/null
@@ -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 (file)
index 0000000..f03daff
--- /dev/null
@@ -0,0 +1,8 @@
+---
+name: Thunderbiscuit
+photo: 
+twitter: thunderB__
+mastodon: https://fosstodon.org/@thunderbiscuit
+github: https://github.com/thunderBiscuit
+web: https://thunderbiscuit.com/
+---
index fc50a48d3a153ea037bb9b95292bf2a889c47b8f..1ac3c905fee5f6027f2f01a58dfd553c4a37a5c7 100644 (file)
@@ -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
index c222df3cf692a8c701889f911e02539280d092c4..02b74785c79167de2abaf736c8b4a557de5cf26c 100644 (file)
@@ -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
index fc469fd7d0a3ecf17733804a373fa6fc83b585bd..1eccd6a73dbdf04d78f10e69f656fa1558e1e298 100644 (file)
@@ -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
index af63291ba6ed8f00f3eedc72916779520048b662..0e1c34999c5479a4e8c1f4968d932b31e07edfe2 100644 (file)
@@ -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
index 4af9dd9871533336f5067bbda76e8d476cc052f4..460e463ff47cb050ad8656f80a704cee8747037e 100644 (file)
@@ -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
index aed4884d0d573b1eb5d26db19bf8bf5bfe05399d..3ff87771e66e611f3293c67f4583b5716ee442bb 100644 (file)
@@ -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
index 0177c5da683f9ff60891b9b3ef85b70e4d9186ee..78ec4ac3b2673fca1258511276d1f3073e8d3dd0 100644 (file)
@@ -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
index 2d4cc04d893ba8b100a0b5467b5d98c2d031556c..a155c2462c6a85921de338f89c1465462c953566 100644 (file)
@@ -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
index 0fa57ba61388cad13d29522b8dd26fa9612c740f..0dc8cfec6ad188934c331e1fe24b4e160949b230 100644 (file)
@@ -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
index 67f274c4cab258398f5c0ff87f86a6a486579292..09f177c16f0e15c2becd904eed1f9a40c38efd50 100644 (file)
@@ -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
index 2b18c01e70e7f49472b17a9e0ef63a382d67ea15..9be9f32f757c10b2c9daa4cd588160b6ad35fedd 100644 (file)
@@ -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 (file)
index 0000000..54fe9cc
--- /dev/null
@@ -0,0 +1,53 @@
+{{ partial "header.html" . }}
+
+<h1>{{ .Params.name }}</h1>
+
+{{ with .Params.photo }}
+<img src="{{ . }}" alt=""/>
+{{ end }}
+
+{{ with .Content }}
+<h2>Bio</h2>
+{{ .Content }}
+{{ end }}
+
+<h2>Links</h2>
+{{ with .Params.twitter }}
+<ul>
+    <li>
+        <a href="https://twitter.com/{{ . }}" target="_blank">
+            Follow on Twitter
+        </a>
+    </li>
+    {{ end }}
+    {{ with .Params.mastodon }}
+    <li>
+        <a href="{{ . }}" target="_blank">
+            Follow on Mastodon
+        </a>
+    </li>
+    {{ end }}
+    {{ with .Params.github }}
+    <li>
+        <a href="{{ . }}" target="_blank">
+            Follow on Github
+        </a>
+    </li>
+    {{ end }}
+    {{ with .Params.web }}
+    <li>
+        <a href="{{ . }}" target="_blank">
+            Web Page
+        </a>
+    </li>
+    {{ end }}
+</ul>
+
+<h2>Articles</h2>
+<ul>
+    {{ range .Data.Pages }}
+    <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
+    {{ end }}
+</ul>
+
+{{ partial "footer.html" . }}
\ No newline at end of file
index 98fb326413ecf8d999cfa06cd4172eb1495a1453..6f53037a94f0585b29a4cc313e1d7008e2323a80 100644 (file)
         <h3 class="blog-post"><span class="date">{{ .Date.Format "Jan 2" }}</span> <a href="{{ .RelPermalink }}" class="permalink">{{ .Title }}</a></h3>
         {{ if isset .Params "tags" }}
        <span class="blog-post-tags">
-            {{ if isset .Params "author" }}
-                By <a href="{{ "/blog/author/" | relLangURL }}{{ .Params.author | urlize }}">{{ .Params.author }}</a> ยท
+            {{ if isset .Params "authors" }}
+                <span>By </span>
+                {{- range $index, $author := .Params.authors }}
+                  {{- with $.Site.GetPage "taxonomyTerm" (printf "authors/%s" (urlize .)) }}
+                    {{ if gt $index 0 }}
+                      <span>, </span>
+                    {{ end }}
+                    <span><a href="{{ "/authors/" | relLangURL }}{{ .Params.name | urlize }}">{{ .Params.name }}</a></span>
+                  {{ end }}
+                {{ end }}
             {{ end }}
 
             {{ $list := .Params.tags }}
index 3aab16ccc08f5b0abbb6dfe7612ccc11ff58f0cd..427face8ea90faa2b5d33f01b46e8ad3b8f809c9 100644 (file)
           {{if and (not .IsHome) (not .Params.chapter) }}
             {{ if (eq .Type "blog") }}
             <h1 class="blog-title">{{ .Title }} </h1>
-                {{ if isset .Params "author" }}
-                    <span class="blog-author">By <a href="{{ "/blog/author/" | relLangURL }}{{ .Params.author | urlize }}">{{ .Params.author }}</a></span>
-                    <hr>
+            {{ if isset .Params "authors" }}
+                <span class="blog-author">By </span>
+                {{- range $index, $author := .Params.authors }}
+                  {{- with $.Site.GetPage "taxonomyTerm" (printf "authors/%s" (urlize .)) }}
+                    {{ if gt $index 0 }}
+                      <span class="blog-author">, </span>
+                    {{ end }}
+                    <span class="blog-author"><a href="{{ "/authors/" | relLangURL }}{{ .Params.name | urlize }}">{{ .Params.name }}</a></span>
+                  {{ end }}
                 {{ end }}
+            {{ end }}
             {{ else }}
             <h1>
               {{ if or (eq .Kind "taxonomy") (eq .Kind "term") }}