All Projects → GSA → digitalgov.gov

GSA / digitalgov.gov

Licence: other
Digital.gov — Helping the government community deliver better digital services.

Programming Languages

HTML
75241 projects
SCSS
7915 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to digitalgov.gov

plainlanguage.gov
A resource to help federal employees write in plain language and comply with the Plain Writing Act of 2010
Stars: ✭ 111 (-33.53%)
Mutual labels:  government, policy, civic-tech
311
New web portal for BOS:311
Stars: ✭ 15 (-91.02%)
Mutual labels:  government, civic-tech
ACCESS-NYC
Find help in NYC with food, money, housing, work, and more on ACCESS NYC. Maintained by @NYCOpportunity
Stars: ✭ 27 (-83.83%)
Mutual labels:  government, civic-tech
code-gov
An informative repo for all Code.gov repos
Stars: ✭ 101 (-39.52%)
Mutual labels:  government, civic-tech
datree
Prevent Kubernetes misconfigurations from reaching production (again 😤 )! From code to cloud, Datree provides an E2E policy enforcement solution to run automatic checks for rule violations. See our docs: https://hub.datree.io
Stars: ✭ 5,744 (+3339.52%)
Mutual labels:  best-practices, policy
Forms
Tracking our progress moving all city paper and pdf forms online.
Stars: ✭ 14 (-91.62%)
Mutual labels:  government, civic-tech
Terraform
Share Terraform best practices and custom modules with the community
Stars: ✭ 39 (-76.65%)
Mutual labels:  best-practices, policy
Design System
Open source design and front-end development resources for creating Section 508 compliant, responsive, and consistent websites.
Stars: ✭ 192 (+14.97%)
Mutual labels:  government, civic-tech
Welcome
Information on joining the government community — a collaborative community for sharing best practices in furtherance of open source, open data, and open government efforts.
Stars: ✭ 143 (-14.37%)
Mutual labels:  government, best-practices
Decidim
The participatory democracy framework. A generator and multiple gems made with Ruby on Rails
Stars: ✭ 894 (+435.33%)
Mutual labels:  government, civic-tech
open-source-logiciel-libre
Open Source Software Requirements and Guidance (Draft) - Exigences et guides liés aux logiciels libres (Ébauche)
Stars: ✭ 31 (-81.44%)
Mutual labels:  government, policy
CityScoreToolkit
Open-source version of Boston's CityScore performance dashboard
Stars: ✭ 42 (-74.85%)
Mutual labels:  government, civic-tech
Covid Policy Tracker
Systematic dataset of Covid-19 policy, from Oxford University
Stars: ✭ 373 (+123.35%)
Mutual labels:  government, policy
guides.etalab.gouv.fr
Les guides d'Etalab : bonnes pratiques relatives aux données, algorithmes et codes sources
Stars: ✭ 18 (-89.22%)
Mutual labels:  government, best-practices
digital
Public documentation and wiki for DoIT’s Digital team. Monorepo for new services.
Stars: ✭ 17 (-89.82%)
Mutual labels:  government, civic-tech
a star on grids
Best practices for implementing A* with a focus on four- and eight-connected grid worlds.
Stars: ✭ 23 (-86.23%)
Mutual labels:  best-practices
bce.design
minimal magic, minimal tooling, essential dependencies, high productivity, no transpilations and no migrations. The Web Components starter ships with integrated lit-html, redux-toolkit and vaadin router components.
Stars: ✭ 67 (-59.88%)
Mutual labels:  best-practices
lightning-hydra-template
PyTorch Lightning + Hydra. A very user-friendly template for rapid and reproducible ML experimentation with best practices. ⚡🔥⚡
Stars: ✭ 1,905 (+1040.72%)
Mutual labels:  best-practices
best-practices
Random best practice from internet belong here.
Stars: ✭ 883 (+428.74%)
Mutual labels:  best-practices
meshery.io
Site for Meshery, the cloud native management plane
Stars: ✭ 135 (-19.16%)
Mutual labels:  best-practices

Digital.gov Logo

We help people in government build better digital services

https://digital.gov

Want to learn more about how we work? Check out our Wiki page »


Repositories

As a product, digital.gov maintains a collection of repositories. All of our work is open source and we encourage you to take a look at and contribute to our projects by submitting a Pull Request, a Github Issue, or commenting on existing Issues and Pull Requests.

The repositories below are all used to maintain digital.gov:

Platform
Project Description
GSA/digitalgov.gov (This repo) Site platform currently deployed as a static site built with Hugo and hosted by Federalist and Cloud.gov.
18F/dns DNS configuration for digital.gov domains managed by GSA TTS.
uswds/uswds This site is developed using the U.S. Web Design System v2, managed by GSA TTS.
Tools - projects we have created in order to better aid our work on the digital.gov platform.
Project Description
GSA/digital.gov-design A collection of design assets used for the digital.gov platform.
GSA/digitalgov-workflow A tool for managing the digital.gov editorial workflow on GitHub.
GSA/redir A basic Jekyll template to use for temporary redirects.

Development Guide

Technologies you should be familiarize yourself with

  • Hugo - The primary site engine that builds digital.gov code and content.
  • Front Matter - The top of each page/post includes keywords within --- tags. This is meta data that helps Hugo build the site, but you can also use it to pass custom variables.
  • U.S. Web Design System v 2.0 - the design system used in digital.gov.
  • Gulp - the asset pipeline.

Installation

Prerequisites

Install Gulp globally from your terminal command line:

