├── .gitignore ├── src ├── index.liquid └── _data │ └── site │ └── data │ └── apps.js ├── .eleventy.js ├── www └── index.html └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /src/index.liquid: -------------------------------------------------------------------------------- 1 | --- 2 | title: where_exp example 3 | --- 4 | 5 | {%- assign apps = site.data.apps | where_exp: 'app', 'app.uninstalled == nil and remember == nil' | sort: 'name' -%} 6 | 7 |

{{ title }}

8 |
{{ apps | inspect }}
9 | -------------------------------------------------------------------------------- /src/_data/site/data/apps.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | { uninstalled: false, name: "OnE" }, 3 | { uninstalled: true, name: "TwO" }, 4 | { uninstalled: true, name: "ThReE" }, 5 | { uninstalled: false, name: "FoUr" }, 6 | { name: "FiVe" }, 7 | { name: "SiX" }, 8 | ]; 9 | -------------------------------------------------------------------------------- /.eleventy.js: -------------------------------------------------------------------------------- 1 | module.exports = (eleventyConfig) => { 2 | eleventyConfig.setLiquidOptions({ 3 | dynamicPartials: false, 4 | strictVariables: false, 5 | strictFilters: false, 6 | jekyllInclude: true 7 | }); 8 | 9 | eleventyConfig.addFilter("inspect", require("node:util").inspect); 10 | 11 | return { 12 | dir: { 13 | input: "src", 14 | output: "www", 15 | } 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 |

where_exp example

2 |
[
 3 |   { name: 'FiVe' },
 4 |   { uninstalled: false, name: 'FoUr' },
 5 |   { uninstalled: false, name: 'OnE' },
 6 |   { name: 'SiX' },
 7 |   { uninstalled: true, name: 'ThReE' },
 8 |   { uninstalled: true, name: 'TwO' }
 9 | ]
10 | 11 |
[
12 |   { name: 'FiVe' },
13 |   { uninstalled: false, name: 'FoUr' },
14 |   { uninstalled: false, name: 'OnE' },
15 |   { name: 'SiX' },
16 |   { uninstalled: true, name: 'ThReE' },
17 |   { uninstalled: true, name: 'TwO' }
18 | ]
19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "11ty-2228", 3 | "description": "Jekyll’s `where_exp` workaround #2228", 4 | "version": "1.0.0", 5 | "author": "Peter deHaan ", 6 | "bugs": { 7 | "url": "https://github.com/pdehaan/11ty-2228/issues" 8 | }, 9 | "devDependencies": { 10 | "@11ty/eleventy": "^1.0.0" 11 | }, 12 | "homepage": "https://github.com/pdehaan/11ty-2228#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-2228.git" 19 | }, 20 | "scripts": { 21 | "build": "eleventy", 22 | "test": "echo \"Error: no test specified\" && exit 1" 23 | } 24 | } 25 | --------------------------------------------------------------------------------