PronounsPage/app/pages/license.vue
Valentyne Stigloher 10180aa6a3 (refactor) use #shared alias instead of ~~/shared
the #shared alias used by Nuxt cannot be easily disabled and to prevent breackage with jiti, we make use of it
2025-08-17 18:56:02 +02:00

38 lines
1.0 KiB
Vue

<script setup lang="ts">
import { useAsyncData, useNuxtApp } from 'nuxt/app';
import { computed } from 'vue';
import parseMarkdown from '#shared/parseMarkdown.ts';
import useSimpleHead from '~/composables/useSimpleHead.ts';
const { $translator: translator } = useNuxtApp();
const { data: license } = useAsyncData(async () => {
const markdown = (await import('../../LICENSE.md')).default;
return parseMarkdown(markdown, translator);
});
const title = computed(() => license.value?.title ?? null);
const banner = computed(() => license.value?.img ?? null);
const content = computed(() => license.value?.content);
useSimpleHead({
title,
banner,
description: computed(() => license.value?.intro ?? ''),
}, translator);
</script>
<template>
<Page>
<div class="blog-post">
<div v-html="content"></div>
<Separator icon="heart" />
<Support />
<section>
<Share :title="title ?? undefined" />
</section>
</div>
</Page>
</template>