1
1
<script setup lang="ts">
2
- import { transformContent } from ' ../../transformers'
3
- import { useAsyncData } from ' #imports'
2
+ // import { transformContent } from '../../transformers'
3
+ // import { useAsyncData } from '#imports'
4
4
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
+ // }>()
10
10
11
- const modules = import .meta .glob ([' ./*.vue' , ' !./CodeBlockFile.vue' ], { as: ' raw' })
11
+ // const modules = import.meta.glob(['./*.vue', '!./CodeBlockFile.vue'], { as: 'raw' })
12
12
// console.log(`modules → `, modules)
13
13
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
+ // }
17
17
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.')
23
23
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
+ // })
33
33
</script >
34
34
35
35
<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">
37
38
<template #empty>
38
39
<div class="p-8">
39
40
<Alert type="warning">
@@ -48,7 +49,7 @@ const { data: doc } = await useAsyncData(`playground-${props.path}`, async () =>
48
49
</Alert>
49
50
</div>
50
51
</template>
51
- </ContentRenderer >
52
+ </ContentRenderer> -->
52
53
</template >
53
54
54
55
<style scoped>
0 commit comments