Skip to content

Commit

Permalink
Make the header links a bit more flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelMarcey committed Nov 8, 2016
1 parent cf19f55 commit 0f17f92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 7 additions & 4 deletions docs/_data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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..
6 changes: 5 additions & 1 deletion docs/_includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ <h2>{{ site.title }}</h2>
<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 %}
Expand Down

0 comments on commit 0f17f92

Please sign in to comment.