11<script setup lang="ts">
2- import { transformContent } from ' ../../transformers'
3- import { useAsyncData } from ' #imports'
2+ // import { transformContent } from '../../transformers'
3+ // import { useAsyncData } from '#imports'
44
5- const props = defineProps <{
6- path: string
7- language? : string
8- filename? : string
9- }>()
5+ // const props = defineProps<{
6+ // path: string
7+ // language?: string
8+ // filename?: string
9+ // }>()
1010
11- const modules = import .meta .glob ([' ./*.vue' , ' !./CodeBlockFile.vue' ], { as: ' raw' })
11+ // const modules = import.meta.glob(['./*.vue', '!./CodeBlockFile.vue'], { as: 'raw' })
1212// console.log(`modules → `, modules)
1313
14- function prepareContent(content : string ) {
15- return ` \`\`\` ${props .language || ' ' }${props .filename ? ` [${props .filename }] ` : ' ' }\n ${content }\n\`\`\` `
16- }
14+ // function prepareContent(content: string) {
15+ // return `\`\`\`${props.language || ''}${props.filename ? ` [${props.filename}]` : ''}\n${content}\n\`\`\``
16+ // }
1717
18- const { data : doc } = await useAsyncData (` playground-${props .path } ` , async () => {
19- try {
20- const module = modules [props .path ]
21- if (! module )
22- console .error (' Component Not Found.' )
18+ // const { data: doc } = await useAsyncData(`playground-${props.path}`, async () => {
19+ // try {
20+ // const module = modules[props.path]
21+ // if (!module)
22+ // console.error('Component Not Found.')
2323
24- const content = prepareContent (await module () as any )
25- // console.log(`content → `, content)
26- const parsed = await transformContent (' content:index.md' , content )
27- return parsed
28- }
29- catch (e ) {
30- return doc .value
31- }
32- })
24+ // const content = prepareContent(await module() as any)
25+ // // console.log(`content → `, content)
26+ // const parsed = await transformContent('content:index.md', content)
27+ // return parsed
28+ // }
29+ // catch (e) {
30+ // return doc.value
31+ // }
32+ // })
3333 </script >
3434
3535<template >
36- <ContentRenderer :key =" doc.updatedAt" class =" docus-content" :value =" doc" >
36+ <div >TBD</div >
37+ <!-- <ContentRenderer :key="doc.updatedAt" class="docus-content" :value="doc">
3738 <template #empty>
3839 <div class="p-8">
3940 <Alert type="warning">
@@ -48,7 +49,7 @@ const { data: doc } = await useAsyncData(`playground-${props.path}`, async () =>
4849 </Alert>
4950 </div>
5051 </template>
51- </ContentRenderer >
52+ </ContentRenderer> -->
5253</template >
5354
5455<style scoped>
0 commit comments