├── .gitignore ├── views_njk ├── index.njk └── _data │ └── metadata.json ├── .eleventy.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | _site 4 | -------------------------------------------------------------------------------- /views_njk/index.njk: -------------------------------------------------------------------------------- 1 | 2 |
3 |{{ metadata.description }}
8 | 9 | 10 | -------------------------------------------------------------------------------- /views_njk/_data/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Your Blog Name", 3 | "url": "https://myurl.com/", 4 | "description": "I am writing about my experiences as a naval navel-gazer.", 5 | "feed": { 6 | "subtitle": "I am writing about my experiences as a naval navel-gazer.", 7 | "filename": "feed.xml", 8 | "path": "/feed/feed.xml", 9 | "id": "https://myurl.com/" 10 | }, 11 | "author": { 12 | "name": "Your Name Here", 13 | "email": "youremailaddress@example.com" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.eleventy.js: -------------------------------------------------------------------------------- 1 | const eleventyNavigationPlugin = require("@11ty/eleventy-navigation"); 2 | 3 | module.exports = function(eleventyConfig) { 4 | eleventyConfig.addPlugin(eleventyNavigationPlugin); 5 | eleventyConfig.addPassthroughCopy('css'); 6 | eleventyConfig.addPassthroughCopy('js'); 7 | 8 | return { 9 | dir: { 10 | "input": "views_njk", 11 | "includes": "includes", 12 | }, 13 | "htmlTemplateEngine": "njk", 14 | "markdownTemplateEngine": "njk", 15 | "dataTemplateEngine": "njk", 16 | "passthroughFileCopy": true, 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "11ty-1222", 3 | "description": "Cannot pass data from _data to template", 4 | "version": "1.0.0", 5 | "author": "Peter deHaan