├── .gitignore
├── src
├── _includes
│ └── blog-main.liquid
└── blog
│ ├── seven.liquid
│ ├── five.liquid
│ ├── six.liquid
│ ├── three.liquid
│ ├── two.liquid
│ ├── four.liquid
│ ├── one.liquid
│ └── blog.11tydata.js
├── www
└── blog
│ ├── 2024-01-13-seven.html
│ ├── 2011-01-20-this-is-page-one.html
│ ├── 2022-04-13-this-is-page-4.html
│ ├── 2024-01-13-this-is-page-3.html
│ ├── 2024-01-13-this-is-page-5.html
│ ├── 2024-01-13-this-is-page-six.html
│ └── 2024-01-13-this-is-page-two.html
├── eleventy.config.js
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/src/_includes/blog-main.liquid:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/www/blog/2024-01-13-seven.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/www/blog/2011-01-20-this-is-page-one.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/www/blog/2022-04-13-this-is-page-4.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/www/blog/2024-01-13-this-is-page-3.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/www/blog/2024-01-13-this-is-page-5.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/www/blog/2024-01-13-this-is-page-six.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/www/blog/2024-01-13-this-is-page-two.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/blog/seven.liquid:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | ---
4 |
5 | Page 7, no title.
6 |
--------------------------------------------------------------------------------
/src/blog/five.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: This is page 5
3 | ---
4 |
5 |
{{ title }}
6 |
--------------------------------------------------------------------------------
/src/blog/six.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: This is page siX
3 | ---
4 |
5 | {{ title }}
6 |
--------------------------------------------------------------------------------
/src/blog/three.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: This is page 3
3 | ---
4 |
5 | {{ title }}
6 |
--------------------------------------------------------------------------------
/src/blog/two.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: This is page two
3 | ---
4 |
5 | {{ title }}
6 |
--------------------------------------------------------------------------------
/src/blog/four.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: This is Page 4
3 | date: 2022-04-14
4 | ---
5 |
6 | {{ title }}
7 |
--------------------------------------------------------------------------------
/src/blog/one.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: This is page one
3 | date: 2011-01-21
4 | ---
5 |
6 | {{ title }}
7 |
--------------------------------------------------------------------------------
/src/blog/blog.11tydata.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | tags: ["posts"],
3 | layout: "blog-main",
4 | permalink(data) {
5 | const pageDate = data.page.date.toLocaleDateString("en-CA");
6 | const pageSlug = this.slugify(data.title ?? data.page.fileSlug);
7 | return `/blog/${pageDate}-${pageSlug}.html`
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/eleventy.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @param {import("@11ty/eleventy/src/UserConfig")} eleventyConfig
3 | * @returns {ReturnType}
4 | */
5 | module.exports = function (eleventyConfig) {
6 | eleventyConfig.addLayoutAlias("blog-main", "blog-main.liquid");
7 |
8 | return {
9 | dir: {
10 | input: "src",
11 | output: "www",
12 | }
13 | };
14 | };
15 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "11ty-3166",
3 | "description": "",
4 | "version": "1.0.0",
5 | "author": "Peter deHaan ",
6 | "bugs": {
7 | "url": "https://github.com/pdehaan/11ty-3166/issues"
8 | },
9 | "dependencies": {
10 | "@11ty/eleventy": "^2.0.1"
11 | },
12 | "devDependencies": {},
13 | "homepage": "https://github.com/pdehaan/11ty-3166#readme",
14 | "keywords": [],
15 | "license": "MPL-2.0",
16 | "main": "index.js",
17 | "repository": {
18 | "type": "git",
19 | "url": "git+https://github.com/pdehaan/11ty-3166.git"
20 | },
21 | "scripts": {
22 | "build": "eleventy",
23 | "test": "echo \"Error: no test specified\" && exit 1"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------