All Projects → bymattlee → bymattlee-11ty-starter

bymattlee / bymattlee-11ty-starter

Licence: MIT license
A starter boilerplate powered by 11ty, Sanity, Gulp, Tailwind CSS, rollup.js, Alpine.js and Highway.

Programming Languages

javascript
184084 projects - #8 most used programming language
Nunjucks
165 projects
SCSS
7915 projects

Projects that are alternatives of or similar to bymattlee-11ty-starter

smol-11ty-starter
Extremely minimal Eleventy starter to kickstart a simple multi-page site / a nearly opinionless foundation to continue building on.
Stars: ✭ 61 (+125.93%)
Mutual labels:  eleventy, 11ty, 11ty-starter
fernfolio-11ty-template
The super simple portfolio template built with Eleventy and Netlify CMS
Stars: ✭ 64 (+137.04%)
Mutual labels:  eleventy, 11ty, 11ty-starter
rocket
The modern web setup for static sites with a sprinkle of JavaScript
Stars: ✭ 169 (+525.93%)
Mutual labels:  static-site-generator, rollup, eleventy
frontenso-11ty-starter
Production-ready 11ty+Gulp+Webpack Starter that features Nunjucks, SASS, TailwindCSS (with JIT complier), and ESNext.
Stars: ✭ 24 (-11.11%)
Mutual labels:  gulp, eleventy, 11ty
11ta-template
Deeply customizable, full-featured, ready to publish blog template built with 11ty, TailwindCSS, & Alpine.js
Stars: ✭ 98 (+262.96%)
Mutual labels:  alpine, 11ty, alpinejs
11tyby
Simple 11ty setup using TypeScript, SASS, Preact with partial hydration, and other useful things. Aims to provide the DX of Gatsby, but using 11ty!
Stars: ✭ 38 (+40.74%)
Mutual labels:  static-site-generator, eleventy, 11ty
eleventy-plugin-cloudinary
An Eleventy shortcode that allows you to add an image from your cloudinary account
Stars: ✭ 28 (+3.7%)
Mutual labels:  static-site-generator, eleventy, 11ty
alexcarpenter-11ty
📝 Source files for my personal website built with Eleventy and hosted with Netlify.
Stars: ✭ 89 (+229.63%)
Mutual labels:  eleventy, 11ty
ttall
Laravel fronend preset for TTALL stack - Tailwindcss | Turbolinks | Alpine.js | Laravel | Livewire 🚀
Stars: ✭ 50 (+85.19%)
Mutual labels:  alpine, alpinejs
11up
A utility to create an 11ty site scaffold from one of a number of site templates. Mostly just Phil Hawksworth's regular starting points
Stars: ✭ 25 (-7.41%)
Mutual labels:  eleventy, 11ty
Hugo theme pickles
Modern, Simple and beautiful Hugo theme
Stars: ✭ 168 (+522.22%)
Mutual labels:  gulp, static-site-generator
11r
America's favorite Eleventy blog template.
Stars: ✭ 135 (+400%)
Mutual labels:  rollup, eleventy
sass-starter-pack
Sass starter files using Gulp v4.0.0 🔥
Stars: ✭ 34 (+25.93%)
Mutual labels:  gulp, starter-files
Gulp Webpack Starter
Gulp Webpack Starter - fast static website builder. The starter uses gulp toolkit and webpack bundler. Download to get an awesome development experience!
Stars: ✭ 199 (+637.04%)
Mutual labels:  gulp, static-site-generator
Gulp Site Generator
A static site generator using Gulp
Stars: ✭ 183 (+577.78%)
Mutual labels:  gulp, static-site-generator
htmlrecipes
A collection of quick copy HTML snippets for a variety of common scenarios.
Stars: ✭ 113 (+318.52%)
Mutual labels:  eleventy, 11ty
Front End Tooling Recipes
Collection of pre-configured front-end tooling setups for common uses.
Stars: ✭ 176 (+551.85%)
Mutual labels:  gulp, rollup
11ty-tailwind-jit
Try editing some Tailwind in this repo while running in dev. It's SO FAST!
Stars: ✭ 17 (-37.04%)
Mutual labels:  eleventy, 11ty
eleventy bundler
NOT RECOMMENDED FOR USE; see README
Stars: ✭ 19 (-29.63%)
Mutual labels:  eleventy, 11ty
Gulp Hb
A sane Gulp plugin to compile Handlebars templates. Useful as a static site generator.
Stars: ✭ 145 (+437.04%)
Mutual labels:  gulp, static-site-generator

