aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2021-01-19 20:35:13 -0500
committerChristine Dodrill <me@christine.website>2021-01-19 20:35:13 -0500
commit444eee96b03d3cb97114c68da995db7d038c63cf (patch)
treec198824566ca53f6d0ed75d4d92d1b335345b978
parentb40cb9aa784fed4f90bb1c43a6cd4ffda2f18399 (diff)
downloadxesite-444eee96b03d3cb97114c68da995db7d038c63cf.tar.xz
xesite-444eee96b03d3cb97114c68da995db7d038c63cf.zip
blog: add redirect posts, tailscale nixos post
Signed-off-by: Christine Dodrill <me@christine.website>
-rw-r--r--blog/nixos-minecraft-tailscale-blog-2021-01-19.markdown12
-rw-r--r--src/post/frontmatter.rs1
-rw-r--r--templates/blogpost.rs.html6
3 files changed, 19 insertions, 0 deletions
diff --git a/blog/nixos-minecraft-tailscale-blog-2021-01-19.markdown b/blog/nixos-minecraft-tailscale-blog-2021-01-19.markdown
new file mode 100644
index 0000000..b8baa39
--- /dev/null
+++ b/blog/nixos-minecraft-tailscale-blog-2021-01-19.markdown
@@ -0,0 +1,12 @@
+---
+title: "Tailscale on NixOS: A New Minecraft Server in Ten Minutes"
+date: 2021-01-19
+tags:
+ - link
+redirect_to: https://tailscale.com/blog/nixos-minecraft/
+---
+
+# Tailscale on NixOS: A New Minecraft Server in Ten Minutes
+
+Check out this post [on the Tailscale
+blog](https://tailscale.com/blog/nixos-minecraft/)!
diff --git a/src/post/frontmatter.rs b/src/post/frontmatter.rs
index f2c1587..595079f 100644
--- a/src/post/frontmatter.rs
+++ b/src/post/frontmatter.rs
@@ -12,6 +12,7 @@ pub struct Data {
pub image: Option<String>,
pub thumb: Option<String>,
pub show: Option<bool>,
+ pub redirect_to: Option<String>,
}
enum State {
diff --git a/templates/blogpost.rs.html b/templates/blogpost.rs.html
index 6ac3c1e..9438546 100644
--- a/templates/blogpost.rs.html
+++ b/templates/blogpost.rs.html
@@ -45,6 +45,12 @@
@}
</script>
+@if let Some(to) = post.front_matter.redirect_to.clone() {
+ <script>
+ window.location.replace("@to");
+ </script>
+}
+
@body
<hr />