Use default_root for pages, normals defaults doesn't work for collections

pull/19318/merge
Adam Schmideg 6 years ago
parent 585369608d
commit e4490becd2
  1. 3
      Gemfile
  2. 22
      _config.yml
  3. 4
      _includes/head.html
  4. 3
      _includes/link.html
  5. 1
      _layouts/sidebar.html

@ -28,3 +28,6 @@ gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows # Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform? gem "wdm", "~> 0.1.0" if Gem.win_platform?
group :development, :test do
gem "pry"
end

@ -2,34 +2,26 @@ repository: ethereum/go-ethereum
theme: minima theme: minima
exclude: keep_files:
- Gemfile - static
- Gemfile.lock
- .gitignore
favicon: /static/images/favicon.png favicon: /static/images/favicon.png
defaults: defaults:
- - scope:
scope:
path: "" path: ""
values: values:
layout: sidebar layout: sidebar
- - scope:
scope:
path: "*" path: "*"
values: values:
root: "." root: "."
- - scope:
scope:
path: "*/*" path: "*/*"
values: values:
root: ".." root: ".."
-
scope: default_root: ".."
path: "*/*/*"
values:
root: "../.."
collections_dir: docs collections_dir: docs
collections: collections:

@ -8,13 +8,13 @@
<link rel="icon" type="image/png" href="{% include link.html url=site.favicon %}" /> <link rel="icon" type="image/png" href="{% include link.html url=site.favicon %}" />
{% if layout.common-css %} {% if layout.common-css %}
{% for css in layout.common-css %} {% for css in layout.common-css %}
<link rel="stylesheet" href="{% include link.html url=css %}"" /> <link rel="stylesheet" href="{% include link.html url=css %}" />
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if page.css %} {% if page.css %}
{% for css in page.css %} {% for css in page.css %}
<link rel="stylesheet" href="{% include link.html url=css %}"" /> <link rel="stylesheet" href="{% include link.html url=css %}" />
{% endfor %} {% endfor %}
{% endif %} {% endif %}

@ -1 +1,2 @@
{{ include.url | remove: ".html" | prepend: page.root | replace: '//', '/' }} {% capture root %}{{ page.root or site.default_root }}{% endcapture %}
{{ include.url | remove: ".html" | prepend: root | replace: '//', '/' }}

@ -31,7 +31,6 @@ layout: default
{% if page.title %} {% if page.title %}
<h1 class="featurette-heading">{% include title.html doc=page coll=page.collection %}</h1> <h1 class="featurette-heading">{% include title.html doc=page coll=page.collection %}</h1>
{% endif %} {% endif %}
{{ content }} {{ content }}
</div> </div>
</div> </div>

Loading…
Cancel
Save