Bump script ver and refactor md metadata gen

Signed-off-by: Paul W. <lambdapaul@protonmail.com>
This commit is contained in:
2023-10-30 00:18:38 -04:00
parent 2bc72ce3e9
commit e470224031
38 changed files with 412 additions and 8679 deletions
+7 -6
View File
@@ -1,17 +1,18 @@
import Link from "next/link";
import { INoteMeta } from "../lib/slug";
import NotesInfo from '../public/notes.json';
function RecentNotes({ notesMeta }: { notesMeta: INoteMeta[] }) {
function RecentNotes() {
const notes = Object.entries(NotesInfo);
return (
<div className='block'>
<div className='h2'>Recent Notes</div>
{notesMeta?.slice(0, 10)
.map((note: any) => {
return <Link key={note.slug} href={`/notes/${note.slug}`} className={`button link`}>{note.title}</Link>
{notes?.slice(0, 10)
.map(([slug, note]: any) => {
return <Link key={slug} href={`/notes/${slug}`} className={`button link`}>{note.title}</Link>
})
}
{
notesMeta.length > 10 &&
notes.length > 10 &&
<div>
<Link href='/notes' className='h5'>More...</Link>
</div>