Update README

This commit is contained in:
Adrien Beudin 2016-02-09 21:59:03 +01:00
parent 26a22ee893
commit f144a53ee5
3 changed files with 21 additions and 3 deletions

View File

@ -57,6 +57,23 @@ title: My exploration of the outside world
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
This settings.yaml will describe:

View File

@ -2,10 +2,11 @@
<div class="nav-wrapper">
<ul>
{% for line in settings.menu -%}
{% set file_name, menu_name = line.items()[0] %}
{% 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 %}
<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 %}
{% endfor -%}
</ul>

View File

@ -26,7 +26,7 @@
<h2>{{ pages.title }}</h2>
</section>
{% for section in settings.sections %}
{% for section in pages.sections %}
{% include "sections/" + section.type + ".html" %}
{% endfor %}