mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-16 10:05:22 +00:00
Do this less dirty
This commit is contained in:
parent
90472292b3
commit
82d4ed4479
@ -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}
|
||||
/>
|
||||
))}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user