diff --git a/.gitignore b/.gitignore index 52e5845..e5b5f12 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules/ dist/ .next/ .DS_Store -.cache/ \ No newline at end of file +.cache/ +*.bun diff --git a/README.md b/README.md index b08a286..1737bec 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ [![Netlify Status](https://api.netlify.com/api/v1/badges/8128893c-9426-4869-9858-731f3abc96c3/deploy-status)](https://app.netlify.com/sites/lambdapaul/deploys) -This is a rather simple [Next.js](https://nextjs.com) website that mainly involves generating content out of a bunch of markdown files contained in `notes/` and `posts/` which contain rough, unorganized yet useful information and thought-out articles respectively. \ No newline at end of file +A [Next.js](https://nextjs.com) website that mainly involves generating content out of a bunch of markdown files contained in `notes/` and `posts/` which contain rough, unorganized yet useful information and thought-out articles respectively. It's still a work in progress as I have no clear direction I want to take this site toward. However, it is something that I will always keep in check; as I use this as a hub for whatever I work on, especially if it involves a lot of reading. \ No newline at end of file diff --git a/components/recent-posts.tsx b/components/recent-posts.tsx index 1e5ab6f..df192cd 100644 --- a/components/recent-posts.tsx +++ b/components/recent-posts.tsx @@ -4,6 +4,8 @@ import { PostMeta } from "../util/slug"; import style from '../styles/recent-posts.module.css'; function RecentPosts({ postsMeta }: { postsMeta: PostMeta[] }) { + if (!postsMeta.length) + return <>; return (
Recent Posts
diff --git a/public/pages.json b/public/pages.json index a69bdb1..59ebcf7 100644 --- a/public/pages.json +++ b/public/pages.json @@ -1,12 +1,6 @@ { "About": "/about", - "Resources": "/resources", - "Recommended": "/recommended", "GitHub": "https://github.com/lambdapaul", "Twitter": "https://twitter.com/lambda_paul", - "Mastodon": "https://mastodon.social/@lambdapaul", - "Matrix": "https://matrix.to/#/@lambdapaul:matrix.org", - "Playlists": "/playlists", - "Posts": "/posts", "Notes": "/notes" } diff --git a/util/slug.d.ts b/util/slug.d.ts index 6b889a7..b8425c5 100644 --- a/util/slug.d.ts +++ b/util/slug.d.ts @@ -3,26 +3,33 @@ interface Post { rawslug?: string; content?: string; title?: string; -}; +} + +interface Note { + slug?: string; + rawslug?: string; + content?: string; + title?: string; +} interface NoteMeta { title: string; slug: string; last_updated: string; -}; +} interface PostMeta { title: string; slug: string; created_at: string; last_updated: string; -}; +} -export function getAllPosts(filter: Array = []): Post[]; -export function getAllNotes(filter: Array = []): Note[]; +export function getAllPosts(filter?: Array): Post[]; +export function getAllNotes(filter?: Array): Note[]; -export function getPost(rawslug: string, filter: Array = []): Post; -export function getNote(rawslug: string, filter: Array = []): Note; +export function getPost(rawslug: string, filter?: Array): Post; +export function getNote(rawslug: string, filter?: Array): Note; export function getPostsMeta(): PostMeta[]; export function getNotesMeta(): NoteMeta[]; \ No newline at end of file