This is the source code for notalone.gov.
NotAlone is a static HTML/CSS/JS site. The site's pages are maintained in simple Markdown files, which are compiled into HTML by Jekyll.
The site navigation and lists of resources that appear on the /resources
page are maintained in easy-to-read YAML files (".yml") in the /_data
directory.
GitHub is our CMS for this project. Content editors have GitHub accounts, edit the Markdown and YAML files themselves, and preview the results on a github.io page. Pushes to the live server are, for now, handled by the development team.
The site's interactive features (the Crisis Service Locator, the Enforcement Map, and Search) are all JavaScript components, making Ajax (CORS) calls to external data sources. Search is powered by Beckley. The curated list of searchable resources is in /_data
.
We depend on a few Ruby gems:
gem install jekyll
gem install kramdown
gem install psych -- --enable-bundled-libyaml
To keep our code updating continuously as we edit, we use jekyll serve --watch --baseurl:""
. Markdown and YAML editing happens in the gh-pages
branch, so the preview page is automatically updated as we commit edits. The static compiled HTML is updated into the master
branch. To generate the static files and push them to master
, we run rake publish
. (See the Rakefile
in the root directory for details on how this works.)
Content and feature suggestions are welcome via GitHub Issues. Code contributions are welcome via pull request, although of course we cannot guarantee your changes will be included in the site.
To the extent possible under law,
18F
has waived all copyright and related or neighboring rights to this work.
This work is published from:
United States.