fixing issue with links for tags, series, and top nav. Also commented out customMenu.html from topnav.html

This commit is contained in:
Tom Johnson 2015-08-18 12:02:13 -07:00
parent 005c38bbea
commit 77e651f476
8 changed files with 17 additions and 16 deletions

View File

@ -9,7 +9,7 @@
<li class="active"> → {{p.weight}}. {{p.title}}</li> <li class="active"> → {{p.weight}}. {{p.title}}</li>
{% else %} {% else %}
<li> <li>
<a href="{{p.url}}">{{p.weight}}. {{p.title}}</a> <a href="{{p.url | replace: '/',''}}">{{p.weight}}. {{p.title}}</a>
</li> </li>
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -3,7 +3,7 @@
{% if p.series == "ACME series" %} {% if p.series == "ACME series" %}
{% assign nextTopic = page.weight | plus: "0.1" %} {% assign nextTopic = page.weight | plus: "0.1" %}
{% if p.weight == nextTopic %} {% if p.weight == nextTopic %}
<a href="{{p.url}}"><button type="button" class="btn btn-primary">Next: {{p.weight}} {{p.title}}</button></a> <a href="{{p.url | replace: '/',''}}"><button type="button" class="btn btn-primary">Next: {{p.weight}} {{p.title}}</button></a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -21,7 +21,6 @@
<script src="js/toc.js"></script> <script src="js/toc.js"></script>
<script src="js/customscripts.js"></script> <script src="js/customscripts.js"></script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]> <!--[if lt IE 9]>

View File

@ -28,7 +28,7 @@
{% elsif page.url == subcategory.url %} {% elsif page.url == subcategory.url %}
<li class="active"><a href="{{subcategory.url | replace: "/",""}}">{{subcategory.title}}</a></li> <li class="active"><a href="{{subcategory.url | replace: "/",""}}">{{subcategory.title}}</a></li>
{% else %} {% else %}
<li><a href="{{subcategory.url}}">{{subcategory.title}}</a></li> <li><a href="{{subcategory.url | replace: "/",""}}">{{subcategory.title}}</a></li>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
@ -49,9 +49,9 @@
{% if subitem.external_url %} {% if subitem.external_url %}
<li><a href="{{subitem.external_url}}" target="_blank">{{subitem.title}}</a></li> <li><a href="{{subitem.external_url}}" target="_blank">{{subitem.title}}</a></li>
{% elsif page.url contains subitem.url %} {% elsif page.url contains subitem.url %}
<li class="dropdownActive"><a href="{{subitem.url}}">{{subitem.title}}</a></li> <li class="dropdownActive"><a href="{{subitem.url | replace: '/',''}}">{{subitem.title}}</a></li>
{% else %} {% else %}
<li><a href="{{subitem.url}}">{{subitem.title}}</a></li> <li><a href="{{subitem.url | replace: "/",""}}">{{subitem.title}}</a></li>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
@ -65,8 +65,8 @@
<!-- special insertion --> <!-- special insertion -->
{% include custom/doc/customMenu.html %} {% comment %} {% include custom/doc/customMenu.html %}{% endcomment %}
{% include feedback.html %} {% include feedback.html %}
<li> <li>

View File

@ -30,7 +30,7 @@ Getting started pages:
{% for page in sorted_pages %} {% for page in sorted_pages %}
{% for tag in page.tags %} {% for tag in page.tags %}
{% if tag == "getting-started" %} {% if tag == "getting-started" %}
<li><a href="{{page.url}}">{{page.title}}</a></li> <li><a href="{{page.url | replace: '/',''}}">{{page.title}}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
@ -45,7 +45,7 @@ Getting started pages:
{% for page in sorted_pages %} {% for page in sorted_pages %}
{% for tag in page.tags %} {% for tag in page.tags %}
{% if tag == "getting-started" %} {% if tag == "getting-started" %}
<li><a href="{{page.url}}">{{page.title}}</a></li> <li><a href="{{page.url | replace: '/',''}}">{{page.title}}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}

View File

