From fe76832e4664ecf24547c5994277a9db388f2cd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Ra=C3=BAl=20Villalba?= Date: Fri, 23 Sep 2011 13:17:44 -0300 Subject: [PATCH] Move language data to LN/meta.yaml (#11) --- src/content/en/meta.yaml | 21 +++++++++++++++++++++ src/draft/es/meta.yaml | 20 ++++++++++++++++++++ src/layout/base.j2 | 4 ++-- src/site.yaml | 21 --------------------- 4 files changed, 43 insertions(+), 23 deletions(-) diff --git a/src/content/en/meta.yaml b/src/content/en/meta.yaml index cae644f..4795ef2 100644 --- a/src/content/en/meta.yaml +++ b/src/content/en/meta.yaml @@ -1,2 +1,23 @@ --- language: en +menu: + - + name: "Home" + url: /en/ + - + name: "About" + url: /en/about.html + - + name: "Projects" + url: /en/projects.html +# - +# name: "Blog" +# url: /en/blog/ + - + name: "Reference data" + url: /en/reference.html + - + name: "Contact" + url: /en/contact.html +footer: "The contents of this website are licensed under a Creative Commons Attribution 3.0 Unported License." + diff --git a/src/draft/es/meta.yaml b/src/draft/es/meta.yaml index 9297762..80a8cd7 100644 --- a/src/draft/es/meta.yaml +++ b/src/draft/es/meta.yaml @@ -1,2 +1,22 @@ --- language: es +menu: + - + name: "Portada" + url: /es/ + - + name: "Sobre mí" + url: /es/sobre-mi.html + - + name: "Proyectos" + url: /es/proyectos.html +# - +# name: "Blog" +# url: /es/blog/ + - + name: "Datos de referencia" + url: /en/referencia.html + - + name: "Contáctame" + url: /es/contactame.html +footer: "El contenido de esta página web está bajo una licencia Creative Commons Reconocimiento 3.0 Unported." diff --git a/src/layout/base.j2 b/src/layout/base.j2 index bf5e98e..c2f7d2f 100644 --- a/src/layout/base.j2 +++ b/src/layout/base.j2 @@ -33,7 +33,7 @@
- {% for item in menu[resource.meta.language] %} + {% for item in resource.meta.menu %} {{ item.name }}{% if not loop.last %}  | {% endif %} {% endfor %}
@@ -53,7 +53,7 @@

- +
diff --git a/src/site.yaml b/src/site.yaml index d33fb9c..76e5813 100644 --- a/src/site.yaml +++ b/src/site.yaml @@ -21,26 +21,6 @@ context: en: "English" es: "Español" menu: - en: - - - name: "Home" - url: /en/ - - - name: "About" - url: /en/about.html - - - name: "Projects" - url: /en/projects.html -# - -# name: "Blog" -# url: /en/blog/ - - - name: "Reference data" - url: /en/reference.html - - - name: "Contact" - url: /en/contact.html - es: - name: "Portada" url: /es/ @@ -60,7 +40,6 @@ context: name: "Contáctame" url: /es/contactame.html footer: - en: "The contents of this website are licensed under a Creative Commons Attribution 3.0 Unported License." es: "El contenido de esta página web está bajo una licencia Creative Commons Reconocimiento 3.0 Unported." meta: nodemeta: meta.yaml -- 2.11.4.GIT