summaryrefslogtreecommitdiff
path: root/website/src/pages/blog
diff options
context:
space:
mode:
Diffstat (limited to 'website/src/pages/blog')
-rw-r--r--website/src/pages/blog/[...slug].astro28
-rw-r--r--website/src/pages/blog/index.astro23
-rw-r--r--website/src/pages/blog/rss.xml.ts37
-rw-r--r--website/src/pages/blog/subscribe.astro90
4 files changed, 0 insertions, 178 deletions
diff --git a/website/src/pages/blog/[...slug].astro b/website/src/pages/blog/[...slug].astro
deleted file mode 100644
index 54cf9ac..0000000
--- a/website/src/pages/blog/[...slug].astro
+++ /dev/null
@@ -1,28 +0,0 @@
----
-import { type CollectionEntry, getCollection, render } from 'astro:content';
-import BlogPost from '../../layouts/BlogPost.astro';
-import { renderGemtextToHtml } from '../../renderGemtextToHtml';
-
-export async function getStaticPaths() {
- const posts = await getCollection('blog');
- return posts.map((post) => ({
- params: { slug: post.id },
- props: post,
- }));
-}
-type Props = CollectionEntry<'blog'>;
-
-const post = Astro.props;
-const Content = post.filePath?.endsWith('.gmi')
- ? renderGemtextToHtml(post.body ?? '', post.data.title)
- : (await render(post)).Content;
----
-
-<BlogPost
- title={post.data.title}
- description={post.data.description}
- pubDate={post.data.pubDate ?? new Date(post.id)}
- updatedDate={post.data.updatedDate}
->
- { post.filePath?.endsWith('.gmi') ? <Fragment set:html={Content}></Fragment> : <Content />}
-</BlogPost>
diff --git a/website/src/pages/blog/index.astro b/website/src/pages/blog/index.astro
deleted file mode 100644
index df758ed..0000000
--- a/website/src/pages/blog/index.astro
+++ /dev/null
@@ -1,23 +0,0 @@
----
-import BaseHead from '../../components/BaseHead.astro';
-import { SITE_TITLE, SITE_DESCRIPTION } from '../../consts';
-import BlogFeed from '../../components/BlogFeed.astro';
-import Navbar from '../../components/Navbar.astro';
----
-
-<!doctype html>
-<html lang="en">
- <head>
- <BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
- </head>
- <body>
- <Navbar />
- <main>
- <BlogFeed headingLevel={1}>
- <section>
- <p><a href="/blog/subscribe">How to subscribe to this blog</a></p>
- </section>
- </BlogFeed>
- </main>
- </body>
-</html>
diff --git a/website/src/pages/blog/rss.xml.ts b/website/src/pages/blog/rss.xml.ts
deleted file mode 100644
index 5b90fd0..0000000
--- a/website/src/pages/blog/rss.xml.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import path from 'node:path';
-import rss from '@astrojs/rss';
-import type { APIContext } from 'astro';
-import { getCollection } from 'astro:content';
-import MarkdownIt from 'markdown-it';
-
-const mdParser = new MarkdownIt({
- html: true
-});
-
-export async function GET(context: APIContext) {
- // `site` is guaranteed to exist because we define it in our Astro config
- const site = context.site!;
- const posts = await getCollection('blog');
-
- return rss({
- title: 'Joe Carstairs’ blog',
- description: 'Short posts on random topics I find interesting',
- customData: `
- <image>/images/headshot.webp</image>
- <language>en-GB</language>
- `,
- site: path.join(site.toString(), 'blog'),
- trailingSlash: false,
- items: posts.map((post) => ({
- link: `/blog/${post.id}`,
- title: post.data.title,
- content: mdParser.render(post.body ?? ''),
- pubDate: post.data.pubDate,
- description: post.data.description,
- author: 'Joe Carstairs',
-
- // A page for displaying comments related to the item
- /* commentsUrl: `${post.slug}/comments`, */
- })),
- })
-}
diff --git a/website/src/pages/blog/subscribe.astro b/website/src/pages/blog/subscribe.astro
deleted file mode 100644
index cbb6237..0000000
--- a/website/src/pages/blog/subscribe.astro
+++ /dev/null
@@ -1,90 +0,0 @@
----
-import Page from "../../layouts/Page.astro";
-
----
-
-<Page
- title="How to subscribe to joeac's blog"
- description="How to subscribe to joeac's blog"
->
- <section>
- <h1>How to subscribe to my blog</h1>
-
- <p>
- The short version: use my <a href="/blog/rss.xml">RSS file</a> or my
- <a href="gemini://joeac.net/logs/longlog.gmi">gemlog</a>.
- </p>
-
- <p>
- If neither of those things means anything to you, no worries. You could
- just look at my website every once in a while, but that gets old. A better
- way is to use my RSS file. Here's how.
- </p>
-
- <p>
- An RSS file, if you don't know, is a file containing a list of posts in a
- format that's so stupid even computers can understand it. Mine is at
- <a href="https://joeac.net/blog/rss.xml">https://joeac.net/blog/rss.xml</a>.
- Since computers can understand it, you can get software to read it
- automatically and tell you when I've made a new blog post. That's much less
- hassle than having to check manually yourself!
- </p>
-
- <p>
- I'm not the only person serving RSS files, of course. You might not have
- heard of them, but they're actually all over the Web. In the early days of
- the Web, everyone was using them, so they've ended up built in to a whole
- load of foundational Web technology, and hence ubiquitous, even if most
- Web users have forgotten they exist. Once you've subscribed to my blog,
- you can subscribe to basically any blog, podcast, or YouTube channel, and
- a lot of other Websites for news, organisations, whatever. Point a
- well-designed RSS aggregator or RSS reader at most Websites, and it'll
- automatically find an associated RSS feed.
- </p>
-
- <p>
- If you're not persuaded, try reading
- <a href="https://doctorow.medium.com/you-should-be-using-an-rss-reader-76aed31151f9">
- Cory Doctorow explaining why RSS is ridiculously good
- </a>. He's terrifyingly persuasive. Also, read his novels!
- </p>
-
- <p>
- If you just want to give it a go quickly, probably the quickest way is to
- use someone else's RSS aggregator that they'll let you use as a service.
- <a href="https://feedly.com/news-reader">Feedly</a> and
- <a href="https://www.inoreader.com">Inoreader</a> have free tiers.
- </p>
-
- <p>
- If you want to have a little more control, you can self-host an RSS
- reader, like <a href="https://tt-rss.org">Tiny Tiny RSS</a>,
- <a href="https://miniflux.app">Miniflux</a>, or
- <a href="https://freshrss.org">FreshRSS</a>. But why would you do that?
- Self-hosting is complicated! Why not just use a normal, local app? Here are
- some options for that you might want to investigate. All these are active
- free and open-source software projects at the time of writing.
- </p>
-
- <ul>
- <li><a href="https://hyliu.me/fluent-reader">Fluent Reader</a> (Linux, Windows, Mac, also mobile I think?)</li>
- <li><a href="https://www.rssowl.org">RSSOwl</a> (Linux, Windows, Mac)</li>
- <li><a href="https://capyreader.com">Capy Reader</a> (Android)</li>
- <li><a href="https://apps.kde.org/en-gb/akregator">Akregator</a> (Linux, Windows (unstable))</li>
- <li><a href="https://gfeeds.gabmus.org">GFeeds</a> (Linux)</li>
- <li><a href="https://lzone.de/liferea">Liferea</a> (Linux)</li>
- </ul>
-
- <p>
- For the terminally geeky, there is also
- <a href="https://newsboat.org">Newsboat</a>. I used it for ages, it works
- fabulously, but it's all in the terminal, so you have to be OK with that.
- </p>
-
- <p>
- You can also just enter 'RSS feed reader' into your favourite search
- engine, software distribution, or app store and see what comes up. Try
- adding 'FOSS' into the query to prioritise free, open-source software.
- </p>
- </section>
-</Page>