{{ post.data.title }}
12 | 13 |{{ post.data.description }}
15 | 37 |├── .eleventyignore ├── src ├── en │ ├── en.json │ ├── tags-list.njk │ ├── feed │ │ ├── feed.njk │ │ └── json.njk │ ├── about.md │ ├── 404.njk │ ├── archive.njk │ ├── index.njk │ └── tags.njk ├── posts │ ├── en │ │ ├── en.json │ │ ├── second.md │ │ ├── third.md │ │ ├── fourth.md │ │ ├── fifth.md │ │ └── first.md │ └── posts.json ├── assets │ ├── js │ │ └── index.js │ └── css │ │ ├── components │ │ ├── time.scss │ │ ├── header.scss │ │ ├── pagination.scss │ │ ├── logo.scss │ │ ├── nav.scss │ │ ├── footer.scss │ │ ├── post.scss │ │ ├── picture.scss │ │ ├── link.scss │ │ └── content.scss │ │ ├── functions.scss │ │ ├── pages │ │ ├── tags.scss │ │ ├── archive.scss │ │ ├── about.scss │ │ ├── index.scss │ │ └── article.scss │ │ ├── mixins.scss │ │ ├── index.scss │ │ ├── layouts │ │ └── post-grid.scss │ │ ├── utilities │ │ ├── spacing.scss │ │ └── flex.scss │ │ ├── variables.scss │ │ ├── reset.scss │ │ ├── settings.scss │ │ ├── base.scss │ │ └── prism.scss ├── _includes │ ├── layouts │ │ ├── home.njk │ │ ├── about.njk │ │ ├── post.njk │ │ └── base.njk │ ├── pages │ │ ├── 404.njk │ │ ├── tags-list.njk │ │ ├── archive.njk │ │ ├── tags.njk │ │ └── index.njk │ ├── icons │ │ ├── letter-v.svg │ │ ├── brand-gitlab.svg │ │ ├── brand-telegram.svg │ │ ├── terminal.svg │ │ ├── letter-c.svg │ │ ├── at.svg │ │ ├── folder.svg │ │ ├── phone.svg │ │ ├── language.svg │ │ ├── link.svg │ │ ├── file-download.svg │ │ ├── brand-github.svg │ │ └── rotate-2.svg │ └── components │ │ ├── feed-json.njk │ │ ├── feed-atom.njk │ │ ├── header.njk │ │ ├── footer.njk │ │ └── blog-post-items.njk └── sitemap.xml.njk ├── _data ├── notFound.js ├── projEnv.js ├── about.js ├── archive.js ├── tagsPage.js ├── footer.js ├── main.js └── metadata.js ├── static ├── favicon.ico ├── favicon-16x16.png ├── favicon-32x32.png ├── apple-touch-icon.png ├── android-chrome-192x192.png └── android-chrome-512x512.png ├── .gitignore ├── .editorconfig ├── csshash.js ├── rollup.config.js ├── cssmin.js ├── .markdown.js ├── .github └── workflows │ └── build.yml ├── LICENSE ├── package.json ├── README.md └── .eleventy.js /.eleventyignore: -------------------------------------------------------------------------------- 1 | README.md 2 | _drafts/ 3 | cv/ 4 | -------------------------------------------------------------------------------- /src/en/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "locale": "en" 3 | } 4 | -------------------------------------------------------------------------------- /src/posts/en/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "locale": "en" 3 | } 4 | -------------------------------------------------------------------------------- /_data/notFound.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | en: { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /src/posts/posts.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": [ 3 | "posts" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/assets/js/index.js: -------------------------------------------------------------------------------- 1 | console.log("%cHELLO, WORLD!!!", "color: green"); 2 | -------------------------------------------------------------------------------- /_data/projEnv.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | eleventy: process.env.ELEVENTY_ENV 3 | } 4 | -------------------------------------------------------------------------------- /src/assets/css/components/time.scss: -------------------------------------------------------------------------------- 1 | .c-time { 2 | font-size: var(--text-xs); 3 | } 4 | -------------------------------------------------------------------------------- /_data/about.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | en: { 3 | title: "about me", 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /_data/archive.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | en: { 3 | title: 'Archive' 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /_data/tagsPage.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | en: { 3 | tag: "tag", 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anparfenov/11ty-starter/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /static/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anparfenov/11ty-starter/HEAD/static/favicon-16x16.png -------------------------------------------------------------------------------- /static/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anparfenov/11ty-starter/HEAD/static/favicon-32x32.png -------------------------------------------------------------------------------- /static/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anparfenov/11ty-starter/HEAD/static/apple-touch-icon.png -------------------------------------------------------------------------------- /static/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anparfenov/11ty-starter/HEAD/static/android-chrome-192x192.png -------------------------------------------------------------------------------- /static/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anparfenov/11ty-starter/HEAD/static/android-chrome-512x512.png -------------------------------------------------------------------------------- /src/_includes/layouts/home.njk: -------------------------------------------------------------------------------- 1 | --- 2 | layout: layouts/base.njk 3 | templateClass: tmpl-home 4 | --- 5 | {{ content | safe }} 6 | -------------------------------------------------------------------------------- /src/en/tags-list.njk: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /tags/ 3 | layout: layouts/home.njk 4 | --- 5 | 6 | {% extends "pages/tags-list.njk" %} 7 | -------------------------------------------------------------------------------- /_data/footer.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | en: { 3 | madeWith: "made with", 4 | sources: "sources", 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site/ 2 | _cache/ 3 | node_modules/ 4 | _data/css.json 5 | 6 | *.log 7 | csshash 8 | _data/csshash.json 9 | _data/year.json 10 | -------------------------------------------------------------------------------- /src/assets/css/functions.scss: -------------------------------------------------------------------------------- 1 | @use "variables"; 2 | 3 | @function get-utility-size-prefix($size) { 4 | @return "#{variables.$utility-prefix}#{$size}"; 5 | } 6 | -------------------------------------------------------------------------------- /src/en/feed/feed.njk: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: "{{ metadata[locale].feed.path }}" 3 | eleventyExcludeFromCollections: true 4 | --- 5 | 6 | {% extends "components/feed-atom.njk" %} 7 | -------------------------------------------------------------------------------- /src/en/feed/json.njk: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: "{{ metadata[locale].jsonfeed.path }}" 3 | eleventyExcludeFromCollections: true 4 | --- 5 | 6 | {% extends "components/feed-json.njk" %} 7 | -------------------------------------------------------------------------------- /src/_includes/pages/404.njk: -------------------------------------------------------------------------------- 1 |
This is starter for eleventy ssg.
5 |It's built with nunjuks and sass also it has rollup config for your js
6 |For site serving you can use caddy, nginx 7 | or use vercel or netlify
`, 8 | latest: 'latest', 9 | post: 'post', 10 | posts: 'posts', 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/assets/css/utilities/spacing.scss: -------------------------------------------------------------------------------- 1 | @use "../variables"; 2 | 3 | $spacing-types: ( 4 | "margin": "m", 5 | "padding": "p", 6 | ); 7 | 8 | $spacing-directions: ( 9 | "left": "l", 10 | "right": "r", 11 | "top": "t", 12 | "bottom": "b" 13 | ); 14 | 15 | @each $type, $type-val in $spacing-types { 16 | .#{variables.$utility-prefix}#{$type-val} { 17 | @each $direction, $dir-val in $spacing-directions { 18 | {$dir-val} { 19 | @each $size-name, $size in variables.$spacing-sizes { 20 | &--#{$size-name} { 21 | #{$type}-#{$direction}: #{$size}; 22 | } 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/assets/css/components/picture.scss: -------------------------------------------------------------------------------- 1 | .c-picture { 2 | width: 100%; 3 | height: 100%; 4 | overflow: hidden; 5 | display: block; 6 | position: relative; 7 | 8 | &--br-8 { 9 | border-radius: 8px; 10 | } 11 | 12 | &_image { 13 | object-fit: cover; 14 | position: absolute; 15 | width: 100%; 16 | height: 100%; 17 | left: 0; 18 | right: 0; 19 | top: 0; 20 | bottom: 0; 21 | } 22 | 23 | &_caption { 24 | position: absolute; 25 | bottom: 0.5rem; 26 | left: 0.5rem; 27 | padding: 0.1rem; 28 | background: var(--color-gray-200); 29 | color: var(--color-text); 30 | font-size: var(--text-xs); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/assets/css/pages/article.scss: -------------------------------------------------------------------------------- 1 | @forward "../components/content"; 2 | @forward "../components/pagination"; 3 | 4 | .p-article { 5 | width: 100%; 6 | max-width: var(--max-content-width); 7 | margin: 0 auto; 8 | display: flex; 9 | flex-direction: column; 10 | flex:1; 11 | 12 | padding: 0 1rem; 13 | background: var(--gradient-header); 14 | border-radius: 0.25rem; 15 | margin-bottom: 1rem; 16 | 17 | &_hero { 18 | border: 1px solid var(--color-text); 19 | padding: 1rem; 20 | border-radius: 0.5rem; 21 | } 22 | 23 | &_date { 24 | font-size: var(--text-sm); 25 | margin-right: 0.5rem; 26 | } 27 | 28 | &_tags { 29 | display: flex; 30 | gap: 0.5rem; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build Eleventy 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-20.04 12 | 13 | strategy: 14 | matrix: 15 | node-version: [14.x] 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | 20 | - name: Use Node.js ${{ matrix.node-version }} 21 | uses: actions/setup-node@v2 22 | with: 23 | node-version: ${{ matrix.node-version }} 24 | 25 | - name: Install dependencies & build 26 | run: | 27 | npm ci 28 | npm run build:github 29 | 30 | - name: Deploy 31 | uses: peaceiris/actions-gh-pages@v3 32 | with: 33 | publish_dir: ./_site 34 | github_token: ${{ secrets.GITHUB_TOKEN }} 35 | -------------------------------------------------------------------------------- /src/assets/css/variables.scss: -------------------------------------------------------------------------------- 1 | @use "sass:map"; 2 | 3 | $viewport: ( 4 | "mobile": "mobile", 5 | "tablet": "tablet", 6 | "laptop": "laptop", 7 | "desktop": "desktop" 8 | ); 9 | 10 | $breakpoints: ( 11 | map.get($viewport, "mobile"): 30rem, 12 | map.get($viewport, "tablet"): 48rem, 13 | map.get($viewport, "laptop"): 70rem, 14 | map.get($viewport, "desktop"): 90rem 15 | ); 16 | 17 | $sizes: ( 18 | map.get($viewport, "mobile"): "sm", 19 | map.get($viewport, "tablet"): "md", 20 | map.get($viewport, "laptop"): "lg", 21 | map.get($viewport, "desktop"): "xl" 22 | ); 23 | 24 | $spacing-sizes: ( 25 | "4": "0.25rem", 26 | "6": "0.325rem", 27 | "8": "0.5rem", 28 | "10": "0.625rem", 29 | "12": "0.75rem", 30 | "14": "0.875rem", 31 | "16": "1rem", 32 | "18": "1.125rem", 33 | "20": "1.25rem", 34 | "22": "1.375rem", 35 | "24": "1.5rem", 36 | "32": "2.rem", 37 | ); 38 | 39 | $utility-prefix: "u-"; 40 | -------------------------------------------------------------------------------- /_data/metadata.js: -------------------------------------------------------------------------------- 1 | const url = process.env.URL ?? "https://example.com"; 2 | const title = "Eleventy starter"; 3 | 4 | module.exports = { 5 | en: { 6 | url, 7 | title, 8 | description: "TODO", 9 | feed: { 10 | subtitle: "TODO", 11 | filename: "feed.xml", 12 | path: "/feed/en.feed.xml", 13 | id: "TODO", 14 | }, 15 | jsonfeed: { 16 | path: "/feed/en.feed.json", 17 | url: `${url}/feed/en.feed.json`, 18 | }, 19 | source: { 20 | label: 'github', 21 | link: 'https://github.com/moody-person/11ty-starter' 22 | }, 23 | author: { 24 | url, 25 | name: "Your name", 26 | email: "example@mail.com", 27 | }, 28 | posts: { 29 | title: `Posts | ${title}`, 30 | description: "Blog posts list", 31 | }, 32 | about: { 33 | title: `About | ${title}`, 34 | }, 35 | }, 36 | }; 37 | -------------------------------------------------------------------------------- /src/_includes/components/feed-json.njk: -------------------------------------------------------------------------------- 1 | { 2 | "version": "https://jsonfeed.org/version/1.1", 3 | "title": "{{ metadata[locale].title }}", 4 | "language": "{{ locale }}", 5 | "home_page_url": "{{ metadata[locale].url }}", 6 | "feed_url": "{{ metadata[locale].jsonfeed.url }}", 7 | "description": "{{ metadata[locale].description }}", 8 | "author": { 9 | "name": "{{ metadata[locale].author.name }}", 10 | "url": "{{ metadata[locale].author.url }}" 11 | }, 12 | "items": [ 13 | {%- for post in collections.posts | reverse %} 14 | {%- set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata[locale].url) }}{% endset -%} 15 | { 16 | "id": "{{ absolutePostUrl }}", 17 | "url": "{{ absolutePostUrl }}", 18 | "title": "{{ post.data.title }}", 19 | "content_html": {% if post.templateContent %}{{ post.templateContent | dump | safe }}{% else %}""{% endif %}, 20 | "date_published": "{{ post.date | rssDate }}" 21 | } 22 | {%- if not loop.last -%} 23 | , 24 | {%- endif -%} 25 | {%- endfor %} 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 moody-person 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/_includes/components/feed-atom.njk: -------------------------------------------------------------------------------- 1 | 2 |This is starter for eleventy ssg.
8 |It's built with nunjuks and sass also it has rollup config for your js
9 |For site serving you can use caddy, nginx 10 | or use vercel or netlify 11 |
12 |{{ post.data.description }}
15 | 37 |