├── .gitignore ├── www └── test │ ├── 1 │ └── index.html │ ├── 2 │ └── index.html │ ├── 3 │ └── index.html │ └── index.html ├── src ├── _includes │ └── layouts │ │ └── main.liquid └── test.liquid ├── .eleventy.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /www/test/1/index.html: -------------------------------------------------------------------------------- 1 | main1 - main3 - undefined 2 | 3 | file1 - file2 - file3 4 | 5 | -------------------------------------------------------------------------------- /www/test/index.html: -------------------------------------------------------------------------------- 1 | main1 - main2 - undefined 2 | 3 | file1 - file2 - file3 4 | 5 | -------------------------------------------------------------------------------- /src/_includes/layouts/main.liquid: -------------------------------------------------------------------------------- 1 | {% test1 "main1", "main2", "main3" %} 2 | {{ content }} 3 | -------------------------------------------------------------------------------- /www/test/2/index.html: -------------------------------------------------------------------------------- 1 | main1 - undefined - undefined 2 | 3 | file1 - file2 - file3 4 | 5 | -------------------------------------------------------------------------------- /www/test/3/index.html: -------------------------------------------------------------------------------- 1 | main1 - undefined - undefined 2 | 3 | file1 - file2 - file3 4 | 5 | -------------------------------------------------------------------------------- /src/test.liquid: -------------------------------------------------------------------------------- 1 | --- 2 | layout: layouts/main.liquid 3 | pagination: 4 | data: 'testdata' 5 | size: 1 6 | addAllPagesToCollections: true 7 | testdata: 8 | - item1 9 | - item2 10 | - item3 11 | - item4 12 | --- 13 | 14 | {% test1 "file1", "file2", "file3" %} 15 | -------------------------------------------------------------------------------- /.eleventy.js: -------------------------------------------------------------------------------- 1 | module.exports = (eleventyConfig) => { 2 | eleventyConfig.addShortcode('test1', function (arg1, arg2, arg3) { 3 | console.log(`${this.page.outputPath}:`, arg1, arg2, arg3); 4 | return `${arg1} - ${arg2} - ${arg3}`; 5 | }); 6 | 7 | return { 8 | dir: { 9 | input: "src", 10 | output: "www", 11 | } 12 | }; 13 | }; 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "11ty-2154", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": ".eleventy.js", 6 | "scripts": { 7 | "build": "eleventy", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "@11ty/eleventy": "^1.0.0-canary.49" 15 | } 16 | } 17 | --------------------------------------------------------------------------------