├── .gitignore ├── src ├── _data │ ├── site.json │ └── navigation.json ├── index.liquid ├── posts │ └── one.liquid ├── portfolio.liquid └── _includes │ └── navigation.html ├── .eleventy.js ├── package.json └── dist ├── posts └── one │ └── index.html ├── index.html └── portfolio └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /src/_data/site.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseurl": "http://localhost:1234" 3 | } 4 | -------------------------------------------------------------------------------- /src/index.liquid: -------------------------------------------------------------------------------- 1 | --- 2 | title: HOME 3 | --- 4 | 5 |

{{ title }}

6 | 7 | {% include navigation.html, items: navigation.items %} 8 | 9 | -------------------------------------------------------------------------------- /src/posts/one.liquid: -------------------------------------------------------------------------------- 1 | --- 2 | title: ONE 3 | --- 4 | 5 |

{{ title }}

6 | 7 | {% include navigation.html, items: navigation.items %} 8 | -------------------------------------------------------------------------------- /src/portfolio.liquid: -------------------------------------------------------------------------------- 1 | --- 2 | title: portfolio 3 | --- 4 | 5 |

{{ title }}

6 | 7 | {% include navigation.html, items: navigation.items %} 8 | -------------------------------------------------------------------------------- /src/_data/navigation.json: -------------------------------------------------------------------------------- 1 | { 2 | "items": [ 3 | { 4 | "name": "HOME", 5 | "link": "/", 6 | "subitems": [ 7 | { "name": "Quem sou", "link": "/#quemsou" }, 8 | { "name": "Cirriculum Vitae", "link": "/#CV" }, 9 | { "name": "Áreas de Conhecimento", "link": "/#areas-de-conhecimento" } 10 | ] 11 | }, 12 | { "name": "Portfolio", "link": "/portfolio/" }, 13 | { "name": "Fale Comigo", "link": "/fale-comigo/" }, 14 | { "name": "Blog", "link": "/blog/" } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /.eleventy.js: -------------------------------------------------------------------------------- 1 | const pkg = require("./package.json").eleventyConfig; 2 | 3 | module.exports = function (eleventyConfig) { 4 | 5 | // DEBUGGING 6 | // eleventyConfig.addFilter("inspect", require("util").inspect); 7 | 8 | // eleventyConfig.addCollection("navigation", function (collectionApi) { 9 | // // const res = collectionApi.getFilteredByGlob("src/_data/*.json"); 10 | // const res = require("./src/_data/navigation.json"); 11 | // console.log(res); 12 | // return res; 13 | // }); 14 | 15 | return { 16 | dir: pkg.dir 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /src/_includes/navigation.html: -------------------------------------------------------------------------------- 1 | {%- assign navurl = page.url | remove: 'index.html' -%} 2 | 3 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "11ty-1943", 3 | "description": "Retrieve content from JSON Single File Collection", 4 | "version": "1.0.0", 5 | "author": "", 6 | "bugs": { 7 | "url": "https://github.com/pdehaan/11ty-1943/issues" 8 | }, 9 | "dependencies": { 10 | "@11ty/eleventy": "^0.12.1" 11 | }, 12 | "devDependencies": {}, 13 | "eleventyConfig": { 14 | "dir": { 15 | "input": "src", 16 | "output": "dist", 17 | "includes": "_includes", 18 | "layouts": "_layouts", 19 | "data": "_data" 20 | } 21 | }, 22 | "homepage": "https://github.com/pdehaan/11ty-1943#readme", 23 | "keywords": [], 24 | "license": "ISC", 25 | "main": "index.js", 26 | "repository": { 27 | "type": "git", 28 | "url": "git+https://github.com/pdehaan/11ty-1943.git" 29 | }, 30 | "scripts": { 31 | "build": "eleventy", 32 | "test": "echo \"Error: no test specified\" && exit 1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /dist/posts/one/index.html: -------------------------------------------------------------------------------- 1 |

ONE

2 | 3 | 36 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 |

HOME

2 | 3 | 38 | -------------------------------------------------------------------------------- /dist/portfolio/index.html: -------------------------------------------------------------------------------- 1 |

portfolio

2 | 3 | 41 | --------------------------------------------------------------------------------