Skip to content
/ eleventy-base Public template

A simple site generator using 11ty. Includes JS modules, SCSS processing, and Netlify deployment

Notifications You must be signed in to change notification settings

enatario/eleventy-base

Repository files navigation

Eleventy base

A foundational static site generator using 11ty.

Includes:

  • SCSS
  • Javascript modules
  • CSS and JS linting
  • Netlify deployment

Pre-requisites

Setup

  • Use this template to generate a version in your own Github repo, or clone this locally and manually add to your remote repo.
  • Run yarn

Run locally

  • Run npm start
  • View your project onlocalhost:8080

Where stuff lives

  • Work in the src folder unless you need to adjust development configurations in .eleventy.js package.json or any other root file.
  • SCSS lives in the css folder and processes to app.css in the dist folder.
  • JS lives in the js folder and processes to app.js in the dist folder.
  • The static folder is for images, fonts, and other media.
  • index.njk is your root page. You can add other partials to this. And make sub-pages. Read up on Nunjucks and 11ty collections.
  • Data can be passed to njk files and is stored in the _data folder. Currently the only file there is metadata.json that is being passed into the head in _includes/layouts/base.njk.
    • Read up on frontmatter to pass data to your templates within each page.

Build

  • Run npm run build
  • All build files should end up in the dist folder

Deploy

Deploy to Netlify using this template or manually connect to your Netlify account with the repository you've set up. The configuration lives in netlify.toml and you can make it fancier if you like.

Deploy to Netlify

About

A simple site generator using 11ty. Includes JS modules, SCSS processing, and Netlify deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published