mirror of
https://github.com/fmhy/edit.git
synced 2026-01-29 15:21:11 +11:00
feat: reorganize repo
This commit is contained in:
parent
49eb39bc1f
commit
23389c69df
107 changed files with 15 additions and 429 deletions
24
docs/.vitepress/theme/PostLayout.vue
Normal file
24
docs/.vitepress/theme/PostLayout.vue
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<script setup lang="ts">
|
||||
import { useData } from 'vitepress'
|
||||
import Authors from './components/Authors.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
authors: string[]
|
||||
}>()
|
||||
|
||||
const formatDate = (raw: string): string => {
|
||||
const date = new Date(raw)
|
||||
return date.toLocaleDateString('en-US', {
|
||||
month: 'short',
|
||||
day: 'numeric'
|
||||
})
|
||||
}
|
||||
|
||||
const { frontmatter } = useData()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>{{ frontmatter.title }}</h1>
|
||||
<div>{{ frontmatter.description }} • {{ formatDate(frontmatter.date) }}</div>
|
||||
<Authors :authors="props.authors" />
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue