diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 2717b54..b61d8fe 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -10,7 +10,7 @@ interface Props { title: string; description: string; path?: string; - ogImage?: string; + ogImage: string; } const defaultTitle = siteConfig.title diff --git a/src/pages/404.astro b/src/pages/404.astro deleted file mode 100644 index c73b661..0000000 --- a/src/pages/404.astro +++ /dev/null @@ -1,25 +0,0 @@ ---- -import Layout from '../layouts/Layout.astro'; - -const url = Astro.url.pathname ---- - - -

command not found.

- -
-

sh: ~{url}: command not found.

- -
- help -
-

- Looks like this is an unknown command or file, try: -

-

- Return to Home -

-
-
-
-
\ No newline at end of file diff --git a/src/pages/blog.astro b/src/pages/blog.astro index 08c41a6..0e7f986 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog.astro @@ -6,7 +6,7 @@ const posts = await getCollection('posts'); posts.sort((a, b) => new Date(b.data.pubDate).getTime() - new Date(a.data.pubDate).getTime()); --- - +

~/blog

diff --git a/src/pages/index.astro b/src/pages/index.astro index f8bda82..79733f8 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,11 +3,10 @@ import Layout from '../layouts/Layout.astro'; --- - +

~/

+
-

Welcome!

- Not much here yet, but you can check out my blog posts here.
If you are site owner, please edit src/pages/index.astro to customize this page. diff --git a/src/pages/llms.txt.js b/src/pages/llms.txt.js deleted file mode 100644 index b917536..0000000 --- a/src/pages/llms.txt.js +++ /dev/null @@ -1,42 +0,0 @@ -import { getCollection } from "astro:content"; -import { siteConfig } from "../config"; - -// Modified version that outputs markdown content -export async function GET(context) { - let baseUrl = context.site?.href || "https://terminal-blog.example.com"; - if (baseUrl.at(-1) === "/") baseUrl = baseUrl.slice(0, -1); - const markdownText = `# ${siteConfig.title} - -> ${siteConfig.description} - -${await generateMarkdownSection("posts", "Post", baseUrl)} - -${await generateMarkdownSection("pages", "Page", baseUrl)}`; - - return new Response(markdownText); -} - -async function generateMarkdownSection(collectionName, sectionTitle, baseUrl) { - const items = await getCollection(collectionName); - - // Sort posts by pubDate if available - const sortedItems = - collectionName === "posts" - ? items.sort((a, b) => (a.data.pubDate > b.data.pubDate ? -1 : 1)) - : items; - - let markdown = `## ${sectionTitle}\n`; - - for (const item of sortedItems) { - const { title, description, slug } = getMetaData(item); - markdown += `\n- [${title}](${baseUrl}/post/${slug}): ${description}`; - } - - return markdown; -} - -function getMetaData(collection) { - const { title, description } = collection.data; - const { slug } = collection; - return { title, description, slug }; -}