aboutsummaryrefslogtreecommitdiff
path: root/src/tmpl
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-04-02 15:01:32 -0400
committerXe Iaso <me@xeiaso.net>2023-04-02 15:01:32 -0400
commite8347815f7b1bfce0d5db600cdffc60ba1b3531a (patch)
treedb3d0d992a91219c7787b3d2bfb8204bbe9f2f2e /src/tmpl
parent2cc14d7e10b29decf3ef1e88550ec603a78322e2 (diff)
downloadxesite-e8347815f7b1bfce0d5db600cdffc60ba1b3531a.tar.xz
xesite-e8347815f7b1bfce0d5db600cdffc60ba1b3531a.zip
linkpost over my backlog on the tailscale blog
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'src/tmpl')
-rw-r--r--src/tmpl/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmpl/mod.rs b/src/tmpl/mod.rs
index d5ae9d4..1941d94 100644
--- a/src/tmpl/mod.rs
+++ b/src/tmpl/mod.rs
@@ -160,7 +160,7 @@ pub fn post_index(posts: &Vec<Post>, title: &str, show_extra: bool) -> Markup {
li {
(post.detri())
" - "
- a href={"/" (post.link)} { (post.front_matter.title) }
+ a href={ @if post.front_matter.redirect_to.as_ref().is_some() {(post.front_matter.redirect_to.as_ref().unwrap())} @else {"/" (post.link)}} { (post.front_matter.title) }
}
}
}