This website was generated with Eleventy, and uses Nunchuks as the template language. NOTE: If using WebStorm IDE, set the file type in the explorer to Handlebars.
##Creating Layouts and Pages ###Layouts
.njk
extension under _includes/layouts
.base.njk
- The base layout which includes the header, footer, and main content area.page.njk
- The basic layout for a web page. Extends base.njk
.post.njk
- Layout for a blog post.
###Pages
To create a new static website page, create a new Markdown file, either within an existing directory, or a new directory. At the top of the page, include the page title and the page.njk
layout:
---
title: Page Title
layout: layouts/page.njk
---
If the page.njk
template doesn't work for your page, create a new layout in the layouts folder.
##Run locally
git clone
.npm install
to install dependencies.npm run start
.##Development Scripts
npm run start
Run
npm run start
to start the project locally. This script will remove and re-create the_site
artifacts folder where the content is served from, run thepostcss:run
script and copy any necessary files to the_site
folder before starting the dev server usingeleventy --serve
.
npm run build
Run
npm run build
to build the project for production. Thebuild
script removes the_site
artifacts folder, runseleventy
, and checks the environment variable for a prod environment before it runspostcss
.
postcss:run
The
postcss:run
script runspostcss
on thestyles/style.css
file and publishes the minified file under the_site
artifacts directory. Thepostcss
configuration filepostcss.config.js
is located at the root of the project.
##Tailwind CSS This project uses Tailwind CSS as its style library.
Configuration is located in the root of the project at tailwind.config.js
.
The main stylesheet is located under styles/style.css
. This file is where the Tailwind includes are brought in. More information can be found in the Tailwind documentation.
The Tailwind configuration is configured to purge any un-used classes at build time. The purge
configuration is configured to search for any html
or js
files in the application. See the link above for more information.