diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/_document.tsx | 4 | ||||
-rw-r--r-- | pages/index.tsx | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/pages/_document.tsx b/pages/_document.tsx index ef9fcd3b..ca81402c 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -6,6 +6,10 @@ export default function Document() { return ( <Html lang="en"> <Head /> + <title>MichaĆ Sapka's website</title> + <link rel="alternate" type="application/rss+xml" href="https://michal.sapka.me/rss/feed.xml" title="Recent publications RSS Feed" /> + <link rel="alternate" type="application/feed+json" href="https://michal.sapka.me/rss/feed.json" title="Recent publications RSS Feed" /> + <link rel="alternate" type="application/atom+xml" href="https://michal.sapka.me/rss/atom.xml" title="Recent publications RSS Feed" /> <body> <ColorModeScript initialColorMode={theme.config.initialColorMode} /> <Main /> 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 |