Merge pull request #95 from muffinresearch/rename-draft-in-data
Rename draft -> draft-label
This commit is contained in:
Коммит
a2d1ba36fd
|
@ -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 %}
|
||||
|
|
Загрузка…
Ссылка в новой задаче