ByMattLee 11ty Starter Screenshot

ByMattLee 11ty Starter

A starter boilerplate powered by 11ty, Sanity, Gulp, Tailwind CSS, rollup.js, Alpine.js and Highway.

VIEW DEMO


Installation

1. Install Node >=14.17.0: https://nodejs.org/
2. Install Yarn
$ npm i -g yarn
3. Install all dependencies
$ yarn

Configuration

In config.js, update Sanity options and environment URLs for project compilation.


Use

Build Files For Development And Initialize Watch
$ yarn dev
Build Files For Staging
$ yarn stage
Build Files For Production
$ yarn prod

General Features

  • Features Gulp as the build pipeline that renders HTML, compiles styles and scripts, and optimizes assets.
  • Data is coming from the Sanity Cloud API. This pairs perfectly with the ByMattLee Sanity Studio Starter
  • Spins up a local development environment through Browsersync
  • Browser reload when NJK, JS, image, SVG or asset files are updated
  • Styles are injected when SCSS files are updated
Markup
  • Features 11ty as the static site generator
  • Markup is minified in staging and production environments
  • Site data can be set in src/site/_data
  • Pages in src/site will be compiled to dist
  • src/site/_includes/layouts/base.njk serves as the base template for the site
  • src/site/_includes/partials contains site partials and components that are reused across the site (modular HTML)
Styles
  • Features Tailwind CSS, a utility-first framework
  • Includes linter (Stylelint), autoprefixer, minification and sourcemap creation
  • SCSS files are located in src/assets/scss
  • main.scss in src/assets/scss serves as the base that includes the other dependent SASS files
  • main.scss gets compiled to dist/assets/css/main.min.css
  • .stylelintrc contains the settings for Stylelint
  • Info about class namespacing can be found in src/assets/scss/main.scss
  • Unused CSS (PurgeCSS) will be removed in staging and production builds
Scripts
  • Features rollup.js as the module bundler
  • Includes linting (ESLint), concatenation, minification and sourcemap creation
  • Includes Highway for seamless page transitions
  • Includes a custom framework for reuseable content animations
  • Includes Alpine.js for declarative DOM manipulation
  • main.js in src/assets/js serves as the main JS file that includes and runs all components and will be compiled to dist/assets/js/main.min.js
  • All local components should be placed in src/assets/js/components
  • All vendor JS can be manually added to src/assets/js/vendors if not found on Yarn
  • .eslintrc contains the settings for ESLint
Images
  • Place all unoptimized images in the src/assets/images directory
  • They will then be optimized and placed in dist/assets/images
  • Responsive images will be generated at the following widths (if larger): 200w, 400w, 600w, 800w, 1000w, 1200w, 1400w, 1600w, 1800w
  • Use imageSrc shortcode to render responsive srcset in markup
SVGS
  • Place all SVG files in the src/assets/svg directory
  • They will then be optimized and added to a sprite at dist/assets/svg/sprite.svg
Other Assets
  • All assets (fonts, videos, swfs, etc) under src/assets will be copied to dist/assets on build
Sitemap
  • Generates a sitemap based on the HTML files in dist
Robots.txt
  • Generates a robots.txt file
  • Configuration can be found in src/site/robots.njk

Tailwind CSS Notes

  • All Tailwind settings can be found in ./tailwind.config.js
  • Most styles should be written as utility classes in the template markup but custom SCSS can be used for unique properties and/or magic numbers
  • Utilize the @apply directive when writing custom SCSS for efficiency:
svg {
    @apply inline-block fill-current;
}
  • Tailwind settings can be accessed with the theme() function:
.button {
    animation-duration: theme('transitionDuration.normal');
}
  • Media queries can be used with the shorthand screen() function:
.button {
    margin-right: 2.8rem;
    @screen sm {
        margin-right: 4.2rem;
    }
}

Contact

  • Matt Lee - @bymattlee on most platforms
  • Visit my website at bymattlee.com

Twitter Follow

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].