npm install gulp-cli -g

To use Gulp, you must have Node and NPM installed. We're currently using Node v14. A recommended way of changing your Node version is to use a node version manager tool like n to quickly change between node versions.

NPM is package along with Node. Check your versions of these in your terminal command line by typing:

node -v
npm -v

Using Homebrew is a quick and easy way to install Hugo. Install Homebrew before getting started.

Install Hugo 0.92.0

Read the HUGO quickstart guide »

For OSX: brew install hugo see https://gohugo.io/getting-started/installing/ for other OSs

Quickly check your Hugo version at your terminal command line by running:

hugo version

Note: Digital.gov currently uses Hugo version 0.92.0. This is noted in our .hugo-version file. If Hugo has released a new version, but digital.gov hasn't been upgraded to that version, you may get errors when building locally. It is possible to use Homebrew to download a previous version of Hugo. To do that follow these instructions: Using Legacy Versions of the Hugo Static Site Generator

Setup

Once the prerequisites are installed, clone the repository to your local machine. Then navigate to the project folder in your terminal and run:

npm install

This will install all of the Node dependencies needed to run your Hugo environment. This may take a little while!

Local Development

Running the local development server is as simple as running:

npm start

NPM will run the following scripts:

  • gulp env — sets the environment variable to development (local builds only, not in Federalist)
  • gulp — builds and compresses all of the SCSS and JS files, and copies jquery and uswds js from node_modules and puts them in the /dist/ folder.
  • gulp Watch — starts a watch task to look for changes in the SCSS and JS files
  • hugo serve — builds all of the pages in hugo and creates a local server at http://localhost:1313/

When Hugo is done building, you should see a success message like:

Web Server is available at //localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

You may then view your local site in the browser at http://localhost:1313/.

Local development is powered by BrowserSync, to allow rapid development through:

  • A local development server at http://localhost:1313/.
  • Automatic CSS & JS updates without reloading the page
  • Automatic page reloads when content is changed

Configuration

Environment Variables

This project uses environment variables to handle uploading of images to AWS (powered by Gulp scripts).

In your command line terminal run cp env.example .env to create a template .env file in the root directory of the project.

Replace “[your key goes here]” in the .env file with your AWS key.

Asset Pipeline

NOTE: This is now included in the npm start command above

All style and image build tasks are handled by Gulp and are located in gulpfile.js. All parts of the build are configurable in discrete files (located in config/gulp) to make management easy.

Starting the gulp watch tasks to compile styles. This can be done in the terminal command line by running:

gulp

You would want to have the Hugo build running along with a gulp session in separate terminal sessions in order to compile and watch both content and style changes.

Tip: Use the keyboard shortcut control + c to stop the gulp watch process.

Images

Images found in content/images/inbox/ will be optimized and compressed and sent to an AWS S3 bucket for usage in your layouts and content. This is done by running the gulp img command. See the digital.gov wiki for how to process images.

Other helpful HUGO commands:

  • hugo build — builds all the pages in the site, without creating a server
  • hugo serve — builds all of the pages in hugo and creates a local server at http://localhost:1313/
  • hugo serve --templateMetricsHints — for seeing where you can apply caching in templates and speed up the build time See more in the Hugo docs »

Upgrading Hugo

  1. Read through the recent releases
  2. Run brew upgrade hugo to upgrade your local copy (docs).
  3. Set the version in the .hugo-version file. This is only used for telling Federalist which version of Hugo they should checkout and use.
  4. Update this README.md to show the current hugo version
  5. Update the version in `.circleci/config.yml to ensure that the same version of Hugo is being used for CI.

Accessibility tests

We follow the WCAG2AA standard, and one of the ways we check that we're following the right rules is through automated tools, like pa11y. For more info on the rules being tested checkout the pa11y wiki.

Running tests

To run a web accessibility test on digital.gov do the following:

  1. Check out the site from GitHub https://github.com/GSA/digitalgov.gov/
  2. Install and run the site locally following the Install and Run instructions above. Site must be running locally to perform the scan.
  • If this is your first time running pa11y, then you'll need to run npm install to make sure pa11ly is installed.
  1. In a separate terminal window, run npm run test:pa11y to initiate the accessibility checker.

Note: Currently, this only runs accessibility checks on the site home page as a Proof of Concept demonstration.

Accessibility testing configuration is located in the .pa11yci file.

Linters

To test the validity of API JSON files, run npm run lint:json in the terminal on your local machine. This will check the validity of the Hugo generated JSON files used for the API. Currently, it validates authors, images, and topics using the tool jsonlint. If an issue is found with the JSON, jsonlint will return a non-zero exit code causing CircleCI to fail. See the wiki API page for fixing API issues.

Markdown testing can be performed by running npm run lint:markdown. The rules that are used for the linter can be found in .markdown-lint.yml.

HTML linting can be performed by running 'npm run test:htmlproofer'. To have HTMLproofer ignore certain content see: https://github.com/gjtorikian/html-proofer#ignoring-content

Common Regex scripts

convert legacy-img to standard img

{{< legacy-img src="https://github.com/\d+/\d+/\d{2,4}[-x]+\d{2,4}[_-]*(.+?)\.[pngje]+"( alt=".+?")* >}}
{{< img src="$1"$2 >}}

convert CDN links

{{< legacy-img src="https://github.com/(\d{4,4})
{{< legacy-img src="$1

replace url with slug in posts

^url: .+/([^/]+)\.md
slug: $1
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].