diff --git a/src/posts/first-post.md b/src/posts/first-post.md index a03b4b6e..79af1741 100644 --- a/src/posts/first-post.md +++ b/src/posts/first-post.md @@ -5,6 +5,8 @@ draft: false description: Creating a blog! tags: - intro +redirect_from: + - /blog/first-post --- I have been building a [homelab](https://www.reddit.com/r/homelab/wiki/introduction) for the last few years, mostly to [self-host](https://www.reddit.com/r/selfhosted/) services securely at home without relying on the major cloud providers. I've learned a lot going through the experience and wanted to start sharing some of the knowledge back to the community outside of a few tiny pull requests that I've made. Look for more coming soon! diff --git a/src/posts/moar-fediverse.md b/src/posts/moar-fediverse.md index ae26f5cc..4d026d67 100644 --- a/src/posts/moar-fediverse.md +++ b/src/posts/moar-fediverse.md @@ -8,6 +8,8 @@ tags: - fediverse - homelab - selfhosted +redirect_from: + - /blog/moar-fediverse --- I've been running a single user Mastodon instance for a few months now. It's been running smoothly and has let me interact with the exodus of users from the bird site. But it can be lonely on a single user instance. Discovery can be hard, following #hashtags only shows you posts from diff --git a/src/posts/tailscale-hostnames-for-pi-hole-stats.md b/src/posts/tailscale-hostnames-for-pi-hole-stats.md index 03f7d7e2..b6329992 100644 --- a/src/posts/tailscale-hostnames-for-pi-hole-stats.md +++ b/src/posts/tailscale-hostnames-for-pi-hole-stats.md @@ -7,6 +7,8 @@ tags: - tailscale - pi-hole - magicdns +redirect_from: + - /blog/tailscale-hostnames-for-pi-hole-stats --- [Tailscale](https://tailscale.com) is a fantastic secure mesh VPN that lets you connect all of your devices to each other, no matter where they are or if you've exposed them publicly to the internet. I use it extensively to use all my homelab services and run it on virtually every server. They have a very generous free tier and hope that enthusiasts enjoy it so much that they bring it to their workplace. diff --git a/src/redirect.njk b/src/redirect.njk new file mode 100644 index 00000000..82c18025 --- /dev/null +++ b/src/redirect.njk @@ -0,0 +1,37 @@ +---js +{ + pagination: { + data: "collections.all", + size: 1, + alias: "redirect", + before: function (data) { + return data.reduce((redirects, page) => { + if (Array.isArray(page.data.redirect_from)) { + for (let url of page.data.redirect_from) { + redirects.push({ to: page.url, from: url }); + } + } else if (typeof page.data.redirect_from === 'string') { + redirects.push({ to: page.url, from: page.data.redirect_from }); + } + return redirects; + }, []); + }, + addAllPagesToCollections: false, + }, + permalink: "{{ redirect.from }}/index.html", + eleventyExcludeFromCollections: true, +} +--- + + + + Redirecting… + + + + +

Redirecting…

+ Click here if you are not redirected. +