This repo includes code for the COIL website. coil.census.gov
It is built with Jekyll using the uswds-jekyll theme
- Ruby v3.1.3
- Node v4.2.3+
- gulp (
npm i -g gulp)
- gulp (
- Bundler v2.3.18+
- jekyll (
gem install jekyll)
- jekyll (
- Chrome v59 or higher (v60 if on Windows)
We recommend using a universal verion manager such as asdf
NOTE: Ensure that legacy_version_file = yes has been added to your .asdfrc file in your home directory. Requires terminal restart.
To work on the site, first clone the repository. After switching to your local copy of the repository in terminal, run the following command to install project dependencies:
npm run setupOptionally, you can run the following (the above command compiles the following scripts):
npm installbundle installnpm update uswdsnpm run uswds-copy-assetsnpm run uswds-build-sassNow that all of your dependencies are installed, run:
npm run watch- This runs a series of commands that watches for any changes in both USWDS node module and the root level asset folders in this repo.
Finally, start your local server by running the following command:
npm run servenpm run serveornpm start -- --incremental: Runs your local server with incremental regeneration enabled to greatly improve build time. Use instead ofnpm start.
Go to 127.0.0.1:4000 in your browser — you should be viewing a local instance
- Change the coil_people.yml file to reflect current team
- Add both .png/.jpg and .webp files to the assets/img/team folder
- The .webp file needs to have a size of 214x271
Note that the USWDS assets are git-tracked to make builds for Github Pages easier. Otherwise custom build actions are needed to compile the USWDS styles before each deployment. Any additional USWDS updates will need to be recompiled and committed to ensure changes are properly deployed.
run npm run html-proofer to validate the site's HTML, check broken links, missing images & alts, etc with HTMLProofer.
run npm run html-proofer:skip-external to save time by skipping validating external links
This repository is hooked up to Pages, an automatic build process used by many government websites.
Whenever you push changes to Github, Pages will make a new build (using the federalist command in package.json).
Pages will then provide a URL for this build which you can use for user testing. To get the URL for the build, click on the green check-mark next to the build status for whatever branch you just pushed to, and then click the "Details" link.
When you merge a branch into main, Pages will then make a new build with the same process and deploy it to opportunity.census.gov
If Pages fails to build, the status dot on the branch in Github will change from yellow (in progress) to red (failed). If this happens, contact Luke Keller via Slack in the Census Bureau workspace to see the logs from the failed build. He has access to Pages itself. We do not.