File tree Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 17
17
</b-card >
18
18
19
19
<componentdoc :component =" component" :key =" component" v-for =" component in meta.components" ></componentdoc >
20
-
20
+
21
21
<importdoc :meta =" meta" ></importdoc >
22
22
</div >
23
23
</template >
@@ -29,6 +29,8 @@ import importdoc from "~/components/importdoc.vue";
29
29
import { components as _meta } from " ~/content" ;
30
30
import docsMixin from " ~/plugins/docs-mixin" ;
31
31
32
+ const getReadMe = name => import (' ~/../src/components/' + name + ' /README.md' /* webpackChunkName: "docs/components" */ )
33
+
32
34
export default {
33
35
components: { componentdoc, importdoc },
34
36
mixins: [docsMixin],
@@ -39,7 +41,7 @@ export default {
39
41
},
40
42
41
43
async asyncData ({ params }) {
42
- const readme = await import ( ' ~/../src/components/ ' + params .slug + ' /README.md ' )
44
+ const readme = await getReadMe ( params .slug )
43
45
const meta = _meta[params .slug ]
44
46
45
47
return {
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" container" >
3
3
<div class =" bd-content" v-html =" readme" v-play ></div >
4
-
4
+
5
5
<importdoc :meta =" meta" ></importdoc >
6
6
</div >
7
7
</template >
@@ -11,6 +11,8 @@ import importdoc from '~/components/importdoc.vue';
11
11
import { directives as _meta } from " ~/content" ;
12
12
import docsMixin from " ~/plugins/docs-mixin" ;
13
13
14
+ const getReadMe = name => import (' ~/../src/directives/' + name + ' /README.md' /* webpackChunkName: "docs/directives" */ )
15
+
14
16
export default {
15
17
mixins: [docsMixin],
16
18
components: { importdoc },
@@ -21,7 +23,7 @@ export default {
21
23
},
22
24
23
25
async asyncData ({ params }) {
24
- const readme = await import ( ' ~/../src/directives/ ' + params .slug + ' /README.md ' )
26
+ const readme = await getReadMe ( params .slug )
25
27
const meta = _meta[params .slug ]
26
28
27
29
return {
Original file line number Diff line number Diff line change 8
8
import { misc as _meta } from " ~/content" ;
9
9
import docsMixin from " ~/plugins/docs-mixin" ;
10
10
11
+ const getReadMe = name => import (' ~/markdown/misc/' + name + ' /README.md' /* webpackChunkName: "docs/misc" */ )
12
+
11
13
export default {
12
14
mixins: [docsMixin],
13
15
layout: " docs" ,
@@ -17,7 +19,7 @@ export default {
17
19
},
18
20
19
21
async asyncData ({ params }) {
20
- const readme = await import ( ' ~/markdown/misc/ ' + params .slug + ' /README.md ' )
22
+ const readme = await getReadMe ( params .slug )
21
23
const meta = _meta[params .slug ]
22
24
23
25
return {
Original file line number Diff line number Diff line change 8
8
import { reference as _meta } from " ~/content" ;
9
9
import docsMixin from " ~/plugins/docs-mixin" ;
10
10
11
+ const getReadMe = name => import (' ~/markdown/reference/' + name + ' /README.md' /* webpackChunkName: "docs/reference" */ )
12
+
11
13
export default {
12
14
mixins: [docsMixin],
13
15
layout: " docs" ,
@@ -17,7 +19,7 @@ export default {
17
19
},
18
20
19
21
async asyncData ({ params }) {
20
- const readme = await import ( ' ~/markdown/reference/ ' + params .slug + ' /README.md ' )
22
+ const readme = await getReadMe ( params .slug )
21
23
const meta = _meta[params .slug ]
22
24
23
25
return {
You can’t perform that action at this time.
0 commit comments