diff --git a/static/plants/dracaena-fragrans/common-issues.md b/static/plants/dracaena-fragrans/common-issues.md new file mode 100644 index 0000000..e69de29 diff --git a/static/plants/dracaena-fragrans/metadata.toml b/static/plants/dracaena-fragrans/metadata.toml index fcb05d8..402e749 100644 --- a/static/plants/dracaena-fragrans/metadata.toml +++ b/static/plants/dracaena-fragrans/metadata.toml @@ -19,3 +19,7 @@ humidity = "normal" water_schedule = "12 days" fertilize_schedule = "month" mist_schedule = "week" + +# [additional_chapters.common_issues] +# file = "common-issues" +# title = "Common Issues" diff --git a/templates/plant.html b/templates/plant.html index eeb2af9..8a57f0c 100644 --- a/templates/plant.html +++ b/templates/plant.html @@ -20,7 +20,7 @@ {{ macros::figure(url=image.url, alt=data.image.alt, source=data.image.source) }} {% endblock image %}
-

Site

+

Site

{% if data.site.temp %} {{ macros::badge(icon="thermometer", class="temp-badge", text=data.site.temp, plain="Prefers " ~ data.site.temp ~ " temperatures.") }} @@ -40,7 +40,7 @@
-

Care

+

Care

{% if data.care.water_schedule %} {{ macros::badge(icon="drizzle", class="water-badge", text="every " ~ data.care.water_schedule, plain="Water every " ~ data.care.water_schedule ~ ".") }} @@ -57,6 +57,17 @@ {% block care %} {{ load_data(path="/static/plants/" ~ page.extra.data ~ "/care.md") | markdown | safe }} {% endblock care %} + + {% if data.additional_chapters %} + {% block additional_chapters %} + {% for key, chapter in data.additional_chapters %} +
+

{{ chapter.title }}

+ {{ load_data(path="/static/plants/" ~ page.extra.data ~ "/" ~ chapter.file ~ ".md") | markdown | safe }} +
+ {% endfor %} + {% endblock additional_chapters %} + {% endif %}
{{ page.content | safe }}