Update base and root front matter usage

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
pull/566/head^2
Thomas Dietrich 2017-11-11 15:03:27 +01:00 committed by Kai Kreuzer
parent 350e14e705
commit 065e9b9324
14 changed files with 42 additions and 30 deletions

View File

@ -1,7 +1,7 @@
# Yekyll site settings
title: openHAB 2
description: Empowering the Smart Home
baseurl: "" # the subpath of your site, e.g. /blog/
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://docs.openhab.org" # the base hostname & protocol for your site
twitter_username: openhab
github_username: openhab

View File

@ -1,4 +1,5 @@
{% assign base = '' %}
{% assign root = '' %}
{% assign base = site.baseurl %}
{% comment %} <!--Disabled since the base in docs.openhab.org can only be '/'-->
{% assign depth = page.url | split: '/' | size | minus: 1 %}
{% if depth == 0 %}{% assign base = '.' %}

View File

@ -1,4 +1,5 @@
{% include base.html %} {% assign docu = base | append: "/developers" %}
{% include base.html %}
{% assign docu = base | append: "/developers" %}
<ul class="nav">
<li><a href="{{docu}}">Overview</a></li>

View File

@ -8,8 +8,8 @@
</div>
<div class="col s12 m5">
<ul class="list-inline right-align">
<li><a href="/imprint.html">Imprint</a></li>
<li><a href="/privacy.html">Privacy Policy</a></li>
<li><a href="{{root}}/imprint.html">Imprint</a></li>
<li><a href="{{root}}/privacy.html">Privacy Policy</a></li>
<li><a href="http://www.openhab.org">openHAB Website</a></li>
<li><a href=# onclick="printPage()">Print This Page</a></li>
</ul>

View File

@ -40,9 +40,9 @@
<a href="{{base}}/index.html"><img id="logo" src="/images/logo.png" /></a>
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down">
<li><a href="{{base}}/tutorials">Tutorials</a></li>
<li><a href="{{root}}/tutorials/index.html">Tutorials</a></li>
<li><a href="{{base}}/introduction.html">User Manual</a></li>
<li><a href="{{docu}}/developers">Developer Guide</a></li>
<li><a href="{{root}}/developers/index.html">Developer Guide</a></li>
<li><a target="_blank" href="https://community.openhab.org">Community Forum</a></li>
<li><a target="_blank" href="https://github.com/openhab">GitHub</a></li>
<li class="search"><i class="material-icons">search</i></li>
@ -54,9 +54,9 @@
</ul>
<ul id="nav-mobile" class="side-nav">
<li><a href="{{base}}/index.html">Home</a></li>
<li><a href="{{base}}/tutorials">Tutorials</a></li>
<li><a href="{{root}}/tutorials/index.html">Tutorials</a></li>
<li><a href="{{base}}/introduction.html">User Manual</a></li>
<li><a href="{{docu}}/developers">Developer Guide</a></li>
<li><a href="{{root}}/developers/index.html">Developer Guide</a></li>
<li><a target="_blank" href="https://community.openhab.org">Community Forum</a></li>
<li><a target="_blank" href="https://github.com/openhab">GitHub</a></li>
<li class="search">

View File

@ -1,7 +1,8 @@
{% include base.html %}
<div class="row center targets">
<div class="col s12 m4 l4">
<a href="{{base}}/tutorials/">
<a href="{{root}}/tutorials/index.html">
<div class="target target-beginner card">
<i class="material-icons icon-large md-48">explore</i>
<div class="footer">
@ -25,7 +26,7 @@
</a>
</div>
<div class="col s12 m4 l4">
<a href="{{base}}/developers/">
<a href="{{root}}/developers/index.html">
<div class="target target-migration card">
<i class="material-icons icon-large">developer_mode</i>
<div class="footer">

View File

@ -1,4 +1,5 @@
{% include base.html %} {% assign docu = base | append: "/tutorials/advanced" %}
{% include base.html %}
{% assign docu = base | append: "/tutorials/advanced" %}
<ul class="nav">
<li>Tutorial (Advanced)</li>

View File

@ -1,4 +1,5 @@
{% include base.html %} {% assign docu = base | append: "/tutorials/beginner" %}
{% include base.html %}
{% assign docu = base | append: "/tutorials/beginner" %}
<ul class="nav">
<li>Tutorial (Beginner)</li>

View File

