- 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 + C
will 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/_images
are automatically copied to the webroot/images
directory. - All files in
/src/_articles
are automatically copied to the webroot/articles
directory. /src/_styles/articles.css
is automatically copied to/styles/articles.css
.- The CNAME file at
/src/CNAME
is automatically copied to./CNAME
. - All
.svg
files in/src/_icons
are automatically copied to the webroot/icons
directory. - There are currently no scripts on the site, but anything added to a
/src/_scripts
directory will automatically be copied to the webroot/scripts
directory.
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 build
will compile the scss and njk files to CSS and HTML into the/docs
directory in the root of the project.git commit
will commit the latest changes to the github repository.- Github watches the master branch's
/docs
directory 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/CNAME
tells Github pages to use eightshapes.com as the domain for the site.