aboutsummaryrefslogtreecommitdiff
path: root/lume/src
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-10-14 11:38:13 -0400
committerXe Iaso <me@xeiaso.net>2023-10-14 11:38:16 -0400
commitdf59f21fbc27ec37375613be35fd04eb3033189e (patch)
treedb400299783c2ef7d56976be0313939f16382804 /lume/src
parent782faa8d445945c24016a0384480d337abddbab1 (diff)
downloadxesite-df59f21fbc27ec37375613be35fd04eb3033189e.tar.xz
xesite-df59f21fbc27ec37375613be35fd04eb3033189e.zip
internal/lume: make pages for post series
I'm probably reading something wrong in the documentation for Lume, but I wasn't able to find an obvious way to generate pages for each of the post series programmatically. This is a bit of a hacky workaround that makes the Lume driver write individual JSX files for each series defined in the Dhall source. It should work for my needs though. Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lume/src')
-rw-r--r--lume/src/blog/series/.gitignore2
-rw-r--r--lume/src/blog/series/_data.yml1
-rw-r--r--lume/src/blog/series/index.jsx26
3 files changed, 29 insertions, 0 deletions
diff --git a/lume/src/blog/series/.gitignore b/lume/src/blog/series/.gitignore
new file mode 100644
index 0000000..3410fa1
--- /dev/null
+++ b/lume/src/blog/series/.gitignore
@@ -0,0 +1,2 @@
+*.jsx
+!index.jsx
diff --git a/lume/src/blog/series/_data.yml b/lume/src/blog/series/_data.yml
new file mode 100644
index 0000000..ab74b42
--- /dev/null
+++ b/lume/src/blog/series/_data.yml
@@ -0,0 +1 @@
+type: info
diff --git a/lume/src/blog/series/index.jsx b/lume/src/blog/series/index.jsx
new file mode 100644
index 0000000..1e5cbb8
--- /dev/null
+++ b/lume/src/blog/series/index.jsx
@@ -0,0 +1,26 @@
+export const title = "Post Series";
+export const layout = "base.njk";
+
+export default ({ seriesDescriptions }) => {
+ const dateOptions = { year: "numeric", month: "2-digit", day: "2-digit" };
+
+ return (
+ <>
+ <h1 className="text-3xl mb-4">{title}</h1>
+ <p className="mb-4">
+ TODO: filler text here
+ </p>
+
+ <ul class="list-disc ml-4 mb-4">
+ {Object
+ .keys(seriesDescriptions)
+ .map((k) => [k, seriesDescriptions[k]])
+ .map(([k, v]) => (
+ <li>
+ <a href={`/blog/series/${k}`}>{k}</a>: {v}
+ </li>
+ ))}
+ </ul>
+ </>
+ );
+};