2023-12-31 06:57:10 +00:00
|
|
|
<script setup lang="ts">
|
2024-01-25 16:32:45 +00:00
|
|
|
import { useData } from 'vitepress'
|
|
|
|
import Authors from './components/Authors.vue'
|
2023-12-31 06:57:10 +00:00
|
|
|
|
|
|
|
const props = defineProps<{
|
2024-01-25 16:32:45 +00:00
|
|
|
authors: string[]
|
|
|
|
}>()
|
2023-12-31 06:57:10 +00:00
|
|
|
|
|
|
|
const formatDate = (raw: string): string => {
|
2024-01-25 16:32:45 +00:00
|
|
|
const date = new Date(raw)
|
|
|
|
return date.toLocaleDateString('en-US', {
|
|
|
|
month: 'short',
|
|
|
|
day: 'numeric'
|
|
|
|
})
|
|
|
|
}
|
2023-12-31 06:57:10 +00:00
|
|
|
|
2024-01-25 16:32:45 +00:00
|
|
|
const { frontmatter } = useData()
|
2023-12-31 06:57:10 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2024-02-04 13:27:49 +00:00
|
|
|
<h1>{{ frontmatter.title }}</h1>
|
|
|
|
<div>{{ frontmatter.description }} • {{ formatDate(frontmatter.date) }}</div>
|
2023-12-31 06:57:10 +00:00
|
|
|
<Authors :authors="props.authors" />
|
|
|
|
</template>
|