@ -27,7 +27,7 @@ First create an include that contains your series button:
<li class="active"> → {{p.weight}}. {{p.title}}</li> <li class="active"> → {{p.weight}}. {{p.title}}</li>
{% else %} {% else %}
<li> <li>
<a href="{{p.url}}">{{p.weight}}. {{p.title}}</a> <a href="{{p.url | replace: '/',''}}">{{p.weight}}. {{p.title}}</a>
</li> </li>
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -55,7 +55,7 @@ This will be the next button at the bottom of the page:
{% if p.series == "ACME series" %} {% if p.series == "ACME series" %}
{% assign nextTopic = page.weight | plus: "0.1" %} {% assign nextTopic = page.weight | plus: "0.1" %}
{% if p.weight == nextTopic %} {% if p.weight == nextTopic %}
<a href="{{p.url}}"><button type="button" class="btn btn-primary">Next: {{p.weight}} {{p.title}}</button></a> <a href="{{p.url | replace: '/',''}}"><button type="button" class="btn btn-primary">Next: {{p.weight}} {{p.title}}</button></a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -126,7 +126,7 @@ Getting started pages:
{% for page in site.pages %} {% for page in site.pages %}
{% for tag in page.tags %} {% for tag in page.tags %}
{% if tag == "getting-started" %} {% if tag == "getting-started" %}
<li><a href="{{page.url}}">{{page.title}}</a></li> <li><a href="{{page.url | replace: '/',''}}">{{page.title}}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
@ -141,7 +141,7 @@ Getting started pages:
{% for page in site.pages %} {% for page in site.pages %}
{% for tag in page.tags %} {% for tag in page.tags %}
{% if tag == "getting-started" %} {% if tag == "getting-started" %}
<li><a href="{{page.url}}">{{page.title}}</a></li> <li><a href="{{page.url | replace: '/',''}}">{{page.title}}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
@ -157,7 +157,7 @@ Getting started pages:
{% for page in sorted_pages %} {% for page in sorted_pages %}
{% for tag in page.tags %} {% for tag in page.tags %}
{% if tag == "getting-started" %} {% if tag == "getting-started" %}
<li><a href="{{page.url}}">{{page.title}}</a></li> <li><a href="{{page.url | replace: '/',''}}">{{page.title}}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
@ -173,7 +173,7 @@ Getting started pages:
{% for page in sorted_pages %} {% for page in sorted_pages %}
{% for tag in page.tags %} {% for tag in page.tags %}
{% if tag == "getting-started" %} {% if tag == "getting-started" %}
<li><a href="{{page.url}}">{{page.title}}</a></li> <li><a href="{{page.url | replace: '/',''}}">{{page.title}}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}

View File

@ -34,6 +34,8 @@ Included in the topnav.html file is an include to /doc/customMenu.html. The code
<li {% if site.audience == "designers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../doc_designers/{{site.suffix}}">Designer doc</a> {% else %} ../doc_designers{{page.url}}">Designer docs</a>{% endif %}</li> <li {% if site.audience == "designers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../doc_designers/{{site.suffix}}">Designer doc</a> {% else %} ../doc_designers{{page.url}}">Designer docs</a>{% endif %}</li>
``` ```
{{note}} In the theme, the link to the customMenu.html include in the \_includes/topnav.html file is currently commented out. This is because this feature only works when you have multiple outputs hosted on the same server. Github Pages, where I'm publishing this theme, allows only one output per Github Pages directory. So rather than removing this customMenu feature from the theme, I've just commented it out so that it won't appear broken in the demo.{{end}}
The current doc site is highlighted. If you select another doc site, the site switches to that doc site and goes to the same page on that doc site. This way, if you have a task such as "Configuring the license" in several different programming languages, users can switch to other programming languages to see the same page. The current doc site is highlighted. If you select another doc site, the site switches to that doc site and goes to the same page on that doc site. This way, if you have a task such as "Configuring the license" in several different programming languages, users can switch to other programming languages to see the same page.
You need to have both the designers and writers sites deployed on a web server to see this in action. Go to the following link: <a href="http://idratherbetellingstories.com/documentation-theme-jekyll/doc_designers/" target="_blank">idratherbetellingstories.com/documentation-theme-jekyll/doc_designers/</a>. You need to have both the designers and writers sites deployed on a web server to see this in action. Go to the following link: <a href="http://idratherbetellingstories.com/documentation-theme-jekyll/doc_designers/" target="_blank">idratherbetellingstories.com/documentation-theme-jekyll/doc_designers/</a>.