From 0b5394448bc38a7bab0dcfbc3f2addd34673e40b Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Sat, 18 Apr 2015 19:19:37 -0400 Subject: [PATCH] Adding a 'root' variable to allow pages in sub-directories. @karawoo recently created a workshop website with a sub-directory for syllabus material. The `_layouts/page.html` template didn't work properly in this case because our included files have fixed relative paths to CSS and JS files. This PR adds the `root` variable, and references to it, where needed. It also moves the inclusion of `footer.html` to the right place (so that the footer spans the whole page). Note that the `index.html` page already had an (unused) `root` variable. --- _includes/header.html | 4 ++-- _includes/javascript.html | 4 ++-- _layouts/page.html | 8 ++++---- setup/index.md | 1 + 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/_includes/header.html b/_includes/header.html index 40bec4c..3275b6f 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,7 +1,7 @@ - - + + diff --git a/_includes/javascript.html b/_includes/javascript.html index 531a392..cf5ba14 100644 --- a/_includes/javascript.html +++ b/_includes/javascript.html @@ -1,3 +1,3 @@ - - + + diff --git a/_layouts/page.html b/_layouts/page.html index bb76241..ccccdee 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -4,6 +4,8 @@ @@ -11,17 +13,15 @@ {% include header.html %} - {% include github-ribbon.html %} -
{% include banner.html %}
{{content}} - {% include footer.html %}
-
+ {% include footer.html %} +
{% include javascript.html %} diff --git a/setup/index.md b/setup/index.md index 657ffa5..1567133 100644 --- a/setup/index.md +++ b/setup/index.md @@ -1,6 +1,7 @@ --- layout: page title: Testing Setup +root: .. --- For Learners ------------