akashacms-blog-podcast
Advanced tools
Comparing version 0.4.2 to 0.4.3
31
index.js
@@ -86,15 +86,24 @@ /** | ||
var maxEntries = $(element).attr('maxentries'); | ||
// console.log(element.name +' '+ metadata.blogtag); | ||
var rssitems = []; | ||
for (var q = 0; q < documents.length; q++) { | ||
var rssitems = []; | ||
var documents2 = []; | ||
var count = 0; | ||
for (var q = 0; q < documents.length; q++, count++) { | ||
var doc = documents[q]; | ||
rssitems.push({ | ||
title: doc.frontmatter.yaml.title, | ||
description: doc.frontmatter.yaml.teaser ? doc.frontmatter.yaml.teaser : "", | ||
url: config.root_url +'/'+ doc.renderedFileName, | ||
date: doc.frontmatter.yaml.publicationDate | ||
? doc.frontmatter.yaml.publicationDate | ||
: doc.stat.mtime | ||
}); | ||
// console.log('count='+ count +' maxEntries='+ maxEntries); | ||
if (typeof maxEntries === "undefined" | ||
|| (typeof maxEntries !== "undefined" && count < maxEntries)) { | ||
rssitems.push({ | ||
title: doc.frontmatter.yaml.title, | ||
description: doc.frontmatter.yaml.teaser ? doc.frontmatter.yaml.teaser : "", | ||
url: config.root_url +'/'+ doc.renderedFileName, | ||
date: doc.frontmatter.yaml.publicationDate | ||
? doc.frontmatter.yaml.publicationDate | ||
: doc.stat.mtime | ||
}); | ||
documents2.push(doc); | ||
} // else console.log('skipped'); | ||
} | ||
@@ -112,3 +121,3 @@ | ||
akasha.partial("blog-news-river.html.ejs", { | ||
documents: documents, | ||
documents: documents2, | ||
feedUrl: feedRenderTo | ||
@@ -115,0 +124,0 @@ }, |
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"engines": { | ||
@@ -17,0 +17,0 @@ "node": ">=0.10.1" |
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
7875
171