docs: update

This commit is contained in:
Benjamin Canac
2024-06-27 15:39:15 +02:00
parent 0b3ce24eb6
commit b5f42cdd3a
46 changed files with 792 additions and 52 deletions

View File

@@ -1,17 +1,14 @@
<script setup lang="ts">
import json5 from 'json5'
import { camelCase } from 'scule'
import { parseMarkdown } from '@nuxtjs/mdc/runtime'
import * as theme from '#build/ui'
const props = defineProps<{ slug?: string }>()
const route = useRoute()
const name = props.slug || route.params.slug[route.params.slug.length - 1]
const name = camelCase(route.params.slug[route.params.slug.length - 1])
const { data: ast } = await useAsyncData(`${name}-theme`, () => parseMarkdown(`
## Theme
\`\`\`yml
${json5.stringify(theme[name], null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')}
\`\`\`\