File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
packages/@vuepress/core/lib Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,14 @@ function routesCode (pages) {
33
33
function genRoute ( {
34
34
path : pagePath ,
35
35
key : componentName ,
36
- regularPath
36
+ regularPath,
37
+ _meta
37
38
} ) {
38
39
let code = `
39
40
{
40
41
name: ${ JSON . stringify ( componentName ) } ,
41
42
path: ${ JSON . stringify ( pagePath ) } ,
42
- component: LayoutDistributor,
43
+ component: LayoutDistributor,${ _meta ? `\n meta: ${ JSON . stringify ( _meta ) } ` : '' }
43
44
}`
44
45
45
46
const dncodedPath = decodeURIComponent ( pagePath )
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ module.exports = class Page {
15
15
*/
16
16
constructor ( {
17
17
path,
18
+ meta,
18
19
title,
19
20
content,
20
21
filePath,
@@ -24,6 +25,7 @@ module.exports = class Page {
24
25
permalinkPattern
25
26
} ) {
26
27
this . title = title
28
+ this . _meta = meta
27
29
this . _filePath = filePath
28
30
this . _content = content
29
31
this . _permalink = permalink
You can’t perform that action at this time.
0 commit comments