GithubHelp home page GithubHelp logo

mxwg / skeleventy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from josephdyer/skeleventy

0.0 1.0 0.0 1.89 MB

A skeleton boilerplate built with Eleventy.

CSS 8.81% JavaScript 42.87% HTML 48.33%

skeleventy's Introduction

Netlify Status

Skeleventy

A skeleton boilerplate built with Eleventy and TailwindCSS. Check out Skeleventy!

Features

  • Build sites faster with the power of Eleventy, TailwindCSS and SCSS
  • Laravel Mix (Webpack) to watch, concatenate and compile styles and scripts
  • HTML minifier
  • Purgecss for removing unused CSS
  • ES6 support with Babel
  • SEO friendly pages (including Open Graph and Twitter meta)
  • Image lazyloading
  • A simple blog with categories and featured images

Requirements

Node >= v8.9.0

Installation

npm install

To start the development server (and Mix), run the npm run dev command in terminal. Eleventy has hot reloading baked in and will automatically watch your template files for changes. Mix will watch any changes to the JS and SCSS files.

Folder Structure

The site folder contains all the templates, partials and content - which Eleventy will parse into HTML for us.

Within our site folder, lives a globals folder. Here you'll find a site.json file - for general config stuff e.g site name, author, email, social media links etc.

You'll also find a navigation.json file, which we use to loop over in our nav partial to generate our navigation. There's also a helpers.js file, which just contains a simple environment helper.

Uncompiled SCSS and JS reside in the resources folder - as mentioned above, Mix will be watching these folders for any changes (you should restart the server when creating new partials/folders).

In development mode, Skeleventy will reference main.css for it's stylesheet. This will be pretty chunky in filesize (around 800KB!), due to the amount of Tailwind utility classes - but don't worry, Skeleventy has you covered!

Ready to deploy?

Type the npm run production command to minify scripts, styles and run Purgecss.

Purge will cross reference your templates/HTML with all those Tailwind classes and will remove any classes you haven't used - pretty cool huh?

Skeleventy will now reference main.min.css as the new stylesheet (annoyingly, Mix also minifies main.css as well - this bugs the hell out of me!).

Recommendations

Once you've had a tinker with Skeleventy and made something Awwwards worthy, jump over to Netlify and host your beautiful creation for free.

You can set up continuous deployment which will watch your repo and deploy when you've pushed new changes to it - Netlify will take care of all the heavy lifting for you.

Behold the true magic of a modern JAMstack workflow! :)

skeleventy's People

Contributors

josephdyer avatar

Watchers

James Cloos 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.