├── .gitignore
├── src
├── pages
│ ├── pages.json
│ ├── index.liquid
│ ├── tag-archive.liquid
│ └── about.liquid
├── posts
│ ├── posts.json
│ ├── post-5.liquid
│ ├── post-1.liquid
│ ├── post-4.liquid
│ ├── post-3.liquid
│ ├── post-2.liquid
│ ├── post-8.njk
│ ├── post-6.liquid
│ └── post-7.liquid
├── _data
│ └── versions.js
└── _includes
│ └── layouts
│ ├── page.html
│ ├── post.html
│ └── base.html
├── package.json
└── .eleventy.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
3 | www
4 |
--------------------------------------------------------------------------------
/src/pages/pages.json:
--------------------------------------------------------------------------------
1 | {
2 | "layout": "layouts/page.html"
3 | }
4 |
--------------------------------------------------------------------------------
/src/posts/posts.json:
--------------------------------------------------------------------------------
1 | {
2 | "layout": "layouts/post.html",
3 | "tags": ["post"]
4 | }
5 |
--------------------------------------------------------------------------------
/src/posts/post-5.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Post 5
3 | tags:
4 | - eslint
5 | ---
6 |
7 | This is a post about linting your code with ESLint. :clap:
8 |
--------------------------------------------------------------------------------
/src/posts/post-1.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Post 1
3 | tags:
4 | - eleventy
5 | - liquid
6 | ---
7 |
8 | This is an eleventy+liquid post. It's pretty great!
9 |
--------------------------------------------------------------------------------
/src/posts/post-4.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Post 4
3 | tags:
4 | - nodejs
5 | - liquidjs
6 | ---
7 |
8 | This post shows how to use liquidjs directly with Node.
9 |
--------------------------------------------------------------------------------
/src/_data/versions.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | eleventy: require("@11ty/eleventy/package.json").version,
3 | liquidjs: require("liquidjs/package.json").version
4 | };
5 |
--------------------------------------------------------------------------------
/src/posts/post-3.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Post 3
3 | tags:
4 | - wordpress
5 | - eleventy
6 | ---
7 |
8 | This is a post about migrating your WordPress blog to Eleventy. Ahhh yeaaaahhh!
9 |
--------------------------------------------------------------------------------
/src/posts/post-2.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Post 2
3 | tags:
4 | - eleventy
5 | - nunjucks
6 | - filters
7 | ---
8 |
9 | This is a post about Nunjucks filters in Eleventy. It's pretty okay!
10 |
--------------------------------------------------------------------------------
/src/posts/post-8.njk:
--------------------------------------------------------------------------------
1 | ---
2 | title: Post 8 (Nunjucks style)
3 | tags:
4 | - nunjucks
5 | - truthy
6 | ---
7 |
8 | {% if 0 or "" or false %}
9 | Fail: Unexpected FALSY??
10 | {% else %}
11 | Expected: You can't handle the truthy!
12 | {% endif %}
13 |
14 | OK, let's party!
15 |
--------------------------------------------------------------------------------
/src/posts/post-6.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | title: Post 6
3 | tags:
4 | - nodejs
5 | - playwright
6 | ---
7 |
8 | This is a post about automated UI testing using Playwright to test with Chromium and Firefox binaries.
9 |
10 | Actual: {{ title | or: renderData.title }}
11 | Expect: "Seven"
12 |
13 |
--------------------------------------------------------------------------------
/src/_includes/layouts/page.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layouts/base.html
3 | ---
4 |
5 | {{ title }}
8 | {{ $title }}
8 |
This is the homepage. Cool.
7 | 8 |Here are all my posts:
9 | {% assign posts = collections.post %} 10 | {% for post in posts %} 11 |{{ post.data.title }} — {{ post.date | date: "%Y-%m-%d" }}
12 | {% else %} 13 |No posts found in {{ tag }} category.
14 | {% endfor %} 15 | -------------------------------------------------------------------------------- /src/pages/tag-archive.liquid: -------------------------------------------------------------------------------- 1 | --- 2 | layout: layouts/page.html 3 | eleventyExcludeFromCollections: true 4 | pagination: 5 | data: collections 6 | size: 1 7 | alias: tag 8 | filter: 9 | - post 10 | permalink: "/tags/{{ tag | slug }}/" 11 | renderData: 12 | title: "{{ tag }} Archive" 13 | --- 14 | 15 |{{ tag }}Archive
{{ post.data.title }} — {{ post.date | date: "%Y-%m-%d" }}
20 | {% else %} 21 |No posts found in {{ tag }} category.
22 | {% endfor %} 23 | -------------------------------------------------------------------------------- /src/_includes/layouts/base.html: -------------------------------------------------------------------------------- 1 | 2 | {%- assign $title = title | or: renderData.title1, renderData.title2, renderData.title -%} 3 | 4 | 5 | 6 |About me? I'm pretty underwhelming. Prepare to be underwhelmed.
21 | 22 || value | 26 |truthy |
27 | falsy |
28 |
|---|---|---|
{{ item.label }} |
34 | {{ item.value | truthy | check }} | 35 |{{ item.value | falsy | check }} | 36 |