├── .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/
[object Object]
3 |
--------------------------------------------------------------------------------
/www/calendar/2021-07/index.html:
--------------------------------------------------------------------------------
1 | [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