docs: improve config display

This commit is contained in:
Benjamin Canac
2024-02-06 19:51:21 +01:00
parent d0f4530e85
commit 7c74c2f22a
4 changed files with 19 additions and 13 deletions

View File

@@ -122,6 +122,7 @@ const componentProps = reactive({ ...props.props })
const { $prettier } = useNuxtApp()
const appConfig = useAppConfig()
const route = useRoute()
const highlighter = useShikiHighlighter()
let name = props.slug || `U${upperFirst(camelCase(route.params.slug[route.params.slug.length - 1]))}`
@@ -267,8 +268,6 @@ function renderObject (obj: any) {
return obj
}
const highlighter = useShikiHighlighter()
const { data: ast } = await useAsyncData(
`${name}-ast-${JSON.stringify({ props: componentProps, slots: props.slots, code: props.code })}`,
async () => {