diff --git a/README.md b/README.md index 7ceafdf..6f92d50 100644 --- a/README.md +++ b/README.md @@ -62,21 +62,35 @@ sub_title: it's a scary place, don't go there It is possible to add a menu to your homepage that links to static pages. To do so, add a `menu` key to your `settings.yaml`, for example: ```yaml -menu: - - about: "About Me" - - contact: "Contact" +menu: + name: "About" + type: "page" + url: "about" + - name: "My first gallery" + type: "folder" + url: "first_gallery" + - name: "Twitter" + type: "external" + url: "http://twitter.com" ``` -The first part (`about` and `contact`) here are the name of the files (without -the `.yaml`) and the second part are the menu title that will be displayed in -the templates. So, here, you'll need to create a ``about.yaml`` and a -``contact.yaml`` files in the root directory. Their content are similar to -galleries (see [bellow](#gallery-settingsyaml)). +You can use 3 type of item in the menu: -For example, this could be the content of `contact.yaml`: +* page +* folder +* external + +For page, the url is the files (without the `.yaml`) +For folder, the url is the name of the folder (like first_gallery in exemple) +And for the external, the url is the full url of the website. You can +use it too for make home in the menu. +So, here, you'll need to create a ``about.yaml`` files in the root directory. +Their content are similar to galleries (see [bellow](#gallery-settingsyaml)). + +For example, this could be the content of `about.yaml`: ```yaml -title: "Contact" +title: "About" sections: - type: text text: Some text, HTML is allowed. diff --git a/example/contact.yaml b/example/contact.yaml deleted file mode 100644 index edcea46..0000000 --- a/example/contact.yaml +++ /dev/null @@ -1,5 +0,0 @@ -title: "Menu 2" -sections: - - type: text - text: « voici plein de blabla à rajouter et ceci est du gras et encore plein plein plein plein de text car je veux voir comment ça va wrapper car c'est important et il faut pas que j'oublie de mettre des margins en % sinon ça va pas le faire alala là ça devrait aller » - diff --git a/example/settings-menu.yaml b/example/settings-menu.yaml index 745ebf0..6bb823c 100644 --- a/example/settings-menu.yaml +++ b/example/settings-menu.yaml @@ -1,4 +1,11 @@ title: "Example gallery" -menu: - - about: "Menu 1" - - contact: "Menu 2" +menu: + - name: "About" + type: "page" + url: "about" + - name: "My first gallery" + type: "folder" + url: "first_gallery" + - name: "Twitter" + type: "external" + url: "http://twitter.com"