Merge pull request #95 from muffinresearch/rename-draft-in-data

Rename draft -> draft-label
This commit is contained in:
Caitlin Neiman 2019-02-14 08:34:51 -08:00 коммит произвёл GitHub
Родитель 382c76bbc2 b5922bffab
Коммит a2d1ba36fd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -71,12 +71,12 @@ Go to `_data/content-guidelines-pages.yaml` and add a new entry for your page:
```
- title: "Page Name"
url: "/content-guidelines/page-name/"
draft: true
draft-label: true
```
#### Controlling draft state
#### Controlling draft labelling
If you don't want the page to appear as a draft or as and when it's ready remove `draft: true` from the relevant entry in `_data/content-guidelines.yaml`
If you don't want the page to be labelled as a draft, as and when it's ready remove `draft-label: true` from the relevant entry in `_data/content-guidelines.yaml`
## Deployment

Просмотреть файл

@ -1,15 +1,15 @@
- title: "Master Template"
url: "/content-guidelines/master-template/"
draft: true
draft-label: true
- title: "Extension Name"
url: "/content-guidelines/extension-name/"
draft: true
draft-label: true
- title: "Extension Title"
url: "/content-guidelines/extension-title/"
draft: true
draft-label: true
- title: "Extension Subtitle"
url: "/content-guidelines/extension-subtitle/"
draft: true
draft-label: true

Просмотреть файл

@ -14,12 +14,12 @@
{% if page.url == item.url %}
<li class="current">
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
{% if item.draft %}<span class="draft">draft</span>{% endif %}
{% if item.draft-label %}<span class="draft">draft</span>{% endif %}
</li>
{% else %}
<li>
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
{% if item.draft %}<span class="draft">draft</span>{% endif %}
{% if item.draft-label %}<span class="draft">draft</span>{% endif %}
</li>
{% endif %}
{% endfor %}

Просмотреть файл

@ -7,7 +7,7 @@ layout: default
<div class="post-content">
{% for item in site.data.content-guidelines-pages %}
{% if item.url == page.url and item.draft %}
{% if item.url == page.url and item.draft-label %}
<p class="warning">{% asset icons/warning.svg @optim alt="Warning:" %} This is a working draft</p>
{% endif %}
{% endfor %}