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 %}