1
0
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:
2023-06-02 17:23:39 +02:00
parent 1ed8ca371b
commit b18917ebb4
7 changed files with 63 additions and 44 deletions

View File

@ -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