Git Product home page Git Product logo

skeleventy's Introduction

Netlify Status

An Eleventy starter skeleton

Skeleventy gives you a rock solid foundation to build fast and accessible static websites. View the demo site.

Features

  • A clean, minimal build pipeline with SCSS and Laravel Mix for compiling assets
  • Gorko, a smart little Sass-powered utility class generator
  • Purgecss to remove unused CSS
  • HTML minifier
  • Supports ES2017 JavaScript, with Babel compilation
  • SEO friendly page meta, including Open Graph and Twitter
  • Image lazy loading
  • Mobile navigation
  • XML Sitemap
  • Clean and simple blog, with categories and featured images

Getting started

Prerequisites

Node v10+

Installation

  1. Clone the repo git clone https://github.com/josephdyer/skeleventy.git
  2. cd into the project folder and run npm install
  3. Start the local development server by running npm run dev Tip: Eleventy has live reload baked in!

Folder structure

Eleventy

  • site/ contains all the global data, templates and content
  • utilities/ contains Eleventy helper filters and transforms
  • Each page should have it's own respective folder containing an index.md file
  • You can then choose the most appropriate layout for each page (or create more if you need to)
  • The navigation is powered by the official Eleventy navigation plugin

Assets

  • css/ for compiled CSS
  • js/ for compiled JavaScript
  • images/ contains our site's images, an SVG icon sprite and a folder for meta images (OG, Twitter etc)

The build pipeline

Laravel Mix gives us a nice API layer on top of Webpack. Skeleventy uses a simplistic set up, but you can take advantage of extending Mix with custom Webpack configurations, code splitting and plugins such as PostCSS, if you so wish.

You'll find the site's uncompiled SCSS and JS within resources/ where Mix will be watching these directories for any changes. Tip: it's best to always restart the server when creating any new partials or folders

SCSS

  • scss/ is structured into opinionated sub folders
  • The _config.scss file is where you can change the site's colours and the utility classes generated by Gorko
  • A typographic scale has already been set up using my personal favourite Major Third scale.
  • Tip: for more scales, check out Type Scale

Gorko

I decided to remove Tailwind in favour of Gorko, purely for its simplicity and maintainability (especially for newer developers). Not having too much to begin with and adding in what you need, will lead to a simpler, more maintainable codebase. Gorko lets you add a sprinkle of reusable utility classes to help keep your code DRY. Credit to Andy Bell for making this handy little tool

JavaScript

  • utilities/ contains any global utility/helper functions
  • modules/ contains your site's actual JavaScript, all kept neat and tidy within their respective modular subfolders
  • You can import these subfolders into main.js using import '@modules/example-module'
  • Tip: you can set up optional import aliases via the webpack.mix.js file

A note on responsive images

Skeleventy doesn't have responsive images baked in, the main reason being: it's best using CDN. Check out this tutorial on setting up Eleventy with Cloudinary.

skeleventy's People

Contributors

josephdyer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.