Docs: Include version badge for latest features (#6574)

Merge pull request 6574
This commit is contained in:
jekyllbot 2017-11-24 03:43:37 -05:00 committed by GitHub
parent cebcff1412
commit 46b2501df6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 5 deletions

View File

@ -46,10 +46,10 @@ defaults:
layout: page
```
<div class="note unreleased">
<h5>Gather your collections</h5>
<div class="note">
<h5>Gather your collections {%- include docs_version_badge.html version="3.7.0" -%}</h5>
<p>From <code>v3.7.0</code> you can optionally specify a directory to store all your collections in the same place with <code>collections_dir: my_collections</code></p>
<p>You can optionally specify a directory to store all your collections in the same place with <code>collections_dir: my_collections</code></p>
<p>Then Jekyll will look in <code>my_collections/_books</code> for the <code>books</code> collection, and
in <code>my_collections/_recipes</code> for the <code>recipes</code> collection.</p>

View File

@ -549,7 +549,7 @@ defaults:
In this example, the `layout` is set to `default` inside the
[collection](../collections/) with the name `my_collection`.
It is also possible to use glob patterns when matching defaults. For example, it is possible to set specific layout for each `special-page.html` in any subfolder of `section` folder.
It is also possible to use glob patterns when matching defaults. For example, it is possible to set specific layout for each `special-page.html` in any subfolder of `section` folder. {%- include docs_version_badge.html version="3.7.0" -%}
```yaml
collections:

View File

@ -429,7 +429,7 @@ The default is `default`. They are as follows (with what they filter):
- `default`: spaces and non-alphanumeric characters
- `pretty`: spaces and non-alphanumeric characters except for `._~!$&'()+,;=@`
- `ascii`: spaces, non-alphanumeric, and non-ASCII characters
- `latin`: like `default`, except Latin characters are first transliterated (e.g. `àèïòü` to `aeiou`)
- `latin`: like `default`, except Latin characters are first transliterated (e.g. `àèïòü` to `aeiou`) {%- include docs_version_badge.html version="3.7.0" -%}
## Tags

View File

@ -0,0 +1 @@
<span class="version-badge" title="This feature is available starting version {{ include.version }}">{{ include.version }}</span>

View File

@ -1030,6 +1030,30 @@ code.output {
text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
/* Version badge */
.version-badge {
margin-left: .25em;
padding: 0.2em;
font-size: .75em;
font-weight: 400;
background-color: #fc0;
color: #222;
text-shadow: none;
vertical-align: middle;
border-radius: 3.75px;
}
.note {
.version-badge {
font-size: 0.9rem;
padding: 0.1em 0.2em;
background-color: rgba(0,0,0,0.2);
color: #fff;
box-shadow: inset 0 1px 10px rgba(0,0,0,0.3),0 1px 0 rgba(255,255,255,0.1),0 -1px 0 rgba(0,0,0,0.5);
}
}
/* Responsive tables */
@media (max-width: 768px) {