From 7fa9fb4dff96dd1ba0058781b71a0aa11dbbc64d Mon Sep 17 00:00:00 2001 From: Merlin Date: Thu, 20 Oct 2011 19:43:56 +0200 Subject: [PATCH] Fixes menu to work with non-default base_url values. Includes the patch by Brian Mattern that fixes menu to work in all situations. Also adds the explanation how to use media_url and base_url properties. --- hyde/layouts/starter/layout/macros.j2 | 6 +++--- hyde/layouts/starter/site.yaml | 14 ++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/hyde/layouts/starter/layout/macros.j2 b/hyde/layouts/starter/layout/macros.j2 index b0fea44..624c38b 100644 --- a/hyde/layouts/starter/layout/macros.j2 +++ b/hyde/layouts/starter/layout/macros.j2 @@ -6,11 +6,11 @@ #} {%- endmacro %} diff --git a/hyde/layouts/starter/site.yaml b/hyde/layouts/starter/site.yaml index ef03c8b..300d096 100644 --- a/hyde/layouts/starter/site.yaml +++ b/hyde/layouts/starter/site.yaml @@ -1,6 +1,12 @@ mode: learning media_root: media media_url: /media +base_url: / +# If your site is nested inside of a bigger one, you can use media_url and +# base_url to properly generate links on your site. For example, if your URL +# will be some.domain.com/starter/, use: +# media_url: /starter/media +# base_url: /starter/ template: hyde.ext.templates.jinja.Jinja2Template plugins: - hyde.ext.plugins.meta.MetaPlugin @@ -23,13 +29,13 @@ context: install: "http://hyde.github.com/install.html" menu: - title: Home - url: /index.html + url: index.html - title: First steps - url: /first-steps.html + url: first-steps.html - title: Advanced topics - url: /advanced/overview.html + url: advanced/overview.html - title: About - url: /about.html + url: about.html ### Advanced part ###