├── .gitattributes ├── .gitignore ├── .nvmrc ├── .prettierignore ├── .prettierrc.json ├── README.md ├── eleventy.config.js ├── etc ├── collections │ └── index.js ├── filters │ ├── filters.js │ └── index.js └── transforms │ └── index.js ├── lib └── markdown.js ├── package-lock.json ├── package.json ├── postcss.config.js └── src ├── _data ├── config.js └── helpers.js ├── _includes ├── layouts │ ├── base.njk │ ├── error.njk │ ├── index.njk │ ├── list.njk │ ├── page.njk │ ├── post.njk │ └── tag-results.njk └── partials │ ├── base-head.njk │ ├── card-list-index.njk │ ├── site-footer.njk │ ├── site-header.njk │ ├── site-pagination.njk │ └── site-post-list.njk ├── _styles ├── _components │ ├── _card-list.css │ ├── _footnotes.css │ ├── _site-footer.css │ ├── _site-header.css │ └── _site-pagination.css ├── _config │ ├── _import.css │ └── _media.css ├── _layout │ ├── _content.css │ ├── _layout-grid.css │ └── _wrapper.css ├── _types.css ├── _utilities.css ├── _variables.css └── _vendor │ └── _prism.css ├── content ├── 404.md ├── index.md ├── posts.md ├── posts │ ├── 2011-06-02-leviathan-wakes.md │ ├── 2012-06-26-calibans-war.md │ ├── 2013-07-04-abaddons-gate.md │ ├── 2014-06-05-cibola-burn.md │ ├── 2015-06-02-nemesis-games.md │ ├── 2016-12-06-babylons-ashes.md │ ├── 2017-12-05-persepolis-rising.md │ ├── 2019-03-26-tiamats-wrath.md │ ├── 2021-11-30-leviathan-falls.md │ └── posts.json ├── tags.md └── using-this-template.md ├── feed.njk ├── media ├── aldebaran-s-qtRF_RxCAo0-unsplash.jpg ├── andy-holmes-rCbdp8VCYhQ-unsplash.jpg ├── jeremy-thomas-E0AHdsENmDg-unsplash.jpg └── john-fowler-7Ym9rpYtSdA-unsplash.jpg ├── site.css ├── static ├── favicons │ ├── apple-touch-icon.jpg │ ├── favicon.jpg │ ├── icon-192.jpg │ ├── icon-512.jpg │ └── icon.svg ├── fonts │ └── .gitkeep └── og-default.jpg └── webmanifest.njk /.gitattributes: -------------------------------------------------------------------------------- 1 | https://github.com/alexkaratarakis/gitattributes 2 | ## GITATTRIBUTES FOR WEB PROJECTS 3 | # 4 | # These settings are for any web project. 5 | # 6 | # Details per file setting: 7 | # text These files should be normalized (i.e. convert CRLF to LF). 8 | # binary These files are binary and should be left untouched. 9 | # 10 | # Note that binary is a macro for -text -diff. 11 | ###################################################################### 12 | # Auto detect 13 | ## Handle line endings automatically for files detected as 14 | ## text and leave all files detected as binary untouched. 15 | ## This will handle all files NOT defined below. 16 | * text=auto 17 | # Source code 18 | *.bash text eol=lf 19 | *.bat text eol=crlf 20 | *.cmd text eol=crlf 21 | *.coffee text 22 | *.css text 23 | *.htm text diff=html 24 | *.html text diff=html 25 | *.inc text 26 | *.ini text 27 | *.js text 28 | *.json text 29 | *.jsx text 30 | *.less text 31 | *.ls text 32 | *.map text -diff 33 | *.od text 34 | *.onlydata text 35 | *.php text diff=php 36 | *.pl text 37 | *.ps1 text eol=crlf 38 | *.py text diff=python 39 | *.rb text diff=ruby 40 | *.sass text 41 | *.scm text 42 | *.scss text diff=css 43 | *.sh text eol=lf 44 | *.sql text 45 | *.styl text 46 | *.tag text 47 | *.ts text 48 | *.tsx text 49 | *.xml text 50 | *.xhtml text diff=html 51 | # Docker 52 | Dockerfile text 53 | # Documentation 54 | *.ipynb text 55 | *.markdown text 56 | *.md text 57 | *.mdwn text 58 | *.mdown text 59 | *.mkd text 60 | *.mkdn text 61 | *.mdtxt text 62 | *.mdtext text 63 | *.txt text 64 | AUTHORS text 65 | CHANGELOG text 66 | CHANGES text 67 | CONTRIBUTING text 68 | COPYING text 69 | copyright text 70 | *COPYRIGHT* text 71 | INSTALL text 72 | license text 73 | LICENSE text 74 | NEWS text 75 | readme text 76 | *README* text 77 | TODO text 78 | # Templates 79 | *.dot text 80 | *.ejs text 81 | *.haml text 82 | *.handlebars text 83 | *.hbs text 84 | *.hbt text 85 | *.jade text 86 | *.latte text 87 | *.mustache text 88 | *.njk text 89 | *.phtml text 90 | *.tmpl text 91 | *.tpl text 92 | *.twig text 93 | *.vue text 94 | # Configs 95 | *.cnf text 96 | *.conf text 97 | *.config text 98 | .editorconfig text 99 | .env text 100 | .gitattributes text 101 | .gitconfig text 102 | .htaccess text 103 | *.lock text -diff 104 | package-lock.json text -diff 105 | *.toml text 106 | *.yaml text 107 | *.yml text 108 | browserslist text 109 | Makefile text 110 | makefile text 111 | # Heroku 112 | Procfile text 113 | # Graphics 114 | *.ai binary 115 | *.bmp binary 116 | *.eps binary 117 | *.gif binary 118 | *.gifv binary 119 | *.ico binary 120 | *.jng binary 121 | *.jp2 binary 122 | *.jpg binary 123 | *.jpeg binary 124 | *.jpx binary 125 | *.jxr binary 126 | *.pdf binary 127 | *.png binary 128 | *.psb binary 129 | *.psd binary 130 | # SVG treated as an asset (binary) by default. 131 | *.svg text 132 | # If you want to treat it as binary, 133 | # use the following line instead. 134 | # *.svg binary 135 | *.svgz binary 136 | *.tif binary 137 | *.tiff binary 138 | *.wbmp binary 139 | *.webp binary 140 | # Audio 141 | *.kar binary 142 | *.m4a binary 143 | *.mid binary 144 | *.midi binary 145 | *.mp3 binary 146 | *.ogg binary 147 | *.ra binary 148 | # Video 149 | *.3gpp binary 150 | *.3gp binary 151 | *.as binary 152 | *.asf binary 153 | *.asx binary 154 | *.fla binary 155 | *.flv binary 156 | *.m4v binary 157 | *.mng binary 158 | *.mov binary 159 | *.mp4 binary 160 | *.mpeg binary 161 | *.mpg binary 162 | *.ogv binary 163 | *.swc binary 164 | *.swf binary 165 | *.webm binary 166 | # Archives 167 | *.7z binary 168 | *.gz binary 169 | *.jar binary 170 | *.rar binary 171 | *.tar binary 172 | *.zip binary 173 | # Fonts 174 | *.ttf binary 175 | *.eot binary 176 | *.otf binary 177 | *.woff binary 178 | *.woff2 binary 179 | # Executables 180 | *.exe binary 181 | *.pyc binary 182 | # RC files (like .babelrc or .eslintrc) 183 | *.*rc text 184 | # Ignore files (like .npmignore or .gitignore) 185 | *.*ignore text 186 | # Files/directories actively tracked for this project 187 | *.jpg filter=lfs diff=lfs merge=lfs 188 | *.png filter=lfs diff=lfs merge=lfs 189 | *.gif filter=lfs diff=lfs merge=lfs 190 | *.mp4 filter=lfs diff=lfs merge=lfs 191 | *.webm filter=lfs diff=lfs merge=lfs 192 | *.woff filter=lfs diff=lfs merge=lfs -binary 193 | *.woff2 filter=lfs diff=lfs merge=lfs -binary 194 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .env 3 | node_modules/ 4 | dist -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v21.7.3 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.md -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "useTabs": true, 4 | "tabWidth": 2, 5 | "bracketSpacing": true, 6 | "bracketSameLine": true, 7 | "arrowParens": "avoid" 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 11ty Get going 2 | Get Going is an 11ty starter project for simple blogs, small sites and prototypes. 3 | 4 | _Now upgraded to use ES6 modules and 11ty v3.0_ 🎉 5 | 6 | **[View a demo](https://mellow-crepe-c98c31.netlify.app)** 7 | 8 | The following starting points and integrations come included: 9 | 10 | - [11ty Pagination](https://www.11ty.dev/docs/pagination/) 11 | - [11ty Navigation](https://www.11ty.dev/docs/plugins/navigation/) 12 | - [11ty Image](https://www.11ty.dev/docs/plugins/image/) 13 | - [11ty RSS](https://www.11ty.dev/docs/plugins/rss/) 14 | - [11ty Syntax Highlighting](https://www.11ty.dev/docs/plugins/syntaxhighlight/) 15 | - [Eleventy Plugin: Lightning CSS](https://www.npmjs.com/package/@11tyrocks/eleventy-plugin-lightningcss) 16 | - [Markdown-it](https://www.npmjs.com/package/markdown-it) 17 | - [Markdown-it Footnote](https://www.npmjs.com/package/markdown-it-footnote) 18 | - [Markdown-it Definition Lists](https://www.npmjs.com/package/markdown-it-deflist) 19 | - [Markdown-it Sub](https://www.npmjs.com/package/markdown-it-sub) 20 | - [Markdown-it Sup](https://www.npmjs.com/package/markdown-it-sup) 21 | - [Markdown-it-eleventy-img](https://www.npmjs.com/package/markdown-it-eleventy-img) 22 | 23 | ## Requirements 24 | [Node version manager](https://github.com/nvm-sh/nvm) is recommended then simply `nvm use` and it will pull the version from the `.nvmrc` file in this repo. Any Node LTS version should suffice for this template. 25 | 26 | ### Running the project 27 | To run a version yourself, [clone the repo](https://github.com/kevh-c/11ty-get-going), `npm install` and then `npm run serve` to view the demo project locally. 28 | 29 | If you're intending to use Git LFS remember to `git lfs install` to enable it. 30 | 31 | --- 32 | 33 | ## Getting started 34 | There's a little bit of housekeeping to do in order to make this template your own. 35 | 36 | ### Update global configs for this template 37 | This project uses a single file to capture project-wide metadata, basically to populate all the stuff in a `
` tag on your pages. This can be found under `src/data/config.js`. These of course can be overridden in your content frontmatter thanks to Eleventys [data cascade](https://www.11ty.dev/docs/data-cascade/). 38 | 39 | ```js 40 | // Required. The name of your project. 41 | projectName: "11ty Get Going", 42 | 43 | // Required. A brief description of your project. 44 | description: "Just another 11ty starter kit", 45 | 46 | // Required. A short name used exclusively in webmanifest.njk. Keep it under 12 characters to minimize the possibility of truncation. Can be safely deleted if you delete webmanifest.njk. 47 | shortName: "11ty GG", 48 | 49 | // Required. Update development and production urls to your project requirements. 50 | domain: process.env.ELEVENTY_RUN_MODE == "serve" ? "http://localhost:8080" : "https://example.com", 51 | 52 | // Required. SEO indexing behaviour. 53 | robots: "index, follow", 54 | 55 | // Required. Used exclusively in webmanifest.njk. This sometimes affects how an OS displays your site. Can be safely deleted if you delete webmanifest.njk. 56 | themeColor: "#FFFFFF", 57 | 58 | // Required. Used exclusively in webmanifest.njk. Recommend using the same value as body background color in your CSS. Can be safely deleted if you delete webmanifest.njk. 59 | backgroundColor: "#FFFFFF", 60 | 61 | // Optional. Delete block if not used. Author values for project. 62 | author: { 63 | name: "Author Name", 64 | email: "author@email.com", 65 | }, 66 | 67 | // Optional. Delete block if you don't require link tags related to your idenity. Duplicate as many objects as you need! 68 | identity: [ 69 | { 70 | rel: "me", 71 | url: "URL-GOES-HERE", 72 | }, 73 | ], 74 | 75 | // Optional. Delete block if you don't require Opengraph. 76 | og: { 77 | locale: "en_GB", 78 | type: "website", 79 | image: { 80 | rel: "/og-default.jpg", 81 | alt: "Default OG image displayed here", 82 | }, 83 | } 84 | ``` 85 | 86 | ### Favicons and Opengraph 87 | 88 | #### Favicons 89 | Favicons are stored under `src/static/favicons` and are automatically passed through to their relevant directories on build. All you need to do is create the images for your project. 90 | 91 | #### Opengraph 92 | A default Opengraph image can be found under `src/static` and is named `og-default.jpg`. Much like the favicons all you need to do is create a relevant default image to be used. 93 | 94 | If you decide to delete this file (for example if you don't require Opengraph in your project), then you must update `eleventy.config.js` and remove this line: 95 | 96 | ```js 97 | eleventyConfig.addPassthroughCopy({ "src/static/og-default.jpg": "/og-default.jpg" }); 98 | ``` 99 | 100 | ### RSS logic 101 | By default this template collects all posts under `src/content/posts` to populate the RSS feed. You would most likely want something different for your project. If you visit `etc/collections/index.js` and edit the following to fit your needs: 102 | 103 | ```js 104 | export const feed = i => i.getFilteredByGlob("./src/content/posts/*.md").reverse(); 105 | ``` 106 | 107 | ### Responsive images 108 | Images are stored in their original format under `src/media`, although you can organise images in any way in this project. 109 | 110 | This project adheres to Markdown syntax as much as possible and uses [Markdown-it-eleventy-img](https://www.npmjs.com/package/markdown-it-eleventy-img) in order to leverage the magic of [Eleventy Image](https://www.11ty.dev/docs/plugins/image/) to generate responsive images based on your needs (so you can do something like this `` and get all the responsive benefits without much effort). 111 | 112 | For images imported using Markdown syntax, this project wraps images in a `