summaryrefslogtreecommitdiffstats
path: root/src/pages/feed.json.tsx
blob: e113b46fae6f836d88cf81a5b42f721a88fa1ae0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { generateFeed } from '@utils/helpers/rss';
import { GetServerSideProps } from 'next';

const Feed = () => null;

export const getServerSideProps: GetServerSideProps = async ({ res }) => {
  const feed = await generateFeed();

  if (res) {
    res.setHeader('Content-Type', 'application/json');
    res.write(`${feed.json1()}`);
    res.end();
  }

  return {
    props: {},
  };
};

export default Feed;
an>/"[^"\r\n]*"|'[^'\r\n]*'/, greedy: true, }, special: { pattern: /\?[^?\r\n]*\?/, greedy: true, alias: 'class-name', }, definition: { pattern: /^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im, lookbehind: true, alias: ['rule', 'keyword'], }, rule: /\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i, punctuation: /\([:/]|[:/]\)|[.,;()[\]{}]/, operator: /[-=|*/!]/, };