From aa9c2d2b00944cc77c209bd9ad3b239ec032fbe5 Mon Sep 17 00:00:00 2001 From: Adam Schmideg Date: Thu, 21 Mar 2019 15:33:28 +0100 Subject: [PATCH] Use page.root for relative links --- _config.yml | 15 +++++++++++++++ _includes/head.html | 10 +++++----- _includes/link.html | 2 +- _layouts/default.html | 6 +++--- doc.md | 2 +- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/_config.yml b/_config.yml index 2c3ff8c2e9..38f95dfa4e 100644 --- a/_config.yml +++ b/_config.yml @@ -15,6 +15,21 @@ defaults: path: "" values: layout: sidebar + - + scope: + path: "*" + values: + root: "." + - + scope: + path: "*/*" + values: + root: ".." + - + scope: + path: "*/*/*" + values: + root: "../.." collections_dir: docs collections: diff --git a/_includes/head.html b/_includes/head.html index 233b378827..724ce5a28a 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -5,28 +5,28 @@ {% if page.title %}{{ page.title }} | {% endif %}Go Ethereum - + {% if layout.common-css %} {% for css in layout.common-css %} - + {% endfor %} {% endif %} {% if page.css %} {% for css in page.css %} - + {% endfor %} {% endif %} {% if layout.common-js %} {% for js in layout.common-js %} - + {% endfor %} {% endif %} {% if page.js %} {% for js in page.js %} - + {% endfor %} {% endif %} diff --git a/_includes/link.html b/_includes/link.html index 47b146d5a5..393917d502 100644 --- a/_includes/link.html +++ b/_includes/link.html @@ -1 +1 @@ -{{ include.url | remove: ".html" | prepend: site.baseurl | replace: '//', '/' }} \ No newline at end of file +{{ include.url | remove: ".html" | prepend: page.root | replace: '//', '/' }} \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index 057b6ca825..9a8ad9cf96 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -17,7 +17,6 @@ common-js: {% include head.html %} -

baseurl: {{ site.baseurl }}

+

debug path:{{ page.path }}

{{ content }}