aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-09-24 16:41:51 -0400
committerXe Iaso <me@xeiaso.net>2023-09-24 16:41:51 -0400
commitfa02821efbe6f963a4ee937a70d4ece96ed13b12 (patch)
treee7dcf342880991be9ba311fc35aa3fe3d739abf6
parentbf4dc29606cb1ce2df95e31064c15cb7e72252d9 (diff)
downloadxesite-fa02821efbe6f963a4ee937a70d4ece96ed13b12.tar.xz
xesite-fa02821efbe6f963a4ee937a70d4ece96ed13b12.zip
add a notfound page
Signed-off-by: Xe Iaso <me@xeiaso.net>
-rw-r--r--lume/_config.ts2
-rw-r--r--lume/src/blog.jsx9
-rw-r--r--lume/src/blog/social-proximity-networks-2021-02-02.md10
-rw-r--r--lume/src/notfound.md8
4 files changed, 16 insertions, 13 deletions
diff --git a/lume/_config.ts b/lume/_config.ts
index b0e46b6..bbb6609 100644
--- a/lume/_config.ts
+++ b/lume/_config.ts
@@ -22,6 +22,7 @@ import rehypePrism from "npm:rehype-prism-plus/all";
const site = lume({
src: "./src",
+ emptyDist: false,
});
site.copy("static");
@@ -50,6 +51,7 @@ site.use(feed({
site.use(mdx({
components: {
"XeblogConv": XeblogConv,
+ "XesiteConv": XeblogConv,
"XeblogHero": XeblogHero,
"XeblogPicture": XeblogPicture,
"XeblogSlide": XeblogSlide,
diff --git a/lume/src/blog.jsx b/lume/src/blog.jsx
index 796e1ff..80ddf6b 100644
--- a/lume/src/blog.jsx
+++ b/lume/src/blog.jsx
@@ -22,12 +22,15 @@ export default ({ search }) => {
For a breakdown by post series, see <a href="/blog/series">here</a>.
</p>
<ul class="list-disc ml-4 mb-4">
- {search.pages("type=blog", "order date=desc").map((post) => (
+ {search.pages("type=blog", "order date=desc").map((post) => {
+ const url = post.data.redirect_to ? post.data.redirect_to : post.data.url;
+ return (
<li>
{post.data.date.toLocaleDateString("en-US", dateOptions)} -{" "}
- <a href={post.data.url}>{post.data.title}</a>
+ <a href={url}>{post.data.title}</a>
</li>
- ))}
+ );
+ })}
</ul>
</>
);
diff --git a/lume/src/blog/social-proximity-networks-2021-02-02.md b/lume/src/blog/social-proximity-networks-2021-02-02.md
deleted file mode 100644
index 9dc7c52..0000000
--- a/lume/src/blog/social-proximity-networks-2021-02-02.md
+++ /dev/null
@@ -1,10 +0,0 @@
----
-title: "Philosophy of Tailscale: Social proximity networks"
-date: 2021-02-02
-tags:
- - link
-redirect_to: https://tailscale.com/blog/social-proximity-networks/
----
-
-Check out this post [on the Tailscale
-blog](https://tailscale.com/blog/social-proximity-networks/)!
diff --git a/lume/src/notfound.md b/lume/src/notfound.md
new file mode 100644
index 0000000..2a8c4d8
--- /dev/null
+++ b/lume/src/notfound.md
@@ -0,0 +1,8 @@
+---
+title: Can't find {{.Path}}
+layout: base.njk
+---
+
+<h1 class="text-3xl font-bold">Can't find {{.Path}}</h1>
+
+<p class="text-lg">The page you're looking for doesn't exist. If it should, please contact me at <a href="/contact">/contact</a>.</p> \ No newline at end of file