Skip to content
Snippets Groups Projects
Commit 92ad87ee authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Display warnings & menu emojis for draft pages & sections.

parent 905c49f0
No related branches found
No related tags found
1 merge request!124Display warnings & menu emojis for draft pages & sections.
Pipeline #171493 passed
......@@ -35,6 +35,7 @@
{% set chapter_num = loop.index %}
<a href="{{ subsection.permalink }}">
{% if config.extra.book_number_chapters %}<strong>{{ chapter_num }}.</strong>{% endif %}
{% if subsection.draft %}<span title="This section is a draft">🔨</span>{% endif %}
{{ subsection.title }}
</a>
{% if subsection.pages %}
......@@ -43,6 +44,7 @@
<li {% if current_path == page.path %}class="active"{% endif %}>
<a href="{{ page.permalink }}">
{% if config.extra.book_number_chapters %}<strong>{{ chapter_num }}.{{ loop.index }}.</strong>{% endif %}
{% if page.draft %}<span title="This page is a draft">🔨</span>{% endif %}
{{ page.title }}
</a>
{% if current_path == page.path %}
......
......@@ -4,5 +4,13 @@
{% block content %}
<h1>{{ page.title }}</h1>
{% if page.draft %}
<div class="warning">
<h4>🔨 Draft page</h4>
<p>This page is a draft, and will not be published in production !</p>
</div>
{% endif %}
{{ page.content | safe }}
{% endblock content %}
{% extends "index.html" %}
{% block content %}
<h1>{{ section.title }}</h1>
{% if section.draft %}
<div class="warning">
<h4>🔨 Draft section</h4>
<p>This section is a draft, and will not be published in production !</p>
</div>
{% endif %}
{{ section.content | safe }}
{% endblock content %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment