-
Notifications
You must be signed in to change notification settings - Fork 305
Workflow (Netlify CMS)
Content on digital.gov can be added/edited in a visual editor using the digital.gov Workflow tool. This is built as an implementation of Netlify CMS with authentication managed by Cloud.gov.
Netlify CMS is an open source content management system used by digital.gov to provide editors with a friendly UI and intuitive workflow.
Learn more about Netlify CMS:
The following actions can be taken within the Netlify CMS UI when adding or updating content:
Save
- Creates/updates a pull request in GitHub
Delete unpublished entry
- Removes pull request from GitHub
Set status
-
Draft
- Adds thenetlify-cms/draft
tag to the open pull request and move the entry to the corresponding workflow column in the UI -
In review
- Adds thenetlify-cms/pending_review
tag to the open pull request and move the entry to the corresponding workflow column in the UI -
Ready
- Adds thenetlify-cms/pending_publish
tag to the open pull request and move the entry to the corresponding workflow column in the UI
Preview
- Provides a link to the Federalist/live preview
All files related to the Netlify CMS can be found in the themes/digital.gov/static/workflow folder. Within that folder there are several important files:
-
config.yml
- this contains all of the global and collection-specific configuration options. Refer to the Netlify CMS docs for more information on what the various options control. -
styles.css
- this stylesheet has a handful of visual customizations that could not be achieved withconfig.yml
-
index.html
- this is the main entry point for the CMS, it imports Netlify CMS via script. It also contains several event listeners that:- Adds the
slug
value to the generated markdown file (Netlify CMS does not do this out of the box) - Integrates custom Hugo shortcode widgets for use with the Netlify CMS markdown editor. The configuration files for each shortcode widget can be found in the
js/editorComponents
folder.
- Adds the
This page has a good overview of the different configuration options: https://www.netlifycms.org/docs/add-to-your-site/ For Netlify CMS support/questions, check out their community page: https://www.netlifycms.org/community/
Our Netlify CMS config uses the async-select
custom widget to display the Topic tags. Documentation for this package can be found at: https://github.com/chrisboustead/netlify-cms-widget-async-select.
The package is imported into the Workflow tool index.html
file and the custom widget is declared in the same file.
🎉Questions? Email digitalgov@gsa.gov