From e8347815f7b1bfce0d5db600cdffc60ba1b3531a Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sun, 2 Apr 2023 15:01:32 -0400 Subject: linkpost over my backlog on the tailscale blog Signed-off-by: Xe Iaso --- src/post/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/post') diff --git a/src/post/mod.rs b/src/post/mod.rs index be3bf04..2338365 100644 --- a/src/post/mod.rs +++ b/src/post/mod.rs @@ -46,7 +46,11 @@ impl Into for Post { .title(self.front_matter.title.clone()) .content_html(self.body_html) .id(format!("https://xeiaso.net/{}", self.link)) - .url(format!("https://xeiaso.net/{}", self.link)) + .url(if let Some(url) = self.front_matter.redirect_to.as_ref() { + url.clone() + } else { + format!("https://xeiaso.net/{}", self.link) + }) .date_published(self.date.to_rfc3339()) .author( xe_jsonfeed::Author::new() -- cgit v1.2.3