From 9c1cd928f15624b7a03fdbbc4a3c434568a07e48 Mon Sep 17 00:00:00 2001
From: Michal Sapka <michal@sapka.me>
Date: Mon, 5 Sep 2022 22:40:17 +0200
Subject: feat: add RSS feed

---
 pages/index.tsx | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'pages/index.tsx')

diff --git a/pages/index.tsx b/pages/index.tsx
index 4477d0b0..2e733685 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -1,8 +1,5 @@
 import type { NextPage } from 'next'
-import Head from 'next/head'
-import Image from 'next/image'
 import Layout from '../components/layout'
-import styles from '../styles/Home.module.css'
 import { 
   VStack, 
   HStack,
@@ -17,6 +14,7 @@ import {
 } from '@chakra-ui/react'
 import { AiFillGithub,AiFillMediumCircle} from "react-icons/ai";
 import Publications from "../data/publications"
+import generateRssFeed from "../lib/feed"
 
 type BioEntryType = {
   date: string,
@@ -71,7 +69,7 @@ const Home: NextPage = () => {
           <VStack spacing="1" alignItems="start">
             {Publications.map((value, key) => {
               return <Box key={key}>
-                       <Link href={value.url} isExternal>{value.name}</Link>
+                       <Link href={value.url} isExternal>{value.title}</Link>
                      </Box>
 
             })}
@@ -103,4 +101,9 @@ const Home: NextPage = () => {
   )
 }
 
+export const getStaticProps = async (context : any) => {
+  await generateRssFeed();
+  return { props: {} };
+};
+
 export default Home
-- 
cgit v1.2.3

