mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 08:58:30 -04:00
20 lines
415 B
TypeScript
20 lines
415 B
TypeScript
import { buildFeed } from "../lib/build-feed";
|
|
import type { GetServerSideProps } from "next";
|
|
|
|
const AtomPage = () => null;
|
|
|
|
export const getServerSideProps: GetServerSideProps = async (context) => {
|
|
const feed = buildFeed();
|
|
const { res } = context;
|
|
|
|
res.setHeader("content-type", "application/atom+xml");
|
|
res.write(feed.atom1());
|
|
res.end();
|
|
|
|
return {
|
|
props: {},
|
|
};
|
|
};
|
|
|
|
export default AtomPage;
|