An Eleventy Starter Kit, my base for all new 11ty projects now with Tailwind.css
Based off Eleventastic (no external build, maintains manifest.json)
To install the necessary packages, run this command in the root folder of the site:
npm install
npm start
or npm run dev
for a development server and live reloadingnpm run build
to generate a production buildEach provides array of page objects matching filter
To use, add the following page data within template front matter data (can add to these):
---
page:
title: Beyond Wordpress
excerpt: The dawn of Wordpress began in 2003 and has since become widely adopted as “go to” website solution for any business wanting a CMS.
image: artwork/laptop.png
related: ['/articles/grass-roots']
---
Available filters:
{% collections.all | breadcrumb(page) %}
{% set children = collections.all | children(page) %}
{% set siblings = collections.all | siblings(page) }}
{% set related = collections.all | related(page) }}
{% set similar = collections.all | similar(page) }}
Note: could also use Tags to filter collections like Shopify
Each returns formatted url prefixed with any base url defined process.env.APP_URL
and suffixed with version param where applicable
{{ '/services' | url }}
{{ 'css/main.css' | asset }}
{{ 'logo.png' | image }}
Styling works with Tailwind CSS, see tailwind.config.js.
Additional Sass pipeline. The main index file is in src/assets/styles/main.scss. Import any SCSS code you want in there; it will be processed and optimized. The output is in public/assets/css/main.css.
Javascript can be written in ES6 syntax. The main index file is in src/assets/scripts/main.js. It will be transpiled to ES5 with babel, bundled together with webpack, and minified in production. The output is in public/assets/js/main.js