Skip to content

Commit

Permalink
start-cg-fork
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura Gerhardt committed Feb 4, 2020
0 parents commit 91378f8
Show file tree
Hide file tree
Showing 43 changed files with 3,801 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.6-node-browsers-legacy
steps:
- checkout
- restore_cache:
keys:
- v2-npm-{{ checksum "package-lock.json" }}
- v2-npm-
- run: npm install
- save_cache:
key: v2-npm-{{ checksum "package-lock.json" }}
paths:
- node_modules
- restore_cache:
keys:
- v2-bundle-{{ checksum "Gemfile.lock" }}
- v2-bundle-
- run: bundle install --path vendor/bundle
- save_cache:
key: v2-bundle-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run: npm run build
- run: npm run test


workflows:
version: 2
commit:
jobs:
- build
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock.json binary
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_site
.sass-cache
.jekyll-metadata
node_modules
.bundle
.jekyll-cache/
11 changes: 11 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
layout: default
---


<div class="grid-row grid-gap">
<div class="usa-layout-docs-main_content desktop:grid-col-9 usa-prose">
<h1>>Page not found</strong></h1>
<p>The requested page could not be found (404).</p>
</div>
</div>
34 changes: 34 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ruby '>= 2.5.7'

source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8"

# See https://github.com/envygeeks/jekyll-assets/issues/622
gem "sprockets", "~> 3.7"

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem 'jekyll-redirect-from'
gem 'jekyll-paginate-v2', "2.0"
gem 'jekyll-sitemap'
gem 'jekyll-seo-tag'
gem "jekyll-assets", "~> 3.0", group: :jekyll_plugins
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?

gem "html-proofer", "~> 3.10"
136 changes: 136 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
eventmachine (1.2.7)
execjs (2.7.0)
extras (0.3.0)
forwardable-extended (~> 2.5)
fastimage (2.1.7)
ffi (1.12.2)
forwardable-extended (2.6.0)
html-proofer (3.15.1)
addressable (~> 2.3)
mercenary (~> 0.3)
nokogumbo (~> 2.0)
parallel (~> 1.3)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.6)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-assets (3.0.12)
activesupport (~> 5.0)
execjs (~> 2.7)
extras (~> 0.2)
fastimage (~> 2.0, >= 1.8)
jekyll (>= 3.5, < 4.0)
jekyll-sanity (~> 1.2)
liquid-tag-parser (~> 1.0)
nokogiri (~> 1.8)
pathutil (~> 0.16)
sprockets (>= 3.3, < 4.1.beta)
jekyll-feed (0.13.0)
jekyll (>= 3.7, < 5.0)
jekyll-paginate-v2 (2.0.0)
jekyll (~> 3.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sanity (1.2.0)
jekyll (~> 3.1)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.3)
liquid-tag-parser (1.9.0)
extras (~> 0.3)
liquid (>= 3.0, < 5.0)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.4.0)
minitest (5.14.0)
nokogiri (1.10.7)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.2)
nokogiri (~> 1.8, >= 1.8.4)
parallel (1.19.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.3)
rack (2.1.2)
rainbow (3.0.0)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.15.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
thread_safe (0.3.6)
typhoeus (1.3.1)
ethon (>= 0.9.0)
tzinfo (1.2.6)
thread_safe (~> 0.1)
yell (2.2.1)

PLATFORMS
ruby

DEPENDENCIES
html-proofer (~> 3.10)
jekyll (~> 3.8)
jekyll-assets (~> 3.0)
jekyll-feed (~> 0.6)
jekyll-paginate-v2 (= 2.0)
jekyll-redirect-from
jekyll-seo-tag
jekyll-sitemap
sprockets (~> 3.7)
tzinfo-data

RUBY VERSION
ruby 2.6.5p114

