New notes

This commit is contained in:
2022-04-28 12:37:12 -04:00
parent fda1c71b42
commit a212076ce7
16 changed files with 1362 additions and 21 deletions
+7 -3
View File
@@ -1,10 +1,11 @@
import React from 'react';
import Layout from '../components/layout';
import QuickLinks from '../components/quick-links';
import RecentNotes from '../components/recent-notes';
import RecentPosts from '../components/recent-posts';
import { getPostsMeta, PostMeta } from '../util/slug';
import { getNotesMeta, getPostsMeta, NoteMeta, PostMeta } from '../util/slug';
function HomePage({ postsMeta }: { postsMeta: PostMeta[] }) {
function HomePage({ postsMeta, notesMeta }: { postsMeta: PostMeta[], notesMeta: NoteMeta[] }) {
return (
<Layout name='' title='PaulW.XYZ'>
<section className='block'>
@@ -13,13 +14,16 @@ function HomePage({ postsMeta }: { postsMeta: PostMeta[] }) {
<section className='block'>
<RecentPosts postsMeta={postsMeta} />
</section>
<section className='block'>
<RecentNotes notesMeta={notesMeta} />
</section>
</Layout>
)
}
export async function getStaticProps() {
return {
props: { postsMeta: getPostsMeta() }
props: { postsMeta: getPostsMeta(), notesMeta: getNotesMeta() }
};
}