├── .gitignore ├── www └── calendar │ ├── 2014-09 │ └── index.html │ └── 2021-07 │ └── index.html ├── .eleventy.js ├── src ├── _data │ └── calendar │ │ └── index.js └── index.pug └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /www/calendar/2014-09/index.html: -------------------------------------------------------------------------------- 1 |

url = /calendar/2014-09/

2 |
[object Object]
3 | -------------------------------------------------------------------------------- /www/calendar/2021-07/index.html: -------------------------------------------------------------------------------- 1 |

url = /calendar/2021-07/

2 |
[object Object]
3 | -------------------------------------------------------------------------------- /.eleventy.js: -------------------------------------------------------------------------------- 1 | module.exports = function (eleventyConfig) { 2 | return { 3 | dir: { 4 | input: "src", 5 | output: "www", 6 | } 7 | }; 8 | }; 9 | -------------------------------------------------------------------------------- /src/_data/calendar/index.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | { 3 | year: "2014", 4 | month: "09", 5 | posts: [ 6 | {"title": "Lorem Ipsum"} 7 | ] 8 | }, 9 | { 10 | year: "2021", 11 | month: "07", 12 | posts: [ 13 | {title: "more stuff"} 14 | ] 15 | } 16 | ]; 17 | -------------------------------------------------------------------------------- /src/index.pug: -------------------------------------------------------------------------------- 1 | ---js 2 | { 3 | pagination: { 4 | data: "calendar.index", 5 | size: 1, 6 | alias: "calDate", 7 | }, 8 | permalink: "| calendar/#{ calDate.year }-#{ calDate.month }/", 9 | eleventyComputed: { 10 | title: (data) => `url = ${data.page.url}` 11 | } 12 | } 13 | --- 14 | 15 | header 16 | h1 #{ title } 17 | 18 | pre 19 | code #{ calDate } 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "11ty-1649", 3 | "description": "", 4 | "version": "1.0.0", 5 | "author": "Peter deHaan ", 6 | "bugs": { 7 | "url": "https://github.com/pdehaan/11ty-1649/issues" 8 | }, 9 | "devDependencies": { 10 | "@11ty/eleventy": "^1.0.1" 11 | }, 12 | "homepage": "https://github.com/pdehaan/11ty-1649#readme", 13 | "keywords": [], 14 | "license": "MPL-2.0", 15 | "main": ".eleventy.js", 16 | "repository": { 17 | "type": "git", 18 | "url": "git+https://github.com/pdehaan/11ty-1649.git" 19 | }, 20 | "scripts": { 21 | "build": "eleventy", 22 | "test": "echo \"Error: no test specified\" && exit 1" 23 | } 24 | } 25 | --------------------------------------------------------------------------------