type changes
This commit is contained in:
parent
f934957049
commit
e9726bd39a
|
@ -1,6 +1,6 @@
|
||||||
import type { MarkdownMetadata } from '../../../src/content/types';
|
import type { MarkdownMetadata } from '../../../src/content/types';
|
||||||
|
|
||||||
export type BlogTag = 'Projects' | 'Blog' | 'Updates' | '';
|
export type BlogTag = 'DevOps' | 'AI' | 'Updates' | '';
|
||||||
|
|
||||||
export interface BlogPost extends MarkdownMetadata {
|
export interface BlogPost extends MarkdownMetadata {
|
||||||
author?: string;
|
author?: string;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { listBlogPosts } from '$content/blog';
|
import { listBlogPosts } from '$content/blog';
|
||||||
import RSS from 'rss';
|
import RSS from 'rss';
|
||||||
|
import type { BlogPost } from '$lib/types/blog';
|
||||||
|
|
||||||
export const GET = async () => {
|
export const GET = async () => {
|
||||||
const posts = listBlogPosts();
|
const posts = listBlogPosts();
|
||||||
|
@ -12,23 +13,23 @@ export const GET = async () => {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const feed = new RSS({
|
const feed = new RSS({
|
||||||
title: "Matt's C4vern",
|
title: "Matt's Tech Basement",
|
||||||
description: "Matt's personal blog about ventures in tech.",
|
description: 'A personal blog about ventures in tech.',
|
||||||
copyright: `Copyright © ${new Date().getFullYear()} Matt Morin. All rights reserved`,
|
copyright: `Copyright © ${new Date().getFullYear()} Matt Morin. All rights reserved`,
|
||||||
ttl: 1800,
|
ttl: 1800,
|
||||||
feed_url: 'https://www.mattmor.in/blog',
|
feed_url: 'https://www.mattmor.in/blog',
|
||||||
site_url: 'https://www.mattmor.in',
|
site_url: 'https://www.mattmor.in',
|
||||||
image_url: 'https://www.mattmor.in/favicon192.png',
|
image_url: 'https://www.mattmor.in/favicon192.png',
|
||||||
language: 'en',
|
language: 'en',
|
||||||
categories: ["Matt's C4vern updates", 'Tech', 'Disruption', 'DevOps', 'Ventures'],
|
categories: ["Matt's Tech Basement updates", 'Tech', 'Disruption', 'DevOps', 'Ventures'],
|
||||||
pubDate: new Date().toUTCString(),
|
pubDate: new Date().toUTCString(),
|
||||||
generator: 'Matt Morin'
|
generator: 'Matt Morin'
|
||||||
});
|
});
|
||||||
|
|
||||||
// This code creates an RSS feed. It does so by iterating over all posts and
|
// This creates an RSS feed. It does so by iterating over all posts and
|
||||||
// adding each post to the feed.
|
// adding each post to the feed.
|
||||||
|
|
||||||
posts.forEach((post: any) => {
|
posts.forEach((post: BlogPost) => {
|
||||||
feed.item({
|
feed.item({
|
||||||
title: post.title,
|
title: post.title,
|
||||||
description: post.excerpt,
|
description: post.excerpt,
|
||||||
|
|
Loading…
Reference in New Issue