mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-27 18:30:35 +01:00
docs: update
This commit is contained in:
@@ -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')}
|
||||
\`\`\`\
|
||||
|
||||
Reference in New Issue
Block a user