@factor/plugin-blog
Advanced tools
Comparing version 1.0.0-alpha.5 to 1.0.0-y.0
52
index.js
@@ -8,10 +8,9 @@ export default Factor => { | ||
filters() { | ||
const base = "entry" | ||
const type = "blog" | ||
const icon = Factor.FACTOR_TARGET == "app" ? require("./img/posts.svg") : "" | ||
const baseRoute = Factor.$setting.get("blog.postRoute") | ||
Factor.$filters.add("post-types", _ => { | ||
_.push({ | ||
type, | ||
base, | ||
icon, | ||
postType: "blog", | ||
baseRoute, | ||
icon: require("./img/posts.svg"), | ||
model: "BlogPost", | ||
@@ -27,26 +26,19 @@ nameIndex: "Blog", | ||
Factor.$filters.add("content-routes", _ => { | ||
_.push({ | ||
path: "/blog", | ||
component: () => import("./vc-blog-wrap"), | ||
children: [ | ||
{ | ||
path: "/", | ||
component: () => import("./index.vue") | ||
}, | ||
{ | ||
path: `/${base}`, | ||
component: () => import(`./single.vue`) | ||
}, | ||
{ | ||
path: `/${base}/:permalink`, | ||
component: () => import(`./single.vue`) | ||
}, | ||
{ | ||
path: `/tag/:tag`, | ||
component: () => import(`./index.vue`) | ||
} | ||
] | ||
}) | ||
return _ | ||
return [ | ||
..._, | ||
{ | ||
path: Factor.$setting.get("blog.indexRoute"), | ||
component: Factor.$setting.get("blog.components.blogContent"), | ||
children: [ | ||
{ | ||
path: "/", | ||
component: Factor.$setting.get("blog.components.blogIndex") | ||
}, | ||
{ | ||
path: `${Factor.$setting.get("blog.postRoute")}/:permalink`, | ||
component: Factor.$setting.get("blog.components.blogSingle") | ||
} | ||
] | ||
} | ||
] | ||
}) | ||
@@ -53,0 +45,0 @@ } |
{ | ||
"name": "@factor/plugin-blog", | ||
"version": "1.0.0-alpha.5", | ||
"version": "1.0.0-y.0", | ||
"license": "GPL-2.0", | ||
@@ -10,6 +10,9 @@ "factor": { | ||
}, | ||
"dependencies": { | ||
"@factor/plugin-highlight-code": "^1.0.0-y.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "3537bf16da77a27d03c8a79cc61e09611c73ddfd" | ||
"gitHead": "a762cf6c5961e0210f64d104e20426d444bd5069" | ||
} |
21
89
314235
1
+ Added@factor/plugin-highlight-code@1.8.28(transitive)
+ Addedprismjs@1.29.0(transitive)