@vuepress/plugin-blog
Advanced tools
Comparing version 1.0.0-alpha.28 to 1.0.0-alpha.29
28
index.js
@@ -19,5 +19,4 @@ const { path, datatypes: { isString }} = require('@vuepress/shared-utils') | ||
{ | ||
when: ({ regularPath }) => isDirectChild(regularPath), | ||
frontmatter: { layout: getLayout('Page', 'Layout') }, | ||
data: { type: 'page' } | ||
when: ({ regularPath }) => regularPath === categoryIndexPageUrl, | ||
frontmatter: { layout: getLayout('Categories', 'Page') } | ||
}, | ||
@@ -29,4 +28,4 @@ { | ||
{ | ||
when: ({ regularPath }) => regularPath === categoryIndexPageUrl, | ||
frontmatter: { layout: getLayout('Categories', 'Page') } | ||
when: ({ regularPath }) => regularPath === tagIndexPageUrl, | ||
frontmatter: { layout: getLayout('Tags', 'Page') } | ||
}, | ||
@@ -38,6 +37,2 @@ { | ||
{ | ||
when: ({ regularPath }) => regularPath === tagIndexPageUrl, | ||
frontmatter: { layout: getLayout('Tags', 'Page') } | ||
}, | ||
{ | ||
when: ({ regularPath }) => regularPath === '/', | ||
@@ -54,3 +49,8 @@ frontmatter: { layout: getLayout('Layout') } | ||
}, | ||
...pageEnhancers | ||
...pageEnhancers, | ||
{ | ||
when: ({ regularPath }) => isDirectChild(regularPath), | ||
frontmatter: { layout: getLayout('Page', 'Layout') }, | ||
data: { type: 'page' } | ||
} | ||
] | ||
@@ -72,4 +72,4 @@ | ||
Object.keys(frontmatter).forEach(key => { | ||
if (!frontmatter[key]) { | ||
rawFrontmatter[key] || frontmatter[key] | ||
if (!rawFrontmatter[key]) { | ||
rawFrontmatter[key] = frontmatter[key] | ||
} | ||
@@ -85,3 +85,3 @@ }) | ||
*/ | ||
ready () { | ||
async ready () { | ||
const { pages } = ctx | ||
@@ -151,3 +151,3 @@ const tagMap = {} | ||
] | ||
extraPages.forEach(page => ctx.addPage(page)) | ||
await Promise.all(extraPages.map(page => ctx.addPage(page))) | ||
}, | ||
@@ -154,0 +154,0 @@ |
{ | ||
"name": "@vuepress/plugin-blog", | ||
"version": "1.0.0-alpha.28", | ||
"version": "1.0.0-alpha.29", | ||
"description": "blog plugin for vuepress", | ||
@@ -24,3 +24,4 @@ "main": "index.js", | ||
}, | ||
"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/plugin-blog#readme" | ||
"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/plugin-blog#readme", | ||
"gitHead": "b3aba2d43003f0cfd65c4b1d4a1615bd58bb20b7" | ||
} |
7946
5