- Install NPM before attempting to run the dev environment locally. Go to https://nodejs.org/en/ and install the "LTS" version using the instructions there.
Running the dev environment locally requires Node 8.11.0 or higher and npm 6.3.0 or higher
- clone this repo
npm install- you may encounter warnings, they're safe to ignorenpm start
ctrl + Cwill stop the build and server processes from running.
Nunjucks (.njk) files in the /src directory comprise the site. Each .njk file is compiled to HTML by 11ty. To edit site content or markup, run the dev environment locally (npm start) and make changes to the .njk files.
Styles for the entire site are found in /src/_styles/escom.scss. Make changes to this scss file and the build tooling will automatically recompile the scss to css. Autoprefixer is also enabled on the scss build toolchain.
- All files in
/src/_imagesare automatically copied to the webroot/imagesdirectory. - All files in
/src/_articlesare automatically copied to the webroot/articlesdirectory. /src/_styles/articles.cssis automatically copied to/styles/articles.css.- The CNAME file at
/src/CNAMEis automatically copied to./CNAME. - All
.svgfiles in/src/_iconsare automatically copied to the webroot/iconsdirectory. - There are currently no scripts on the site, but anything added to a
/src/_scriptsdirectory will automatically be copied to the webroot/scriptsdirectory.
the file ./eleventy.js at the root of the project contains all the configuration for nunjucks compilation and asset pass through copying.
A custom script at ./build-tasks/compile-sass.js is responsible running the scss compiler and the autoprefixer plugin. An npm watch script uses a dependency called chokidar to monitor the escom.scss file for changes and invoke the build script whenever the file is changed.
npm run buildwill compile the scss and njk files to CSS and HTML into the/docsdirectory in the root of the project.git commitwill commit the latest changes to the github repository.- Github watches the master branch's
/docsdirectory for changes. As soon as changes are committed to that directory, Github will automatically deploy changes to eightshapes.com
The base layout at src/_layouts/base.njk includes a Google Analytics snippet from src/_includes/_google_analytics.html at the bottom of every page.
If you've committed changes to the master branch's /docs directory but still don't see your changes on eightshapes.com:
- Check the status of the repo's Github Pages settings and make sure it says it's deployed the latest.
- Check Github's status page and make sure there are no issues related to "Github Pages Builds"
- DNS Hosting is located at DNSimple. This DNS hosting is what points "eightshapes.com" to the github pages server.
- The CNAME file in
/src/CNAMEtells Github pages to use eightshapes.com as the domain for the site.