refactor(v2): point blog plugin path to v1's blog directory

This commit is contained in:
Yangshun Tay 2019-03-02 20:40:31 -08:00
parent 95ca07a646
commit b13e468b16
5 changed files with 4 additions and 414 deletions

View file

@ -13,6 +13,7 @@ async function genRoutesConfig({
pagesMetadatas = [],
contentsStore = {},
}) {
// Docs.
const {docsUrl, baseUrl} = siteConfig;
function genDocsRoute(metadata) {
const {permalink, source} = metadata;
@ -45,6 +46,7 @@ async function genRoutesConfig({
.join(',')}],
}`;
// Pages.
function genPagesRoute(metadata) {
const {permalink, source} = metadata;
return `
@ -66,6 +68,7 @@ async function genRoutesConfig({
}`;
}
// Blog.
function genBlogRoute(metadata) {
const {permalink, source} = metadata;
if (metadata.isBlogPage) {