mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-06-28 05:25:11 +00:00
Linux support, updated documentation
This commit is contained in:
@ -90,9 +90,10 @@ module.exports = function (eleventyConfig) {
|
||||
});
|
||||
|
||||
// Retrieve content of a file
|
||||
eleventyConfig.addFilter('filecontent', function (fname) {
|
||||
eleventyConfig.addShortcode('filecontent', function (fname, startLine = 0) {
|
||||
const buf = fs.readFileSync(path.join(indir, fname));
|
||||
return buf.toString();
|
||||
const str = buf.toString().split('\n').slice(startLine).join('\n');
|
||||
return str;
|
||||
});
|
||||
|
||||
// Global options
|
||||
|
Reference in New Issue
Block a user