A Coronavirus FAQ for the United States of America.
This website is developed using the U.S. Web Design System, is deployed on Federalist, search is provided by Search.gov, and analytics are provided by the Digital Analytics Program. This code uses the Jekyll site engine, and integrates Netlify CMS for a web editor interface.
You may want to familiarize yourself with:
- Jekyll - The primary site engine that builds your code and content.
- Front Matter - The top of each page/post includes keywords within
--
tags. This is meta data that helps Jekyll build the site, but you can also use it to pass custom variables. - U.S. Web Design System.
The _categories folder contains the question groups, or categories, which are displayed on the site. Its title
property is what is visible on the site.
In the _content folder you’ll find a folder which matches the name
property of a category for each category. Inside that folder is a file representing each question in that category, which has a category
property which also matches the category’s name
property.
For more detailed coverage, see the Content management guide.
On the index.html
you can add an urgent USWDS-style banner by changing the front matter. Turn the banner.display
key to true
to display the banner.
Content on this side is generated by our Content workflow & governance guide. To ensure we’re all using consistent voice and style, we also have Content strategy guidance.
Access the editor interface by navigating to faq.coronavirus.gov/admin and logging in with your GitHub credentials. You will need commit access to this repository in order to access the interface.
Adding an top questions icon - if you need to add an additional icon add it to the _assets/images/icons
directory and then add it as an option in Netlify CMS configuration in admin/config:collections[0]files[0]fields-Image icon.options
.
And then if you'd like to use in a top question - add it in the _data/homepage_promotion.yml
or update it through Netlify CMS.
The easiest way to get started locally, after the repository is forked, is to use Docker. After Docker is installed and running, run:
docker-compose build
docker-compose up
This will build and install all required dependencies, then compile the site, and finally start a development server which is accessible at localhost:4000. The server will recompile the site automatically as files change. Use CTRL + C to shutdown the server.
Do not edit files in the _site/
folder. These files are auto-generated, and any change you make in the folder will be overwritten.
To run without Docker, you’ll need the version of Ruby that’s specified in .ruby-version. Then, to install dependencies:
gem install bundler
bundle install
npm install
Finally, to start the site, run:
npm start
Open your web browser to localhost:4000 to view your site. The server will recompile the site automatically as files change. Use CTRL + C to shutdown the server.
Tests are automatically run on commits and pull requests by CircleCI. They can be run manually:
npm test
The test suite includes:
- HTMLProofer, which looks for some basic accessibility issues, for broken links, and more. We’ve also extended it to check for well-formed links.
- jest, jest-puppeteer, and puppeteer for custom integration tests. See what’s tested in the test directory.
See SECURITY.
See CONTRIBUTING.
This project is in the worldwide public domain. As stated in CONTRIBUTING:
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.