diff --git a/src/routes/entries/_rss/+server.ts b/src/routes/entries/_rss/+server.ts index b3ab76c..306e8b4 100644 --- a/src/routes/entries/_rss/+server.ts +++ b/src/routes/entries/_rss/+server.ts @@ -18,9 +18,9 @@ const render = (posts: PostData[]) => ` - gaze.systems - ${PUBLIC_BASE_URL} - dusk's personal website + dusk's posts (@gaze.systems) + ${entriesUrl} + posts from my website ${posts.map((post) => ` ${entriesUrl}/${post.path} ${post.metadata.title} diff --git a/src/routes/log/_rss/+server.ts b/src/routes/log/_rss/+server.ts new file mode 100644 index 0000000..e61687f --- /dev/null +++ b/src/routes/log/_rss/+server.ts @@ -0,0 +1,38 @@ +import { PUBLIC_BASE_URL } from '$env/static/public'; +import { readNote, readNotesList, type Note } from '$lib/notes.ts'; + +const logUrl = `${PUBLIC_BASE_URL}/log`; + +interface NoteData { + data: Note, + id: string, +} + +export const GET = async ({ }) => { + const log = readNotesList().map((id) => {return { data: readNote(id), id }}) + return new Response( + render(log), + { + headers: { + 'content-type': 'application/xml', + 'cache-control': 'no-store', + } + }) +}; + +const render = (log: NoteData[]) => ` + + + + dusk's notes (@gaze.systems) + ${logUrl} + a collection of random notes i write whenever, aka my microblogging spot + ${log.map((note) => ` + ${logUrl}/?id=${note.id} + ${logUrl}/?id=${note.id} + ${note.data.content} + ${new Date(note.data.published).toUTCString()} + `).join('')} + + + `; \ No newline at end of file