Skip to content

Commit

Permalink
Revert moving doc index outside of docs folder as it is messing up wi…
Browse files Browse the repository at this point in the history
…th menu/etc.
  • Loading branch information
astorije committed Nov 3, 2018
1 parent 904ae18 commit 56af2ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
File renamed without changes.
5 changes: 4 additions & 1 deletion _includes/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
{% for node in docs %}
{% assign level = (node.relative_path | split: '/' | size) %}
{% if level == 2 # Not a subfolder %}
<a href="{{ site.baseurl }}{{ node.url }}"{% if page.url == node.url %} class="active"{% endif %}>
<a
href="{{ site.baseurl }}{{ node.url | remove: "/index" }}"
{% if page.url == node.url %}class="active"{% endif %}
>
{{ node.title }}
</a>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion js/search_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ window.search_data = {
{%- assign documents = site.documents | concat: site.pages %}
{%- for document in documents %}
{%- unless document.title %}{% continue %}{% endunless %}
"{{ document.url | remove: ".html" }}": {
"{{ document.url | remove: ".html" | remove: "/index" }}": {
"title": "{{ document.title | xml_escape }}",
"category": "{{ document.category | xml_escape }}",
"content": {{ document.content | newline_to_br | strip_newlines | replace: "<br />", " " | strip_html | jsonify }}
Expand Down

0 comments on commit 56af2ff

Please sign in to comment.