From e0f4c7a8e180a63dcb3ee60e755ff3beaeccd461 Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Sun, 26 Jun 2016 18:54:18 -0400 Subject: [PATCH] Styling workshops correctly. 1. Use site.root for root path if set, otherwise use site.github.url. 2. Display extra files for workshop-template repo as well as for lessons. --- _includes/javascript.html | 15 ++++++++--- _includes/navbar.html | 52 ++++++++++++++++++++++++++++----------- _layouts/workshop.html | 15 ++++++++--- 3 files changed, 62 insertions(+), 20 deletions(-) diff --git a/_includes/javascript.html b/_includes/javascript.html index c8c66c0..95d49f0 100644 --- a/_includes/javascript.html +++ b/_includes/javascript.html @@ -1,3 +1,12 @@ - - - +{% comment %} + If previewing locally, site.root is set in _config_dev.yml. + If site.root is not set, assume we're viewing on the web. +{% endcomment %} +{% if site.root %} + {% assign root = site.root %} +{% else %} + {% assign root = site.github.url %} +{% endif %} + + + diff --git a/_includes/navbar.html b/_includes/navbar.html index 7da51db..ff15ed1 100644 --- a/_includes/navbar.html +++ b/_includes/navbar.html @@ -1,3 +1,12 @@ +{% comment %} + If previewing locally, site.root is set in _config_dev.yml. + If site.root is not set, assume we're viewing on the web. +{% endcomment %} +{% if site.root %} + {% assign root = site.root %} +{% else %} + {% assign root = site.github.url %} +{% endif %}