Update README
This commit is contained in:
parent
26a22ee893
commit
f144a53ee5
17
README.md
17
README.md
@ -57,6 +57,23 @@ title: My exploration of the outside world
|
|||||||
sub_title: it's a scary place, don't go there
|
sub_title: it's a scary place, don't go there
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want a menu add this in settings.yaml:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
menu:
|
||||||
|
- about: "About Me"
|
||||||
|
- contact: "Contact"
|
||||||
|
```
|
||||||
|
|
||||||
|
After you need create ``about.yaml`` and ``contact.yaml`` like this:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
title: "Contact"
|
||||||
|
sections:
|
||||||
|
- type: text
|
||||||
|
text: Some text, HTML <b>is allowed</b>.
|
||||||
|
```
|
||||||
|
|
||||||
### Gallery settings.yaml
|
### Gallery settings.yaml
|
||||||
|
|
||||||
This settings.yaml will describe:
|
This settings.yaml will describe:
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
<div class="nav-wrapper">
|
<div class="nav-wrapper">
|
||||||
<ul>
|
<ul>
|
||||||
{% for line in settings.menu -%}
|
{% for line in settings.menu -%}
|
||||||
|
{% set file_name, menu_name = line.items()[0] %}
|
||||||
{% if loop.first %}
|
{% if loop.first %}
|
||||||
<li><a href={{ line }}.html class=first-item-menu>{{ line }}</a></li>
|
<li><a href={{ file_name }}.html class=first-item-menu>{{ menu_name }}</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href={{ line }}.html class=item-menu>{{ line }}</a></li>
|
<li><a href={{ file_name }}.html class=item-menu>{{ menu_name }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<h2>{{ pages.title }}</h2>
|
<h2>{{ pages.title }}</h2>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% for section in settings.sections %}
|
{% for section in pages.sections %}
|
||||||
{% include "sections/" + section.type + ".html" %}
|
{% include "sections/" + section.type + ".html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user