feat: redesign homepage

This commit is contained in:
taskylizard 2024-08-31 18:17:01 +00:00
parent 76d6ed95cf
commit c8a8f4192e
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
40 changed files with 694 additions and 139 deletions

View file

@ -1,7 +1,3 @@
import type { ContentData } from 'vitepress'
import { createContentLoader } from 'vitepress'
import { groupBy } from '../utils'
/**
* Copyright (c) taskylizard. All rights reserved.
*
@ -18,18 +14,22 @@ import { groupBy } from '../utils'
* limitations under the License.
*/
import type { ContentData } from 'vitepress'
import { createContentLoader } from 'vitepress'
import { groupBy } from '../utils'
interface Post {
title: string
url: string
date: string
}
type Dictionary = ReturnType
type Dictionary = ReturnType<typeof createContentLoader>
declare const data: Dictionary
export { data }
function transformRawPosts(rawPosts: ContentData[]): Record {
function transformRawPosts(rawPosts: ContentData[]): Record<string, Post[]> {
const posts: Post[] = rawPosts
.map(({ url, frontmatter }) => ({
title: frontmatter.title,