add rss feed

This commit is contained in:
Mira Kristipati 2024-06-05 00:12:25 -04:00
parent 6bea0ca278
commit 2de61aa0d1
7 changed files with 34 additions and 26 deletions

View file

@ -1,10 +1,11 @@
import { defineConfig } from "astro/config"; import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx"; import mdx from "@astrojs/mdx";
import nodejs from '@astrojs/node'; import nodejs from "@astrojs/node";
import { remarkReadingTime } from './remark-reading-time.mjs'; import { remarkReadingTime } from "./remark-reading-time.mjs";
import { modifiedTime } from './remark-modified-time.mjs'; import { modifiedTime } from "./remark-modified-time.mjs";
export default defineConfig({ export default defineConfig({
site: "https://argentumcation.com",
markdown: { markdown: {
syntaxHighlight: false, syntaxHighlight: false,
shikiConfig: { shikiConfig: {
@ -13,9 +14,9 @@ export default defineConfig({
remarkPlugins: [remarkReadingTime, modifiedTime], remarkPlugins: [remarkReadingTime, modifiedTime],
}, },
adapter: nodejs({ adapter: nodejs({
mode: 'standalone' mode: "standalone",
}), }),
output: 'hybrid', output: "hybrid",
vite: { vite: {
build: { build: {
rollupOptions: { rollupOptions: {

View file

@ -23,6 +23,10 @@ const { title, description } = Astro.props;
</script> </script>
<script src="https://unpkg.com/hyperscript.org@0.9.11"></script> <script src="https://unpkg.com/hyperscript.org@0.9.11"></script>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
/>
<!-- Set default theme --> <!-- Set default theme -->
<script is:inline> <script is:inline>

View file

@ -18,7 +18,7 @@ themes.delete("default");
<!-- Author Info --> <!-- Author Info -->
<a href="https://argentumcation.com/links" rel="author"> <a href="https://argentumcation.com/links" rel="author">
<span class="p-nickname">ArgentumCation</span> <span class="p-nickname">ArgentumCation</span>
(<span class="p-name">Mira Velturu</span>) (<span class="p-name">Mira</span>)
</a> </a>
<!-- Author Metadata --> <!-- Author Metadata -->
<div hidden=""> <div hidden="">
@ -30,14 +30,6 @@ themes.delete("default");
class="u-photo" class="u-photo"
/> />
<a class="u-email" href="mailto:mira@ミラ.コム">mira@ミラ.コム</a> <a class="u-email" href="mailto:mira@ミラ.コム">mira@ミラ.コム</a>
<div class="h-adr">
<span class="p-street-address">10520 Chapel Hill Rd.</span>
<span class="p-post-office-box">Box 382</span>
<span class="p-locality">Morrisville</span>,
<span class="p-region">NC</span>,
<span class="p-postal-code">27560</span>
<span class="p-country-name">USA</span>
</div>
<span class="dt-bday">20XX-04-02</span> <span class="dt-bday">20XX-04-02</span>
<div> <div>
<span class="u-key"><!-- TODO --></span> <span class="u-key"><!-- TODO --></span>
@ -91,10 +83,10 @@ themes.delete("default");
document.getElementById(theme)?.setAttribute("selected", "true") document.getElementById(theme)?.setAttribute("selected", "true")
); );
</script> </script>
<marquee class="buttons"> <marquee >
{ {
buttons.map((button) => { buttons.map((button) => {
const image = <Image class="button" src={`/buttons/${button.image}`} alt={button.name} width={88} height={31} />; const image = <Image class="marquee-button" src={`/buttons/${button.image}`} alt={button.name} width={88} height={31} />;
return !button.link?.startsWith('javascript:') ? ( return !button.link?.startsWith('javascript:') ? (
<a href={button.link ?? undefined} title={button.name} target="_blank"> <a href={button.link ?? undefined} title={button.name} target="_blank">

View file

@ -12,6 +12,10 @@
<li> <li>
<a class="menu-item" href="/posts">Posts</a> <a class="menu-item" href="/posts">Posts</a>
</li> </li>
<li>
<a class="menu-item" href="/feed.xml">
<i class="fa-solid fa-rss"></i></a>
</li>
</ul> </ul>
</nav> </nav>
</div> </div>

View file

@ -2,9 +2,9 @@ import rss, { pagesGlobToRssItems } from "@astrojs/rss";
export async function GET(context) { export async function GET(context) {
return rss({ return rss({
title: "Buzzs Blog", title: "ArgentumCation",
description: "A humble Astronauts guide to the stars", description: "Mira's ramblings about stuff I guess",
site: context.site, site: context.site,
items: await pagesGlobToRssItems(import.meta.glob("./blog/*.{md,mdx}")), items: await pagesGlobToRssItems(import.meta.glob("./posts/*.{md,mdx}")),
}); });
} }

View file

@ -8,7 +8,9 @@ import "../styles/links/brands-custom.css";
import "../styles/terminal-css/main.css"; import "../styles/terminal-css/main.css";
import "../styles/links/global.css"; import "../styles/links/global.css";
import Footer from "../components/Footer.astro"; import Footer from "../components/Footer.astro";
import Header from "../components/Header.astro";
import Social from "../components/Social.astro"; import Social from "../components/Social.astro";
import BaseHead from "../components/BaseHead.astro";
let description = let description =
"I don't know who you are or how you found this, but while you're here, feel free to add me everywhere"; "I don't know who you are or how you found this, but while you're here, feel free to add me everywhere";
@ -30,6 +32,7 @@ document.getElementById(theme)?.setAttribute("selected", "true");
</script> </script>
<html lang="en"> <html lang="en">
<head> <head>
<BaseHead />
<!-- Page Information <!-- Page Information
--> -->
<meta charset="utf-8" /> <meta charset="utf-8" />
@ -85,6 +88,7 @@ document.getElementById(theme)?.setAttribute("selected", "true");
</head> </head>
<body> <body>
<Header />
<!-- Primary Page Layout <!-- Primary Page Layout
--> -->
<div class="container"> <div class="container">

View file

@ -27,9 +27,7 @@
--astro-code-token-punctuation: var(--base05, --foreground); --astro-code-token-punctuation: var(--base05, --foreground);
--astro-code-token-link: var(--base09, var(--orange, var(--cyan))); --astro-code-token-link: var(--base09, var(--orange, var(--cyan)));
/*Fonts*/ /*Fonts*/
--mono-font-stack: Liga SFMono Nerd Font, Ubuntu, Menlo, Monaco, Cascadia Code, --mono-font-stack: monospace, sans-serif;
Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono,
Courier New, monospace, serif;
--font-stack: var(--mono-font-stack); --font-stack: var(--mono-font-stack);
} }
@ -223,10 +221,11 @@ select {
} }
ul li::before { ul li::before {
content: none; content: none;
} }
ol p { ol p {
display: inline; display: inline;
} }
ol { ol {
@ -269,7 +268,11 @@ ol ol ol ol ol ol ol ol ol ol {
list-style-type: hebrew; list-style-type: hebrew;
} }
.button { .terminal-nav {
margin: 0 1em;
}
.marquee-button {
width: 88px; width: 88px;
height: 31px; height: 31px;
} }