uswds-jekyll 1.4.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ef75b2d7d836bddafdb82b872209c91745294ca
4
- data.tar.gz: 93ea359defb24c65bddb2df65c4a734d6a5b8649
3
+ metadata.gz: ae501ffb083eb93864a6132568dfc1b9848a9169
4
+ data.tar.gz: b1bbb0f4841256ee976f9b29a6646fbb764a50b6
5
5
  SHA512:
6
- metadata.gz: 2a499c57a4ac50e9d768d5c5b77a18fbe5a502e9db01591ff400c36d222466677134ed58610306f68922e3591c5f4ae65231b41979367683345d61fdeffd4be5
7
- data.tar.gz: 225e549ef3286f9ca5267c2f2deea723bb41f58af30812d01d670ae5cda1570a8f57644bad92202c5cf6f4c761229a075f325539396e828e153d8df7eedf0c8c
6
+ metadata.gz: 2ea1f74b94ad343f8b617b12e840078647462ecaf619fe77174574ce224fbbeecc7728e384339cc1d15c2b1eaf7cc328dac9c7177361d6c612ac5585c4aa3c98
7
+ data.tar.gz: c9fd28ac2130efbc0c9ae8e0ecb84ab6318d6f86a96723ccf6dbd344ac3504d88b023db3d2a67814d648913b89d12c633b10ef4090e4e1422f60f60af0de6c8a
data/README.md CHANGED
@@ -27,9 +27,10 @@ This is a [Jekyll theme](https://jekyllrb.com/docs/themes/) for the
27
27
  - [Header](#header)
28
28
  - [Footer](#footer)
29
29
  1. [Layouts](#layouts)
30
- - [Base](#layout-base)
31
- - [Docs](#layout-docs)
32
- - [Landing](#layout-landing)
30
+ - [Default](#layout-default)
31
+ - [Page](#layout-page)
32
+ - [Home](#layout-home)
33
+ - [Post](#layout-post)
33
34
  - [Search results](#search-results)
34
35
 
35
36
 
@@ -40,7 +41,7 @@ This is a [Jekyll theme](https://jekyllrb.com/docs/themes/) for the
40
41
  like so:
41
42
 
42
43
  ```ruby
43
- gem 'uswds-jekyll', :git => 'https://github.com/18F/uswds-jekyll.git'
44
+ gem 'uswds-jekyll'
44
45
  ```
45
46
  1. Install the `jekyll_pages_api_search` by adding it to your `Gemfile`
46
47
  ```
@@ -119,13 +120,10 @@ To reference a specific version of this plugin:
119
120
  1. Visit the [releases page](https://github.com/18F/uswds-jekyll/releases) and
120
121
  decide which version you want to use.
121
122
 
122
- 1. Add or update the `:tag` argument for this gem in your `Gemfile` to the name
123
- of the release tag, e.g.
123
+ 1. Specify the version in your `Gemfile`.
124
124
 
125
125
  ```ruby
126
- gem 'uswds-jekyll', \
127
- :git => 'https://github.com/18F/uswds-jekyll.git', \
128
- :tag => 'v0.1.1'
126
+ gem 'uswds-jekyll', '1.4.1'
129
127
  ```
130
128
 
131
129
  ## Configuration
@@ -136,7 +134,7 @@ project's [data files](https://jekyllrb.com/docs/datafiles/). See
136
134
  this project's [data directory](_data) for reference configurations
137
135
  of each component.
138
136
 
139
- The [base layout](#layout-base) also provides a mechanism for
137
+ The [default layout](#layout-default) also provides a mechanism for
140
138
  automatically including [stylesheets](#stylesheets) and
141
139
  [scripts](#scripts) on a site-wide, layout-wide, and per-page
142
140
  basis. See [asset load order](#asset-load-order) for more
@@ -185,7 +183,7 @@ more info.
185
183
 
186
184
  ### Page subnavigation
187
185
 
188
- If you're using the [docs layout](#layout-docs), each page may declare its own
186
+ If you're using the [page layout](#layout-page), each page may declare its own
189
187
  side navigation and subnavigation in its [front matter]:
190
188
 
191
189
  ```md
@@ -240,7 +238,7 @@ redcarpet:
240
238
 
241
239
  Search uses the [Search results](#search-results) page layout.
242
240
 
243
- **Pro tip:** use [Jekyll front matter defaults](https://jekyllrb.com/docs/configuration/#front-matter-defaults) to hide directories from showing in search results.
241
+ **Pro tip:** use [Jekyll front matter defaults](https://jekyllrb.com/docs/configuration/#front-matter-defaults) to hide directories from showing in search results.
244
242
 
245
243
  ## Assets
246
244
 
@@ -388,15 +386,15 @@ your site by placing a file with the same name into your site's
388
386
  - To change how [stylesheets](#stylesheets) are loaded or
389
387
  referenced, you can create your own `_includes/styles.html`,
390
388
  which will subsequently change how stylesheets are loaded in all
391
- layouts that inherit from the USWDS [base layout](#layout-base).
389
+ layouts that inherit from the USWDS [default layout](#layout-default).
392
390
 
393
391
  - You can change how the side navigation is rendered (but not which
394
- data it receives) in the [docs layout](#layout-docs) by creating
392
+ data it receives) in the [page layout](#layout-page) by creating
395
393
  your own `_includes/sidenav.html`.
396
394
 
397
395
  - You can change how and whether the side navigation is displayed
398
- at all in the [docs layout](#layout-docs) by overriding
399
- `_layouts/docs.html`.
396
+ at all in the [page layout](#layout-page) by overriding
397
+ `_layouts/page.html`.
400
398
 
401
399
  ## Components
402
400
 
@@ -458,21 +456,21 @@ layout: name
458
456
  ---
459
457
  ```
460
458
 
461
- ### `layout: base`
459
+ ### `layout: default`
462
460
 
463
461
  This is the bare-bones Standards layout, which does all of the
464
462
  basic page scaffolding then drops the page content into the
465
463
  `<main>` element. All of the other layouts "inherit" this one and
466
464
  provide other features in the content block.
467
465
 
468
- The base layout provides a layout [front matter] hook to add
466
+ The default layout provides a layout [front matter] hook to add
469
467
  attributes to the `<main>` element. You can see how this works in
470
- the [docs layout](_layouts/docs.html#L3-L4).
468
+ the [page layout](_layouts/page.html#L3-L4).
471
469
 
472
470
 
473
- ### `layout: landing`
471
+ ### `layout: home`
474
472
 
475
- This layout implements the [landing page
473
+ This layout implements the [home page
476
474
  template](https://standards.usa.gov/page-templates/landing/), which
477
475
  accommodates the following [front matter]:
478
476
 
@@ -507,11 +505,11 @@ graphics:
507
505
  graphics_position: (before|after)
508
506
  ```
509
507
 
510
- Check out the YAML front matter in the [landing demo
511
- page](demo/landing.html) for an example of how to structure it.
508
+ Check out the YAML front matter in the [home demo
509
+ page](demo/home.html) for an example of how to structure it.
512
510
 
513
511
 
514
- ### `layout: docs`
512
+ ### `layout: page`
515
513
 
516
514
  This layout implements the [document page
517
515
  template](https://standards.usa.gov/page-templates/docs/), and
@@ -531,10 +529,14 @@ accommodates an optional side navigation. Supported [front matter]:
531
529
  `site.baseurl`** because this breaks hash links prefixed with
532
530
  `#`.
533
531
 
534
- See the [docs demo page](demo/docs.md) for an example of how this
532
+ See the [page demo page](demo/page.md) for an example of how this
535
533
  works, and see [_data/navigation.yml](_data/navigation.yml) for how
536
534
  to structure named navigation data for your site.
537
535
 
536
+ ### `layout: post`
537
+
538
+ This layout is identical to the layout `page` and is included to allow for easier site creation using `Jekyll new`.
539
+
538
540
  ### `layout: search-results`
539
541
 
540
542
  This layout is for search results and contains the `jekyll_pages_api_search_results`
@@ -29,23 +29,29 @@
29
29
  </div>
30
30
  {% endif %}
31
31
 
32
- {% if footer.contact %}
32
+ {% if footer.logos or footer.heading or footer.contact %}
33
33
  <div class="usa-footer-secondary_section">
34
34
  <div class="usa-grid">
35
35
  <div class="usa-footer-logo usa-width-one-half">
36
- {% for logo in footer.logos -%}
37
- {% if logo.url %}<a href="{{ logo.url }}">{% endif %}
38
- <img class="usa-footer-logo-img" src="{{ logo.src | relative_url }}" alt="{{ logo.alt }}"
39
- {% if logo.width %}width="{{ logo.width }}"{% endif %}
40
- {% if logo.height %}height="{{ logo.height }}"{% endif %}>
41
- {% if logo.url %}</a>{% endif %}
42
- {% endfor %}
36
+ {% if footer.logos %}
37
+ {% for logo in footer.logos -%}
38
+ {% if logo.url %}
39
+ <a href="{{ logo.url }}">
40
+ {% endif %}
41
+ <img class="usa-footer-logo-img" src="{{ logo.src | relative_url }}" alt="{{ logo.alt }}" {% if logo.width %}width="{{ logo.width }}"{% endif %} {% if logo.height %}height="{{ logo.height }}"{% endif %}>
42
+ {% if logo.url %}
43
+ </a>
44
+ {% endif %}
45
+ {% endfor %}
46
+ {% endif %}
47
+
43
48
  {% if footer.heading %}
44
49
  <h3 class="usa-footer-logo-heading">{{ footer.heading }}</h3>
45
50
  {% endif %}
46
51
  </div>
47
- <div class="usa-footer-contact-links usa-width-one-half">
48
52
 
53
+ {% if footer.contact %}
54
+ <div class="usa-footer-contact-links usa-width-one-half">
49
55
  {% assign contact_links = site.data.navigation[footer.contact.links] | default: footer.contact.links %}
50
56
  {% for _link in contact_links %}
51
57
  <a class="usa-link-{{ _link.type | default: 'generic' }}" href="{% if _link.external == true %}{{ _link.href }}{% else %}{{ _link.href | relative_url }}{% endif %}">
@@ -61,7 +67,7 @@
61
67
  {{ footer.contact.address | markdownify }}
62
68
  </address>
63
69
  {% endif %}
64
-
70
+ {% endif %}
65
71
  </div>
66
72
  </div>
67
73
  </div>
File without changes
@@ -1,5 +1,5 @@
1
1
  ---
2
- layout: base
2
+ layout: default
3
3
  ---
4
4
 
5
5
  {% assign hero = page.hero %}
@@ -1,5 +1,5 @@
1
1
  ---
2
- layout: base
2
+ layout: default
3
3
  main:
4
4
  class: usa-grid usa-section usa-content usa-layout-docs
5
5
  ---
@@ -0,0 +1,19 @@
1
+ ---
2
+ layout: default
3
+ main:
4
+ class: usa-grid usa-section usa-content usa-layout-docs
5
+ ---
6
+ {% assign sidenav = site.data.navigation[page.sidenav] | default: page.sidenav %}
7
+ {% if sidenav %}
8
+ <aside class="usa-width-one-fourth usa-layout-docs-sidenav">
9
+ {% include sidenav.html links=sidenav %}
10
+ </aside>
11
+
12
+ <div class="usa-width-three-fourths usa-layout-docs-main_content">
13
+ {{ content }}
14
+ </div>
15
+ {% else %}
16
+ <div class="usa-layout-docs-main_content">
17
+ {{ content }}
18
+ </div>
19
+ {% endif %}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uswds-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-31 00:00:00.000000000 Z
11
+ date: 2017-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -78,9 +78,10 @@ files:
78
78
  - _includes/skipnav.html
79
79
  - _includes/styles.html
80
80
  - _includes/subnav.html
81
- - _layouts/base.html
82
- - _layouts/docs.html
83
- - _layouts/landing.html
81
+ - _layouts/default.html
82
+ - _layouts/home.html
83
+ - _layouts/page.html
84
+ - _layouts/post.html
84
85
  - _layouts/search-results.html
85
86
  - _sass/uswds/_all.scss
86
87
  - _sass/uswds/components/_accordions.scss
@@ -483,7 +484,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
483
484
  version: '0'
484
485
  requirements: []
485
486
  rubyforge_project:
486
- rubygems_version: 2.4.5
487
+ rubygems_version: 2.6.10
487
488
  signing_key:
488
489
  specification_version: 4
489
490
  summary: A Jekyll theme for the U.S. Web Design Standards