BUNDLED WITH
2.1.4
152 changes: 152 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<!--
Federalist recommends you use Continuous Integration to automatically test
and validate any new changes to your site. CircleCI is free for open source
projcets. You should replace this badge with your own.
https://circleci.com/
-->
[![CircleCI](https://circleci.com/gh/18F/federalist-uswds-jekyll.svg?style=svg)](https://circleci.com/gh/18F/federalist-uswds-jekyll)

# Federalist + U.S. Web Design System + Jekyll

This [Jekyll theme](https://jekyllrb.com/docs/themes/) is developed using the [U.S. Web Design System v 2.0](https://v2.designsystem.digital.gov) and is focused on providing developers a starter kit and reference implementation for Federalist websites.

This code uses the [Jekyll](https://jekyllrb.com) site engine and built with Ruby. If you prefer to use Javascript, check out [federalist-uswds-gatsby](https://github.com/18F/federalist-uswds-gatsby), which uses [Gatsby](https://gatsbyjs.org) site engine.

This project assumes that you are comfortable editing source code. If you prefer to launch a website without editing any source code, checkout [uswds-jekyll](https://github.com/18F/uswds-jekyll), which allows you to change the layout and content with configuration files.

This project strives to be compliant with requirements set by [21st Century IDEA Act](https://www.meritalk.com/articles/senate-passes-idea-act/). The standards require that a website or digital service:

- is accessible to individuals with disabilities;
- has a consistent appearance;
- does not duplicate any legacy websites (the legislation also requires agencies to ensure that legacy websites are regularly reviewed, removed, and consolidated);
- has a search function;
- uses an industry standard secure connection;
- “is designed around user needs with data-driven analysis influencing management and development decisions, using qualitative and quantitative data to determine user goals, needs, and behaviors, and continually test the website, web-based form, web-based application, or digital service to ensure that user needs are addressed;”
- allows for user customization; and
- is mobile-friendly.

## Key Functionality
This repository contains the following examples and functionality:

✅ Publish blog posts, press releases, announcements, etc. To modify this code, check out `blog/index.html`, which manages how the posts are listed. You should then check out `_layouts/post.html` to see how individual posts are structured.

✅ Publish single one-off pages. Instead of creating lots of folders throughout the root directory, you should put single pages in `_pages` folder and change the `permalink` at the top of each page. Use sub-folders only when you really need to.

✅ Publish data (for example: job listings, links, references), you can use the template `_layouts/data.html`. Just create a file in you `_pages` folder with the following options:

```
---
title: Collections Page
layout: data
permalink: /collections
datafile: collections
---
```

The reference to `datafile` referers to the name of the file in `_data/collections.yml` and loops through the values. Feel free to modify this as needed.

✅ There are two different kinds of `pages`, one does not have a side bar navigation, and the other uses `_includes/sidenav.html`. You can enable this option by adding `sidenav: true` to your page front matter.

```
---
title: Document with Sidenav
layout: page
sidenav: true
permalink: /document-with-sidenav
---
```

✅ Enable search with [Search.gov](https://search.gov) by adding option to `_config.yml`.


```
---
searchgov:
endpoint: https://search.usa.gov # You should not change this.
affiliate: federalist-uswds-example # replace this with your search.gov account
access_key: your-access-key # This is placeholder. Not private.
inline: true #this renders the results on the same domain. Otherwise, it will render the results in the search.gov domain
---
```


## How to edit
- Non-developers should focus on editing markdown content in the `_posts` and `_pages` folder

- We try to keep configuration options to a minimum so you can easily change functionality. You should review `_config.yml` to see the options that are available to you. There are a few values on top that you **need** to change. They refer to the agency name and contact information. The rest of `_config.yml` has a range of more advanced options.

- The contents inside `assets/` folder store your Javascript, SCSS/CSS, images, and other media assets are managed by [jekyll-assets](https://github.com/envygeeks/jekyll-assets). Assets are combined, compressed, and automatically available in your theme

- If you look at `package.json` you will see that the `npm run federalist` command that will run when running on the Federalist platform.

- 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 edit the look and feel of the site, you need to edit files in `_includes/` folder, which render key components, like the menu, side navigation, and logos.

- `index.html` may not require much editing, depending on how you customize `hero.html` and `highlights.html`.

- `_layouts/` may require the least amount of editing of all the files since they are primarily responsible for printing the content.

- `blog/index.html` can be edited, but be careful. It will impact the pagination system for the posts. If you do edit the file, be prepared to edit `_config.yml`. For example, you may need go change configurations for [jekyll-paginate-v2](https://github.com/sverrirs/jekyll-paginate-v2)

- `search/index.html` is used by search.gov.

## Getting Started

### Installation as a starter

#### With `npx`
The simplest way to create your own repository based on this starter is to use `npx` (included with `node`) with `degit`.

$ npx degit https://github.com/18F/federalist-uswds-jekyll <destination-folder>
$ cd <destination-folder>
$ git init

#### With `git`
$ git clone --depth 1 https://github.com/18F/federalist-uswds-jekyll <destination-folder>
$ cd <destination-folder>
$ npm run reset
$ git init

### Installation for development

$ git clone https://github.com/18F/federalist-uswds-jekyll
$ cd federalist-uswds-jekyll

Note that when built by Federalist, `npm run federalist` is used instead of the
`build` script.

### Install dependencies and run app
$ npm install
$ bundle install
$ npm start

Open your web browser to [localhost:4000](http://localhost:4000/) to view your
site.

### Testing
$ npm test

## Technologies you should be familiarize yourself with

- [Jekyll](https://jekyllrb.com/docs/) - The primary site engine that builds your code and content.
- [Front Matter](https://jekyllrb.com/docs/frontmatter) - 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 v 2.0](https://v2.designsystem.digital.gov)


## Contributing

See [CONTRIBUTING](CONTRIBUTING.md) for additional information.

## Public domain

This project is in the worldwide [public domain](LICENSE.md). As stated in [CONTRIBUTING](CONTRIBUTING.md):

> 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](https://creativecommons.org/publicdomain/zero/1.0/).
>
> 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.
Loading

0 comments on commit 91378f8

Please sign in to comment.