mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-03 17:46:39 -04:00
simplify note parsing logic
This commit is contained in:
@ -1,14 +1,12 @@
|
||||
import { getAllNotes } from "../lib/parse-notes";
|
||||
import { buildFeed } from "../lib/build-feed";
|
||||
import type { GetServerSideProps } from "next";
|
||||
|
||||
const AtomPage = () => null;
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
const notes = getAllNotes(["title", "date", "image", "slug", "description"]);
|
||||
const feed = buildFeed(notes);
|
||||
|
||||
const feed = buildFeed();
|
||||
const { res } = context;
|
||||
|
||||
res.setHeader("content-type", "application/atom+xml");
|
||||
res.write(feed.atom1());
|
||||
res.end();
|
||||
|
Reference in New Issue
Block a user