The Bloom Works employee handbook, with our policies and norms.
This requires Docker to be installed and running
docker build -t bloom-works/handbook .
docker run -it --rm -p "8080:8080" bloom-works/handbook
This sets up the site with a consistent runtime environment, and requires Docker to be installed and running.
docker build -t bloom-works/handbook .
docker run -it --rm -p "8080:8080" -v "$PWD:/app" bloom-works/handbook bash
package.json
changes): npm install
npm run serve
From here, changes to files locally will rebuild the site.
This uses whatever NPM and Node version you have installed on your machine, and might use fewer system resources than the Docker install (i.e. better for lower powered machines). If something is not working using this setup, use the Docker version to see if the problem exists there.
package.json
changes): npm install
npm run serve
From here, changes to files will rebuild the site.
To add a new section to the site:
sections
folder (example: sections/my-new-section.md
)---
and between those two lines put:
layout: layouts/section
title: My New Section's Title
---
_data/table_of_contents.json
file in the desired order. For example, if you section is called super-important.md
, then you would add the "super-important"
(no .md
) into the _data/table_of_contents.json
.Feel free to look at any of the existing sections as a starting point.
If you need to embed an image in a Handbook page, put the image file in the /img
folder. The resulting URL pattern will be: /img/FILENAME.suffix
.
Run sh ./ci/linter.sh
npx stylelint --fix "**/*.css"
will perform a dry-run of fixing all errors and those errors will not be saved. Then npx eslint --ext .js --fix [file or directory here]
will fix and save all errors.If there are errors, npx eslint --ext .js --fix-dry-run [file or directory here]
will perform a dry-run of fixing all errors and those errors will not be saved. Then npx eslint --ext .js --fix [file or directory here]
will fix and save all errors.
djlint ./ -e .njk --profile=nunjucks
to only run djlint. Manually fix errors.We are using Playwright Tests to accomodate our testing needs for this project on destop and mobile.
npx playwright test
for the command line output or npx playwright test --ui
to open the tests in UI mode.We are using Cypress and Axe core as our testing framework and engine for our accessibility tests.
npx cypress run
for tests to execute in the command line. To execute tests in Cypress' UI window, run npx cypress open
and select E2E testing.helpUrl
containing a URL where more information on how to fix that particular error can be found. Additionally, you can visit the official axe-core rules github to view the different axe-core rule descriptions.cypress/screenshots
folder.Cypress is not installed
and that it cannot find the cypress file at /root/.cache/Cypress/12.17.1/Cypress
, this could be a permissions issue and you would run node_modules/.bin/cypress install
inside of the Docker container to install Cypress.