EQ Works company website.
- Production: https://www.eqworks.com
- Staging deployment preview: https://eqworks.github.io/
- Accounts Holder: creativestudio@eqworks.com
There is a "blog" aspect to this website, where we post Press Releases, Case Studies, Insights, and more. To do that, we are using the Headless CMS platform Contentful. We create the content on Contentful and then leverage Contentful's Content Delivery API to request and render that content. Byebye WordPress 👋
Whenever new content on Contentful is either published or unpublished, this will send out a webhook to this repository (see the deploy-to-production workflow file) that will trigger a rebuild of the website. This allows for the website to remain static while maintaining access to the latest content from Contentful. The GitHub account authenticating the GitHub webhook is the CreativeStudioEQ account.
You can visit this Google Drive folder to learn about how to add content through Contentful.
This website uses the Next.js framework.
- Ensure your environment has Git, Node.js (use the version recommended by
.nvmrc
, ideally through nvm), and npm installed. - Clone repository, run
git clone https://github.com/EQWorks/eqworks.github.io.git
. - Install dependencies, run
npm i
. - Start the website in development mode, run
npm run dev
. - View the website at http://localhost:3000.
- Update the
origin/main
reference, rungit fetch --prune && git pull
. - Checkout to a
<feature-branch>
(this is where you can make your changes), rungit checkout -b <feature-branch>
. - Once your
<feature-branch>
is ready to be added to the website, open a pull request (PR) to merge your<feature-branch>
into themain
branch. - Upon review (ideally by other team members) and merge, it will trigger a staging build, you can monitor the status in the repo's Actions tab.
- Verify the staging deployment is working.
- Make a release by filling in
Tag version
with the convetion ofvX.Y.Z
whereX.Y.Z
may follow the [semantic versioning] practice. This will trigger a production build (through Netlify), and generate a release notes based on commit messages automatically. - Rinse and repeat!
To achieve a high level of quality and maintain consistency throughout, we adhere to the guidelines laid out in this section.
We are committed to comply with WCAG 2.1 level AA. We will be using this WCAG 2.1 quick reference guide set to level AA compliancy as our auditing guide for design and development iterations.
All code must format to the Prettier configuration file.
- Check code format, run
npm run lint
. - Format code to Prettier configuration, run
npm run lint:format
.
Order element attributes alphabetically. For example:
<Smile aria-label='smiley face' role='img' />
This website uses WebP as the image format for better compression and sending less down the wire to clients. We do keep a "fallback" file of every image to ensure maximum browser compatibility. See the ImgWebP
component located in /components/shared/img-webp.js
for how it works.
To convert any image type (.png
, .jpg
, etc.) to the .webp
format, you can do the following (or follow this tutorial):
- Install the webp CLI, run
brew install webp
. - Convert the images you want:
- Update one image, run
cwebp -q 75 image.png -o image.webp
- The
-q 75
flag refers toquality of 75%
. Meaning the image will be reduced by 25% in "perceivable" quality.
- The
- Update all images of same extension in a directory, run
find ./ -type f -name '*.png' -exec sh -c 'cwebp -q 75 $1 -o "${1%.png}.webp"' _ {} \;
.- Change
.png
in both instances to any other image format (e.g..jpg
).
- Change
For questions or others, start a thread in the #infrastructure
channel on Slack to get help or a discussion going.