mirror of
https://github.com/fmhy/edit.git
synced 2025-10-13 16:21:05 +11:00
feat: redesign homepage
This commit is contained in:
parent
76d6ed95cf
commit
c8a8f4192e
40 changed files with 694 additions and 139 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue