From e4490becd2d4137c21741219c0c0178a60ff401d Mon Sep 17 00:00:00 2001 From: Adam Schmideg Date: Fri, 22 Mar 2019 15:55:03 +0100 Subject: [PATCH] Use default_root for pages, normals defaults doesn't work for collections --- Gemfile | 3 +++ _config.yml | 22 +++++++--------------- _includes/head.html | 4 ++-- _includes/link.html | 3 ++- _layouts/sidebar.html | 1 - 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index 3f4994136..d6fed7efa 100644 --- a/Gemfile +++ b/Gemfile @@ -28,3 +28,6 @@ gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] # Performance-booster for watching directories on Windows gem "wdm", "~> 0.1.0" if Gem.win_platform? +group :development, :test do + gem "pry" +end \ No newline at end of file diff --git a/_config.yml b/_config.yml index 38f95dfa4..37fe4147e 100644 --- a/_config.yml +++ b/_config.yml @@ -2,34 +2,26 @@ repository: ethereum/go-ethereum theme: minima -exclude: - - Gemfile - - Gemfile.lock - - .gitignore +keep_files: + - static favicon: /static/images/favicon.png defaults: - - - scope: + - scope: path: "" values: layout: sidebar - - - scope: + - scope: path: "*" values: root: "." - - - scope: + - scope: path: "*/*" values: root: ".." - - - scope: - path: "*/*/*" - values: - root: "../.." + +default_root: ".." collections_dir: docs collections: diff --git a/_includes/head.html b/_includes/head.html index 724ce5a28..c077241ba 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -8,13 +8,13 @@ {% if layout.common-css %} {% for css in layout.common-css %} - + {% endfor %} {% endif %} {% if page.css %} {% for css in page.css %} - + {% endfor %} {% endif %} diff --git a/_includes/link.html b/_includes/link.html index 393917d50..f1f0abea6 100644 --- a/_includes/link.html +++ b/_includes/link.html @@ -1 +1,2 @@ -{{ include.url | remove: ".html" | prepend: page.root | replace: '//', '/' }} \ No newline at end of file +{% capture root %}{{ page.root or site.default_root }}{% endcapture %} +{{ include.url | remove: ".html" | prepend: root | replace: '//', '/' }} \ No newline at end of file diff --git a/_layouts/sidebar.html b/_layouts/sidebar.html index dcf9747d1..69ce33cb7 100644 --- a/_layouts/sidebar.html +++ b/_layouts/sidebar.html @@ -31,7 +31,6 @@ layout: default {% if page.title %}

{% include title.html doc=page coll=page.collection %}

{% endif %} - {{ content }}