diff --git a/_config.yml b/_config.yml index 91af10068..5e107fb1b 100644 --- a/_config.yml +++ b/_config.yml @@ -19,20 +19,3 @@ baseurl: / layout: header: false footer: false - -nav: - - label: Home - href: / - icon: - - label: About - href: /about - icon: - - label: Contributors - href: /contributors - icon: - - label: Contact Us - href: /contact - icon: - - label: Search - href: /search - icon: \ No newline at end of file diff --git a/config.yml b/_extra_config.yml similarity index 87% rename from config.yml rename to _extra_config.yml index 91af10068..43eec66ef 100644 --- a/config.yml +++ b/_extra_config.yml @@ -1,25 +1,3 @@ -title: Plant Humanities Lab -author: - name: rsnyder - email: ron@snyderjr.com - -# The `>` after `description:` means to ignore line-breaks until next key. -# If you want to omit the line-break after the end of text, use `>-` instead. -description: >- - Quickly build websites using Github Pages, Markdown, and interactive viewers. - -github: - owner: jstor-labs - repo: plant-humanities - branch: gh-pages - -url: https://beta.plant-humanities.org/ -baseurl: / - -layout: - header: false - footer: false - nav: - label: Home href: / diff --git a/_layouts/default.html b/_layouts/default.html index d1c8043fa..c75eec326 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -36,7 +36,7 @@ {%- if site.layout.header == "true" -%} {%- include header.html -%} {%- endif -%} -
+
{{ content }}
{%- if site.layout.footer == "true" -%} diff --git a/juncture/index.js b/juncture/index.js index 017b45f15..45a075065 100644 --- a/juncture/index.js +++ b/juncture/index.js @@ -16,9 +16,11 @@ if (referrerUrl) { async function getConfig() { if (window._config) return window._config - let resp = await fetch('/config.yml') - if (resp.ok) window._config = window.jsyaml.load(await resp.text()) - + let resp = await fetch('/_extra_config.yml') + if (resp.ok) window._config = { + ...window.config, + ...window.jsyaml.load(await resp.text()) + } return window._config } diff --git a/server.py b/server.py index 03db42ec3..c62d63ad4 100755 --- a/server.py +++ b/server.py @@ -87,6 +87,7 @@ html_template = html_template.replace('{{ site.github.owner }}', config['github']['owner']) html_template = html_template.replace('{{ site.github.repo }}', config['github']['repo']) html_template = html_template.replace('{{ site.github.branch }}', config['github']['branch']) +html_template = html_template.replace('{{ site.nav }}', json.dumps(config['nav'])) html_template = html_template.replace('{{ site.baseurl }}', '') html_template = html_template.replace('{%- if site.mode == "juncture" -%}', '') # html_template = re.sub(r'^\s*{%-\s+else\s+-%}\s*.*\s*{%-\s+endif\s+-%}', '', html_template, flags=re.MULTILINE)