1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-19 11:35:12 +00:00

Do this less dirty

This commit is contained in:
Brenden Matthews 2024-02-22 18:50:41 -05:00
parent 90472292b3
commit 82d4ed4479
2 changed files with 8 additions and 2 deletions

View File

@ -70,7 +70,7 @@ export default function Index({ documents, searchIndex }: IndexProps) {
key={document.filePath}
as={`/documents/${document.filePath.replace(/\.mdx?$/, '')}`}
href={`/documents/[slug]`}
title={document.data.title}
title={document.data.title ?? 'Untitled'}
desc={document.data.description}
/>
))}

View File

@ -16,9 +16,15 @@ export const documentFilePaths = fs
// Only include md(x) files
.filter((path) => /\.mdx?$/.test(path))
export interface DocumentData {
title?: string
description?: string
indexWeight?: number
}
export interface Document {
content: string
data: object
data: DocumentData
filePath: string
}