feat: use time el for date strings

for better machine recognition
This commit is contained in:
2022-12-01 01:24:26 -05:00
parent 156be1cfd4
commit a5142fb00b
6 changed files with 26 additions and 11 deletions

13
components/Date.vue Normal file
View File

@@ -0,0 +1,13 @@
<script setup lang="ts">
import { getPrettyDate, getUtcDate } from "~~/shared/metadata";
import { BlogParsedContent, StoryParsedContent } from "~~/shared/types";
const props = defineProps<{ doc: StoryParsedContent | BlogParsedContent }>();
const prettyDate = getPrettyDate(props.doc);
const utcDate = getUtcDate(props.doc);
</script>
<template>
<time pubdate :datetime="utcDate">{{ prettyDate }}</time> ·
</template>