@ -1,4 +1,5 @@
{% include base.html %} {% assign docu = base %}
{% include base.html %}
{% assign docu = base %}
<ul class="nav">
<li><a href="{{docu}}/introduction.html">Introduction</a></li>
@ -72,9 +73,9 @@
<hr />
{% for binding in site.addons_bindings %}
{% if binding.install == "auto" %}
<li><a href="{{ binding.url }}">{{ binding.label }}</a></li>
<li><a href="{{docu}}{{ binding.url }}">{{ binding.label }}</a></li>
{% elsif binding.id == page.id and page.install == "manual" or page.install == "legacy" %}
<li><a href="{{ binding.url }}">{{ binding.label }} <small>(legacy/manual)</small></a></li>
<li><a href="{{docu}}{{ binding.url }}">{{ binding.label }} <small>(legacy/manual)</small></a></li>
{% endif %}
{% endfor %}
</ul>
@ -84,7 +85,7 @@
<li><a href="{{docu}}/addons/uis.html">Overview</a></li>
<hr />
{% for ui in site.addons_uis %}
<li><a href="{{ ui.url }}">{{ ui.label }}</a></li>
<li><a href="{{docu}}{{ ui.url }}">{{ ui.label }}</a></li>
{% endfor %}
<hr />
<li><a href="{{docu}}/addons/uis/apps/android.html">Android App</a></li>
@ -100,7 +101,7 @@
<hr />
{% for persistence in site.addons_persistences %}
{% if persistence.install == "auto" or persistence.id == page.id and page.install == "manual" %}
<li><a href="{{ persistence.url }}">{{ persistence.label }}</a></li>
<li><a href="{{docu}}{{ persistence.url }}">{{ persistence.label }}</a></li>
{% endif %}
{% endfor %}
</ul>
@ -111,7 +112,7 @@
<hr />
{% for action in site.addons_actions %}
{% if action.install == "auto" or action.id == page.id and page.install == "manual" %}
<li><a href="{{ action.url }}">{{ action.label }}</a></li>
<li><a href="{{docu}}{{ action.url }}">{{ action.label }}</a></li>
{% endif %}
{% endfor %}
</ul>
@ -121,7 +122,7 @@
<li><a href="{{docu}}/addons/transformations.html">Overview</a></li>
<hr />
{% for transformation in site.addons_transformations %}
<li><a href="{{ transformation.url }}">{{ transformation.label }}</a></li>
<li><a href="{{docu}}{{ transformation.url }}">{{ transformation.label }}</a></li>
{% endfor %}
</ul>
</li>
@ -130,7 +131,7 @@
<li><a href="{{docu}}/addons/voices.html">Overview</a></li>
<hr />
{% for voice in site.addons_voices %}
<li><a href="{{ voice.url }}">{{ voice.label }}</a></li>
<li><a href="{{docu}}{{ voice.url }}">{{ voice.label }}</a></li>
{% endfor %}
</ul>
</li>
@ -140,11 +141,11 @@
<li><a href="{{docu}}/addons/io.html">Overview</a></li>
<hr />
{% for io in site.addons_ios %}
<li><a href="{{ io.url }}">{{ io.label }}</a></li>
<li><a href="{{docu}}{{ io.url }}">{{ io.label }}</a></li>
{% endfor %}
<hr />
<li><a href="{{base}}/configuration/restdocs.html">REST API</a></li>
<li><a href="{{base}}/configuration/eclipseiotmarket.html">Eclipse IoT Marketplace</a></li>
<li><a href="{{docu}}/configuration/restdocs.html">REST API</a></li>
<li><a href="{{docu}}/configuration/eclipseiotmarket.html">Eclipse IoT Marketplace</a></li>
<li><a href="http://www.myopenhab.org/" target="_blank">IFTTT</a></li>
</ul>
</li>

View File

@ -1,7 +1,13 @@
{% include base.html %}
<div id="versioning" class="row valign-wrapper">
<div class="col s12 right-align">
<a class="waves-effect waves-light btn light-blue lighten-3" href="{{base}}/2.1.0{{page.url}}" title="You are currently browsing the latest 2.2.0-SNASHOT version of the openHAB documentation.">
Show v2.1.0 stable version<i class="material-icons right">chevron_right</i>
<ul id="dropdown-versioning" class="dropdown-content">
<li><a href="{{base}}{{page.url}}">v2.2.0-SNAPSHOT<i class="tiny material-icons right">lens</i></a></li>
<li><a href="{{base}}/2.1.0{{page.url}}">v2.1.0</a></li>
</ul>
<a class="btn dropdown-button light-blue lighten-2" href="#!" data-activates="dropdown-versioning" title="Select which version of this openHAB documentation article you want to read.">
Switch Article Version<i class="material-icons right">arrow_drop_down</i>
</a>
</div>
</div>

View File

@ -5,8 +5,8 @@
<div class="side-nav-wrapper">
{% include user-menu.html %}
</div>
{% include versioning.html %}
<div class="content">
{% include versioning.html %}
{{ content }}
</div>
</div>

View File

@ -5,8 +5,8 @@
<div class="side-nav-wrapper">
{% include user-menu.html %}
</div>
{% include versioning.html %}
<div class="content">
{% include versioning.html %}
{{ content }}
</div>
</div>

View File

@ -8,7 +8,7 @@ title: openHAB 2 Documentation
<div class="container target">
<h1>Welcome to the openHAB 2 Documentation!</h1>
<p>The <strong>open H</strong>ome <strong>A</strong>utomation <strong>B</strong>us (openHAB, <em>pronounced ˈəʊpənˈhæb</em>) is an open source, technology agnostic home automation platform which runs as the center of your smart home!</p>
<p>This documentation contains three different categories. If you are new to openHAB 2, you might want to start with one of the <a href="tutorials">Tutorials</a>. Otherwise, for specific information on how to use or install openHAB, see the <a href="overview.html">User Manual</a>. If you would like to contribute to the development of openHAB, please refer to our <a href="developers">Developer Guide</a>.</p>
<p>This documentation contains three different categories. If you are new to openHAB 2, you might want to start with one of the <a href="{{root}}/tutorials/index.html">Tutorials</a>. Otherwise, for specific information on how to use or install openHAB, see the <a href="{{base}}/introduction.html">User Manual</a>. If you would like to contribute to the development of openHAB, please refer to our <a href="{{root}}/developers/index.html">Developer Guide</a>.</p>
<p><strong>Note:</strong> This documentation is currently heavily worked on, so expect regular changes. If you feel that something important is missing, please <a href="https://github.com/openhab/openhab-docs/blob/gh-pages/README.md#contributing-to-the-documentation">help us improve the documentation</a>!
{% include nav-main-bar.html %}
</div>

View File

@ -54,7 +54,7 @@ title: Tutorials
</div>
<h2>Community</h2>
<h2 id="community">Community</h2>
<p>Feel free to check out the numerous tutorials and examples provided by many users in the openHAB community forum! There are new posts every week and show special aspects or bring in new ideas that the Beginner Tutorial does not cover.</p>
<p>Here are just a selected few of the existing tutorials and examples:</p>
<ul>