From ca8e6824eaa711105f4092365792720c9dde026b Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Thu, 18 Jun 2026 19:21:59 +0100 Subject: remove Astro website --- website/src/pages/blog/[...slug].astro | 28 --------- website/src/pages/blog/index.astro | 23 ------- website/src/pages/blog/rss.xml.ts | 37 ------------ website/src/pages/blog/subscribe.astro | 90 --------------------------- website/src/pages/contact.astro | 97 ------------------------------ website/src/pages/error.astro | 14 ----- website/src/pages/index.astro | 11 ---- website/src/pages/links/rss.xml.ts | 33 ---------- website/src/pages/microlog/[...slug].astro | 26 -------- website/src/pages/microlog/index.astro | 13 ---- website/src/pages/microlog/rss.xml.ts | 29 --------- 11 files changed, 401 deletions(-) delete mode 100644 website/src/pages/blog/[...slug].astro delete mode 100644 website/src/pages/blog/index.astro delete mode 100644 website/src/pages/blog/rss.xml.ts delete mode 100644 website/src/pages/blog/subscribe.astro delete mode 100644 website/src/pages/contact.astro delete mode 100644 website/src/pages/error.astro delete mode 100644 website/src/pages/index.astro delete mode 100644 website/src/pages/links/rss.xml.ts delete mode 100644 website/src/pages/microlog/[...slug].astro delete mode 100644 website/src/pages/microlog/index.astro delete mode 100644 website/src/pages/microlog/rss.xml.ts (limited to 'website/src/pages') 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; ---- - - - { post.filePath?.endsWith('.gmi') ? : } - 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'; ---- - - - - - - - - -
- -
-

How to subscribe to this blog

-
-
-
- - 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: ` - /images/headshot.webp - en-GB - `, - 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"; - ---- - - -
-

How to subscribe to my blog

- -

- The short version: use my RSS file or my - gemlog. -

- -

- 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. -

- -

- 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 - https://joeac.net/blog/rss.xml. - 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! -

- -

- 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. -

- -

- If you're not persuaded, try reading - - Cory Doctorow explaining why RSS is ridiculously good - . He's terrifyingly persuasive. Also, read his novels! -

- -

- 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. - Feedly and - Inoreader have free tiers. -

- -

- If you want to have a little more control, you can self-host an RSS - reader, like Tiny Tiny RSS, - Miniflux, or - FreshRSS. 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. -

- - - -

- For the terminally geeky, there is also - Newsboat. I used it for ages, it works - fabulously, but it's all in the terminal, so you have to be OK with that. -

- -

- 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. -

-
-
diff --git a/website/src/pages/contact.astro b/website/src/pages/contact.astro deleted file mode 100644 index 85a5155..0000000 --- a/website/src/pages/contact.astro +++ /dev/null @@ -1,97 +0,0 @@ ---- -import OtpDialog from "../components/OtpDialog.astro"; -import Page from "../layouts/Page.astro"; -export const prerender = false; ---- - - - - -
-

Contact me

-
- - - - -
diff --git a/website/src/pages/error.astro b/website/src/pages/error.astro deleted file mode 100644 index dd7188a..0000000 --- a/website/src/pages/error.astro +++ /dev/null @@ -1,14 +0,0 @@ ---- -import Page from '../layouts/Page.astro'; ---- - - -
-

Got lost?

- -

- If you’re on this page, something’s probably gone wrong. Try going to - my homepage instead. -

-
-
diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro deleted file mode 100644 index 8f26424..0000000 --- a/website/src/pages/index.astro +++ /dev/null @@ -1,11 +0,0 @@ ---- -import BlogFeed from '../components/BlogFeed.astro'; -import LinksFeed from '../components/LinksFeed.astro'; -import Me from '../components/Me.astro'; -import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; -import Page from '../layouts/Page.astro'; ---- - - - - diff --git a/website/src/pages/links/rss.xml.ts b/website/src/pages/links/rss.xml.ts deleted file mode 100644 index 3f9e9a0..0000000 --- a/website/src/pages/links/rss.xml.ts +++ /dev/null @@ -1,33 +0,0 @@ -import path from 'node:path'; -import rss from '@astrojs/rss'; -import type { APIContext } from 'astro'; -import LINKS from '../../data/links.ts'; -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!; - - return rss({ - title: 'Joe Carstairs’ links', - description: 'An assortment of links I’m accumulating.', - customData: ` - /images/headshot.webp - en-GB - `, - site: path.join(site.toString(), 'links'), - trailingSlash: false, - items: LINKS.map((link) => ({ - link: link.href, - title: link.title, - content: mdParser.render(link.description), - pubDate: new Date(link.isoDateAdded), - description: mdParser.render(link.description), - author: 'Joe Carstairs', - })), - }) -} diff --git a/website/src/pages/microlog/[...slug].astro b/website/src/pages/microlog/[...slug].astro deleted file mode 100644 index 69c94b0..0000000 --- a/website/src/pages/microlog/[...slug].astro +++ /dev/null @@ -1,26 +0,0 @@ ---- -import { type CollectionEntry, getCollection, render } from 'astro:content'; -import MicrologPost from '../../layouts/MicrologPost.astro'; -import { renderGemtextToHtml } from '../../renderGemtextToHtml'; - -export async function getStaticPaths() { - const posts = await getCollection('microlog'); - return posts.map((post) => ({ - params: { slug: post.id }, - props: post, - })); -} -type Props = CollectionEntry<'microlog'>; - -const { id: slug, body } = Astro.props; -const pubDateStr = slug.replaceAll(/\.[0-9]+/g, ''); -const pubDate = new Date(pubDateStr); -if (isNaN(pubDate.valueOf())) { - throw new Error(`Could not construct a valid publication date for microlog post: ${slug}`); -} -const Content = renderGemtextToHtml(body ?? '', pubDateStr); ---- - - - - diff --git a/website/src/pages/microlog/index.astro b/website/src/pages/microlog/index.astro deleted file mode 100644 index dd1ee16..0000000 --- a/website/src/pages/microlog/index.astro +++ /dev/null @@ -1,13 +0,0 @@ ---- -import { SITE_TITLE, SITE_DESCRIPTION } from '../../consts'; -import MicrologFeed from '../../components/MicrologFeed.astro'; -import Page from '../../layouts/Page.astro'; ---- - - - - - - diff --git a/website/src/pages/microlog/rss.xml.ts b/website/src/pages/microlog/rss.xml.ts deleted file mode 100644 index fa04b32..0000000 --- a/website/src/pages/microlog/rss.xml.ts +++ /dev/null @@ -1,29 +0,0 @@ -import path from "node:path"; -import rss from "@astrojs/rss"; -import type { APIContext } from "astro"; -import { getCollection } from "astro:content"; -import { renderGemtextToHtml } from "../../renderGemtextToHtml"; - -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("microlog"); - - return rss({ - title: "Joe Carstairs’ microlog", - description: "My private X feed I guess?", - customData: ` - /images/headshot.webp - en-GB - `, - site: path.join(site.toString(), "microlog"), - trailingSlash: false, - items: posts.map((post) => ({ - link: `/microlog/${post.id}`, - title: post.id, - content: renderGemtextToHtml(post.body ?? ""), - pubDate: new Date(post.id.replace(/\.[0-9]+$/g, "")), - author: "Joe Carstairs", - })), - }); -} -- cgit v1.2.3