@factor/plugin-blog
Advanced tools
Comparing version 1.0.0-y.0 to 1.1.0
66
index.js
@@ -1,45 +0,29 @@ | ||
export default Factor => { | ||
return new (class { | ||
constructor() { | ||
this.filters() | ||
} | ||
import { pushToFilter } from "@factor/tools/filters" | ||
import { setting } from "@factor/tools/settings" | ||
filters() { | ||
const baseRoute = Factor.$setting.get("blog.postRoute") | ||
const baseRoute = setting("blog.postRoute") | ||
Factor.$filters.add("post-types", _ => { | ||
_.push({ | ||
postType: "blog", | ||
baseRoute, | ||
icon: require("./img/posts.svg"), | ||
model: "BlogPost", | ||
nameIndex: "Blog", | ||
nameSingle: "Blog Post", | ||
namePlural: "Blog Posts" | ||
}) | ||
pushToFilter("post-types-config", { | ||
postType: "blog", | ||
baseRoute, | ||
icon: require("./img/posts.svg"), | ||
model: "BlogPost", | ||
nameIndex: "Blog", | ||
nameSingle: "Blog Post", | ||
namePlural: "Blog Posts" | ||
}) | ||
return _ | ||
}) | ||
Factor.$filters.add("content-routes", _ => { | ||
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") | ||
} | ||
] | ||
} | ||
] | ||
}) | ||
pushToFilter("content-routes", { | ||
path: setting("blog.indexRoute"), | ||
component: setting("blog.components.blogWrap"), | ||
children: [ | ||
{ | ||
path: "/", | ||
component: setting("blog.components.blogIndex") | ||
}, | ||
{ | ||
path: `${setting("blog.postRoute")}/:permalink`, | ||
component: setting("blog.components.blogSingle") | ||
} | ||
})() | ||
} | ||
] | ||
}) |
{ | ||
"name": "@factor/plugin-blog", | ||
"version": "1.0.0-y.0", | ||
"description": "Easily implement, customize and manage blog in your Factor app.", | ||
"version": "1.1.0", | ||
"license": "GPL-2.0", | ||
"type": "module", | ||
"factor": { | ||
"target": [ | ||
"app" | ||
] | ||
"app", | ||
"server" | ||
], | ||
"title": "Blog" | ||
}, | ||
"dependencies": { | ||
"@factor/plugin-highlight-code": "^1.0.0-y.0" | ||
"@factor/plugin-highlight-code": "^1.1.0" | ||
}, | ||
@@ -16,3 +20,13 @@ "publishConfig": { | ||
}, | ||
"gitHead": "a762cf6c5961e0210f64d104e20426d444bd5069" | ||
"gitHead": "22d30baeaa75cf3a98db8a20af6313b17e741f8b", | ||
"keywords": [ | ||
"factor", | ||
"factor-plugin", | ||
"fiction", | ||
"webpack", | ||
"vue", | ||
"blog", | ||
"post", | ||
"writing" | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
319152
24
1
1
31
Yes
73