RSS fix
This commit is contained in:
@ -1,32 +1,31 @@
|
||||
---
|
||||
import { Image } from 'astro:assets';
|
||||
import SocialLinks from '../components/SocialLinks.astro';
|
||||
import TechLinks from '../components/TechLinks.astro';
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<img
|
||||
src="/logo.webp"
|
||||
alt="A drawing of Atridad Lahiji by Shelze!"
|
||||
height={150}
|
||||
width={150}
|
||||
/>
|
||||
<Image
|
||||
src="/logo.webp"
|
||||
alt="A drawing of Atridad Lahiji by Shelze!"
|
||||
height={150}
|
||||
width={150}
|
||||
/>
|
||||
|
||||
<h1 class="bg-gradient-to-r from-primary via-secondary to-accent bg-clip-text text-transparent text-4xl sm:text-6xl font-bold text-center">
|
||||
Atridad Lahiji
|
||||
</h1>
|
||||
<h1 class="bg-gradient-to-r from-primary via-secondary to-accent bg-clip-text text-transparent text-4xl sm:text-6xl font-bold text-center">
|
||||
Atridad Lahiji
|
||||
</h1>
|
||||
|
||||
<h2 class="text-xl sm:text-3xl font-bol text-center">
|
||||
Researcher, Full-Stack Developer, and IT Professional.
|
||||
</h2>
|
||||
<h2 class="text-xl sm:text-3xl font-bol text-center">
|
||||
Researcher, Full-Stack Developer, and IT Professional.
|
||||
</h2>
|
||||
|
||||
<h3 class="text-lg sm:text-2xl font-bold">Places I Exist:</h3>
|
||||
<h3 class="text-lg sm:text-2xl font-bold">Places I Exist:</h3>
|
||||
|
||||
<SocialLinks />
|
||||
<SocialLinks />
|
||||
|
||||
<h3 class="text-lg sm:text-2xl font-bold">Stuff I Use:</h3>
|
||||
<h3 class="text-lg sm:text-2xl font-bold">Stuff I Use:</h3>
|
||||
|
||||
<TechLinks />
|
||||
|
||||
<!-- <HomeButtonLinks /> -->
|
||||
<TechLinks />
|
||||
</Layout>
|
||||
|
19
src/pages/rss.xml.js
Normal file
19
src/pages/rss.xml.js
Normal file
@ -0,0 +1,19 @@
|
||||
import rss from '@astrojs/rss';
|
||||
import { getCollection } from 'astro:content';
|
||||
|
||||
export async function GET(context) {
|
||||
const posts = await getCollection('posts');
|
||||
|
||||
return rss({
|
||||
title: 'Atridad Lahiji',
|
||||
description: 'Recent posts from Atridad Lahiji',
|
||||
site: context.site,
|
||||
items: posts.map((post) => ({
|
||||
title: post.data.title,
|
||||
pubDate: post.data.pubDate,
|
||||
description: post.data.description || '',
|
||||
link: `/post/${post.slug}/`,
|
||||
})),
|
||||
customData: `<language>en-us</language>`,
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user