akashacms-base
Advanced tools
Comparing version 0.4.5 to 0.4.6
33
index.js
@@ -50,6 +50,2 @@ /** | ||
module.exports.helloWorld = function() { | ||
return "Hello, World!"; | ||
}; | ||
var fixHeaderMeta = function(metadata) { | ||
@@ -151,2 +147,31 @@ var data = {}; | ||
}, | ||
function($, metadata, dirty, done) { | ||
logger.trace('ak-header-linkreltags'); | ||
var elements = []; | ||
$('ak-header-linkreltags').each(function(i, elem) { elements.push(elem); }); | ||
async.eachSeries(elements, | ||
function(element, next) { | ||
if (config.akBase && config.akBase.linkRelTags) { | ||
config.akBase.linkRelTags.forEach(function(lrtag) { | ||
akasha.partial("ak_linkreltag.html.ejs", { | ||
relationship: lrtag.relationship, | ||
url: lrtag.url | ||
}, function(err, rendered) { | ||
if (err) { logger.error(err); next(err); } | ||
else { $(element).replaceWith(rendered); next(); } | ||
}); | ||
}); | ||
} else { | ||
$(element).remove(); | ||
next(); | ||
} | ||
}, | ||
function(err) { | ||
if (err) { | ||
logger.error('ak-header-linkreltags Errored with '+ util.inspect(err)); | ||
done(err); | ||
} else done(); | ||
}); | ||
}, | ||
@@ -153,0 +178,0 @@ function($, metadata, dirty, done) { |
@@ -29,3 +29,3 @@ { | ||
}, | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"engines": { | ||
@@ -32,0 +32,0 @@ "node": ">=0.10.1" |
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
75030
523