Make the header links a bit more flexible

This commit is contained in:
Joel Marcey 2016-11-07 17:03:19 -08:00
parent cf19f559dd
commit 0f17f9279b
2 changed files with 12 additions and 5 deletions

View file

@ -4,15 +4,15 @@
- title: GitHub
href: https://github.com/facebook/rocksdb/
category: github
category: external
- title: API (C++)
href: https://github.com/facebook/rocksdb/tree/master/include/rocksdb
category: api
category: external
- title: API (Java)
href: https://github.com/facebook/rocksdb/tree/master/java/src/main/java/org/rocksdb
category: api
category: external
- title: Support
href: /support.html
@ -24,4 +24,7 @@
- title: Facebook
href: https://www.facebook.com/groups/rocksdb.dev/
category: facebook
category: external
# Use external for external links not associated with the paths of the current site.
# If a category is external, site urls, for example, are not prepended to the href, etc..

View file

@ -11,7 +11,11 @@
<ul>
{% for item in site.data.nav %}
<li class="navItem{% if page.collection == item.category or page.category == item.category %} navItemActive{% endif %}">
<a href="{{ item.href }}">{{ item.title }}</a>
{% if item.category == "external" %}
<a href="{{ item.href }}">{{ item.title }}</a>
{% else %}
<a href="{{ item.href | relative_url }}">{{ item.title }}</a>
{% endif %}
</li>
{% endfor %}
{% if site.searchconfig %}