aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2021-04-18 10:40:03 -0400
committerChristine Dodrill <me@christine.website>2021-04-18 10:40:03 -0400
commitf06819cff139562581acfb10715b6176b567ab92 (patch)
tree5218de48c48b07735dc887b5bcb475f0ad26d9f7
parente096c5bb00008cbae8cd680045d1831098844786 (diff)
downloadxesite-f06819cff139562581acfb10715b6176b567ab92.tar.xz
xesite-f06819cff139562581acfb10715b6176b567ab92.zip
Revert "backpost a bunch of other articles, make linkposts work properly"
This reverts commit 4dde8b26b8be9d9c11bb3920c942ecd6624e419e.
-rw-r--r--blog/animal-crossing-stability-2021-02-28.markdown12
-rw-r--r--blog/immigration-2021-04-11.markdown12
-rw-r--r--blog/mara-ransack-castle-2021-03-28.markdown12
-rw-r--r--blog/paper-mario-origami-king-2021-01-30.markdown12
-rw-r--r--blog/plurality-cyberpunk-xenoblade-2021-02-14.markdown12
-rw-r--r--blog/sisyphean-dns-client-linux-2021-04-15.markdown12
-rw-r--r--blog/social-proximity-networks-2021-02-02.markdown12
-rw-r--r--src/post/mod.rs19
-rw-r--r--templates/blog_atom.rs.xml4
-rw-r--r--templates/blog_rss.rs.xml4
-rw-r--r--templates/blogindex.rs.html2
11 files changed, 8 insertions, 105 deletions
diff --git a/blog/animal-crossing-stability-2021-02-28.markdown b/blog/animal-crossing-stability-2021-02-28.markdown
deleted file mode 100644
index b8513be..0000000
--- a/blog/animal-crossing-stability-2021-02-28.markdown
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: "Animal Crossing New Horizons: An Island of Stability in an Unstable World"
-date: 2021-02-28
-tags:
- - link
-redirect_to: https://www.getrevue.co/profile/theprincessxena/issues/animal-crossing-new-horizons-an-island-of-stability-in-an-unstable-world-313933
----
-
-# Animal Crossing New Horizons: An Island of Stability in an Unstable World
-
-Check out this post [on my
-newsletter](https://www.getrevue.co/profile/theprincessxena/issues/animal-crossing-new-horizons-an-island-of-stability-in-an-unstable-world-313933)!
diff --git a/blog/immigration-2021-04-11.markdown b/blog/immigration-2021-04-11.markdown
deleted file mode 100644
index 0d00cea..0000000
--- a/blog/immigration-2021-04-11.markdown
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: "Immigration"
-date: 2021-04-11
-tags:
- - link
-redirect_to: https://www.getrevue.co/profile/theprincessxena/issues/immigration-313938
----
-
-# Immigration
-
-Check out this post [on my
-newsletter](https://www.getrevue.co/profile/theprincessxena/issues/immigration-313938)!
diff --git a/blog/mara-ransack-castle-2021-03-28.markdown b/blog/mara-ransack-castle-2021-03-28.markdown
deleted file mode 100644
index 3857390..0000000
--- a/blog/mara-ransack-castle-2021-03-28.markdown
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: "Mara's Ransack of Castle Charon"
-date: 2021-03-28
-tags:
- - link
-redirect_to: https://www.getrevue.co/profile/theprincessxena/issues/mara-s-ransack-of-castle-charon-313935
----
-
-# Mara's Ransack of Castle Charon
-
-Check out this post [on my
-newsletter](https://www.getrevue.co/profile/theprincessxena/issues/mara-s-ransack-of-castle-charon-313935)!
diff --git a/blog/paper-mario-origami-king-2021-01-30.markdown b/blog/paper-mario-origami-king-2021-01-30.markdown
deleted file mode 100644
index 9930fcf..0000000
--- a/blog/paper-mario-origami-king-2021-01-30.markdown
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: "My Thoughts on Paper Mario and the Origami King"
-date: 2021-01-30
-tags:
- - link
-redirect_to: https://www.getrevue.co/profile/theprincessxena/issues/my-thoughts-on-paper-mario-and-the-origami-king-312718
----
-
-# My Thoughts on Paper Mario and the Origami King
-
-Check out this post [on my
-newsletter](https://www.getrevue.co/profile/theprincessxena/issues/my-thoughts-on-paper-mario-and-the-origami-king-312718)!
diff --git a/blog/plurality-cyberpunk-xenoblade-2021-02-14.markdown b/blog/plurality-cyberpunk-xenoblade-2021-02-14.markdown
deleted file mode 100644
index 508d294..0000000
--- a/blog/plurality-cyberpunk-xenoblade-2021-02-14.markdown
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: "Plurality as Portrayed in Cyberpunk 2077 and Xenoblade Chronicles 2"
-date: 2021-02-14
-tags:
- - link
-redirect_to: https://www.getrevue.co/profile/theprincessxena/issues/plurality-as-portrayed-in-cyberpunk-2077-and-xenoblade-chronicles-2-313929
----
-
-# Plurality as Portrayed in Cyberpunk 2077 and Xenoblade Chronicles 2
-
-Check out this post [on my
-newsletter](https://www.getrevue.co/profile/theprincessxena/issues/plurality-as-portrayed-in-cyberpunk-2077-and-xenoblade-chronicles-2-313929)!
diff --git a/blog/sisyphean-dns-client-linux-2021-04-15.markdown b/blog/sisyphean-dns-client-linux-2021-04-15.markdown
deleted file mode 100644
index b5b652f..0000000
--- a/blog/sisyphean-dns-client-linux-2021-04-15.markdown
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: "The Sisyphean Task Of DNS Client Config on Linux"
-date: 2021-04-15
-tags:
- - link
-redirect_to: https://tailscale.com/blog/sisyphean-dns-client-linux/
----
-
-# The Sisyphean Task Of DNS Client Config on Linux
-
-Check out this post [on the Tailscale
-blog](https://tailscale.com/blog/sisyphean-dns-client-linux/)!
diff --git a/blog/social-proximity-networks-2021-02-02.markdown b/blog/social-proximity-networks-2021-02-02.markdown
deleted file mode 100644
index beb395c..0000000
--- a/blog/social-proximity-networks-2021-02-02.markdown
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: "Philosophy of Tailscale: Social proximity networks"
-date: 2021-02-02
-tags:
- - link
-redirect_to: https://tailscale.com/blog/social-proximity-networks/
----
-
-# Philosophy of Tailscale: Social proximity networks
-
-Check out this post [on the Tailscale
-blog](https://tailscale.com/blog/social-proximity-networks/)!
diff --git a/src/post/mod.rs b/src/post/mod.rs
index 2b1b7e2..b5303a8 100644
--- a/src/post/mod.rs
+++ b/src/post/mod.rs
@@ -20,8 +20,8 @@ impl Into<jsonfeed::Item> for Post {
let mut result = jsonfeed::Item::builder()
.title(self.front_matter.title)
.content_html(self.body_html)
- .id(self.link.clone())
- .url(self.link)
+ .id(format!("https://christine.website/{}", self.link))
+ .url(format!("https://christine.website/{}", self.link))
.date_published(self.date.to_rfc3339())
.author(
jsonfeed::Author::new()
@@ -30,10 +30,6 @@ impl Into<jsonfeed::Item> for Post {
.avatar("https://christine.website/static/img/avatar.png"),
);
- if let Some(url) = self.front_matter.redirect_to {
- result = result.url(url);
- }
-
let mut tags: Vec<String> = vec![];
if let Some(series) = self.front_matter.series {
@@ -83,16 +79,7 @@ async fn read_post(dir: &str, fname: PathBuf) -> Result<Post> {
let body = &body[content_offset..];
let date = NaiveDate::parse_from_str(&front_matter.clone().date, "%Y-%m-%d")
.map_err(|why| eyre!("error parsing date in {:?}: {}", fname, why))?;
-
- let link = match front_matter.redirect_to {
- Some(ref url) => url.clone(),
- None => format!(
- "https://christine.website/{}/{}",
- dir,
- fname.file_stem().unwrap().to_str().unwrap()
- ),
- };
-
+ let link = format!("{}/{}", dir, fname.file_stem().unwrap().to_str().unwrap());
let body_html = crate::app::markdown::render(&body)
.wrap_err_with(|| format!("can't parse markdown for {:?}", fname))?;
let date: DateTime<FixedOffset> =
diff --git a/templates/blog_atom.rs.xml b/templates/blog_atom.rs.xml
index 5fffaad..0296da6 100644
--- a/templates/blog_atom.rs.xml
+++ b/templates/blog_atom.rs.xml
@@ -17,10 +17,10 @@
<generator uri="@env!("CARGO_PKG_REPOSITORY")" version="@env!("CARGO_PKG_VERSION")">@env!("CARGO_PKG_NAME")</generator>
@for post in posts {
<entry>
- <id>@post.link</id>
+ <id>https://christine.website/@post.link</id>
<title>@post.front_matter.title</title>
<published>@post.date.to_rfc3339()</published>
- <link href="@post.link" rel="alternate"/>
+ <link href="https://christine.website/@post.link" rel="alternate"/>
</entry>
}
</feed>
diff --git a/templates/blog_rss.rs.xml b/templates/blog_rss.rs.xml
index e300d75..0e87ad1 100644
--- a/templates/blog_rss.rs.xml
+++ b/templates/blog_rss.rs.xml
@@ -12,9 +12,9 @@
<ttl>1440</ttl>
@for post in posts {
<item>
- <guid>@post.link</guid>
+ <guid>https://christine.website/@post.link</guid>
<title>@post.front_matter.title</title>
- <link>@post.link</link>
+ <link>https://christine.website/@post.link</link>
<description><![CDATA[@Html(post.body_html)]]></description>
<pubDate>@post.date.to_rfc2822()</pubDate>
</item>
diff --git a/templates/blogindex.rs.html b/templates/blogindex.rs.html
index 02f34d6..e050e5b 100644
--- a/templates/blogindex.rs.html
+++ b/templates/blogindex.rs.html
@@ -14,7 +14,7 @@
<p>
<ul>
@for post in posts {
- <li>@post.date.format("%Y-%m-%d") - <a href="@post.link">@post.front_matter.title</a></li>
+ <li>@post.date.format("%Y-%m-%d") - <a href="/@post.link">@post.front_matter.title</a></li>
}
</ul>
</p>