Skip to content

Commit

Permalink
Updated Presidium docs to reflect changes in presidium-core v0.1.38
Browse files Browse the repository at this point in the history
  • Loading branch information
roansong committed Sep 19, 2018
1 parent 01f9b63 commit 2c61605
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 8 deletions.
1 change: 1 addition & 0 deletions _config.yml
Expand Up @@ -16,6 +16,7 @@ logo: /media/images/logo.png
show:
status: false
author: false
scope: false
external:
authors-url: https://github.com/orgs/SPANDigital/people/

Expand Down
7 changes: 7 additions & 0 deletions content/_reference/04-frontmatter/03-user-roles.md
Expand Up @@ -39,3 +39,10 @@ roles: [Developer]
roles: Business Analyst
---
```

To show or hide roles on articles in your generated site, use the following setting in the `site config`:

```
show:
roles: true|false
```
3 changes: 2 additions & 1 deletion content/_reference/04-frontmatter/04-statuses.md
Expand Up @@ -19,5 +19,6 @@ status: draft|review|published|retired
To show or hide statuses on your generated site, use the following setting in the `site config`:

```
show-status: true|false
show:
status: true|false
```
28 changes: 22 additions & 6 deletions content/_reference/04-frontmatter/05-scopes.md
Expand Up @@ -2,7 +2,7 @@
title: "Scopes"
---

Articles and sections can be marked as either `internal` or `external` via the use of the `scope` tag in article `front matter` or the `site config`.
Articles and sections can be marked as `internal` and/or `external` via the use of the `scope` tag in article `front matter` or the `site config`.


Different versions of the site may then be built using:
Expand All @@ -17,6 +17,14 @@ scope: internal
---
```

Multiple scopes are used like this:

```
---
scope: [internal, external]
---
```

Sections can be assigned scope in the `site config` like so:

```
Expand All @@ -25,10 +33,18 @@ sections:
url: /internal-api/
collection: internal-api
scope: internal
- title: Public Section
url: /contact-info/
collection: contact-info
scope: external
scope: [internal, external]
```

To show or hide scopes on articles in your generated site, use the following setting in the `site config`:

```
show:
scope: true|false
```

Articles without scope will inherit from their section scope, while articles with scope will be unaffected.
Expand Down Expand Up @@ -57,15 +73,15 @@ The table below shows how these various interactions work, and what is and isn't
<td>internal</td>
<td>
<ul>
<li>undefined : </li>
<li>undefined : <code>if section.scope.includes("internal")</code></li>
<li>internal : ✓</li>
<li>external : ✗</li>
</ul>
</td>
<td><code>if internal_articles > 0</code></td>
<td>
<ul>
<li>undefined : <code>if section.scope === "internal"</code></li>
<li>undefined : <code>if section.scope.includes("internal")</code></li>
<li>internal : ✓</li>
<li>external : ✗</li>
</ul>
Expand All @@ -75,15 +91,15 @@ The table below shows how these various interactions work, and what is and isn't
<td>external</td>
<td>
<ul>
<li>undefined : <code>if section.scope === "external"</code></li>
<li>undefined : <code>if section.scope.includes("external")</code></li>
<li>internal : ✗</li>
<li>external : ✓</li>
</ul>
</td>
<td><code>if external_articles > 0</code></td>
<td>
<ul>
<li>undefined : <code>if section.scope === "external"</code></li>
<li>undefined : <code>if section.scope.includes("external")</code></li>
<li>internal : ✓</li>
<li>external : ✗</li>
</ul>
Expand Down
23 changes: 23 additions & 0 deletions content/_updates/94-v0.1.38.md
@@ -0,0 +1,23 @@
---
title: v0.1.38
---

19 September 2018

## Summary

General improvements that include updates to the scope feature and new documentation content.

## New Features

- Articles can now have multiple [Scopes]({{ site.baseurl }}/reference/frontmatter/scopes/)
- Corrections to the usage of [Statuses]({{ site.baseurl }}/reference/frontmatter/statuses/) in the `site config`

## Site Config

If you intend to use this release, make sure your site config is up to date with the [latest](https://github.com/SPANDigital/presidium-template/releases/tag/v0.1.38) config.

## Bug Fixes/Enhancements

- https://github.com/SPANDigital/presidium/issues/170
- https://github.com/SPANDigital/presidium/issues/169
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -32,6 +32,6 @@
"validate": "presidium validate"
},
"devDependencies": {
"presidium-core": "^0.1.32"
"presidium-core": "^0.1.38"
}
}

0 comments on commit 2c61605

Please sign in to comment.