Skip to content

esharri2/EvEleventy

Repository files navigation

EvEleventy - An Eleventy Starter

This is an Eleventy starter project. It was made for me, Evan, but you might find it handy too. It uses Liquid templates, TailwindCSS, and Rollup.js + PostCSS for bundling.

Features

Commands

To start in development/watch mode: npm start. Changes to Liquid, JavaScript, and CSS will trigger a build + page reload.

Build: npm run build

CSS

This starter uses TailwindCSS. The CSS file is generated by the Rollup.js PostCSS plugin.

The Tailwind config has some basic customizations I like to use in projects, like a custom sizing system and Material-style shadows.

Dark mode

Uses dark mode based on prefers-color-scheme and can also be manually switched with color-switch.liquid. User's choice pesists in local storage, superceding prefers-color-scheme.

Fonts

Fonts are included in /fonts. Fonts load via "Unceremonious @font-face" and the "display" font is preloaded to reduce FOUT.

Icons

_includes contains the Dripicons icon set. I'm using eleventy-plugin-svg-contents to easily render the icons inline.

Images

eleventy-image generates multiple sizes of jpeg, webp, and avif for everything in /images. Use the picture shortcode to create a <picture> element that serves up the right image format based on browser support.

JavaScript

Rollup.js is used to bundle everything in /scripts.

Navigation

Set up the site navigation in _data/navigation.json and footer navigation in _data/navigation_footer.json

Pages

Pages includes a blog page with pagination already set up.

Partials

_includes contains partials for some common components and elements.

Production optimization

HTML, CSS, and JS minification happens during a production build.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published