@factor/plugin-sitemap
Advanced tools
Comparing version 1.0.0-alpha.20 to 1.0.0-alpha.21
18
index.js
@@ -26,14 +26,12 @@ export default Factor => { | ||
async getPermalinks() { | ||
const results = await Factor.$db.run({ | ||
method: "find", | ||
conditions: {}, | ||
limit: 1000 | ||
const posts = await Factor.$dbServer | ||
.model("post") | ||
.find({ permalink: { $ne: null }, status: "published" }, "permalink postType", { | ||
limit: 2000 | ||
}) | ||
const urls = posts.map(({ postType, permalink }) => { | ||
return Factor.$post.getPermalink({ postType, permalink }) | ||
}) | ||
const urls = results.data | ||
.filter(_ => _.permalink) | ||
.map(({ type, permalink }) => { | ||
return Factor.$posts.getPermalink({ postType, permalink, root: false }) | ||
}) | ||
return urls.concat(this.getRouteUrls()) | ||
@@ -40,0 +38,0 @@ } |
{ | ||
"name": "@factor/plugin-sitemap", | ||
"version": "1.0.0-alpha.20", | ||
"version": "1.0.0-alpha.21", | ||
"license": "GPL-2.0", | ||
@@ -16,3 +16,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "e11cbda7b934f3aedf067d0e1b642491bc5f753d" | ||
"gitHead": "14938201a2c11b3396ac0396eb323e33e334a92b" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21267
72