Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dev docs] Fix previous and next page links #1601

Merged
merged 1 commit into from
Jul 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions docs/_docs/development/cell-node-lifecycle.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/_docs/development/collection-animations.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/_docs/development/collection-asynchronous-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Collections and asynchronous updates
layout: docs
permalink: /development/collection-asynchronous-updates.html
prevPage: layout-specs.html
---

# At a glance
Expand Down
2 changes: 2 additions & 0 deletions docs/_docs/development/how-to-debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: How to debug issues in Texture
layout: docs
permalink: /development/how-to-debug.html
prevPage: how-to-develop.html
nextPage: threading.html
---

# Debug
Expand Down
7 changes: 0 additions & 7 deletions docs/_docs/development/structure.md

This file was deleted.

4 changes: 1 addition & 3 deletions docs/_docs/development/threading.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
title: Threading
layout: docs
permalink: /development/threading.html
prevPage: how-to-develop.html
prevPage: how-to-debug.html
nextPage: node-lifecycle.html
---

# Threading

## At a glance

The Texture philosophy is about efficient utilization of resources in order to provide a high frame rate user experience. In other words, an almost scientific approach to distributing work amongst threads keeps the Default Run Loop lean to allow user input events and to consume work scheduled on the main dispatch queue.
Expand Down
36 changes: 29 additions & 7 deletions docs/_layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<div class="content">
<h1>
{{ page.title }}
{{ page.title }}
</h1>
<p>{{ page.description }}</p>

Expand All @@ -23,12 +23,34 @@ <h1>


<div class="docs-prevnext">
{% if page.prevPage %}
<a href="/docs/{{ page.prevPage }}">&larr; Prev</a>
{% endif %}
{% if page.nextPage %}
<a class="right" href="/docs/{{ page.nextPage }}">Next &rarr;</a>
{% endif %}
{% if page.prevPage %}
{% comment %}
If prevPage already contains the dir, either /docs/ or /development/, don't append to it.
Otherwise, it's a relative path so append the dir according to the page's permalink.
{% endcomment %}

{% if page.prevPage contains '/docs/' or page.prevPage contains '/development/' %}
<a href="{{ page.prevPage }}">&larr; Prev</a>
{% elsif page.permalink contains '/docs/' %}
<a href="/docs/{{ page.prevPage }}">&larr; Prev</a>
{% else %}
<a href="/development/{{ page.prevPage }}">&larr; Prev</a>
{% endif %}
{% endif %}

{% if page.nextPage %}
{% comment %}
Same deal for nextPage.
{% endcomment %}

{% if page.nextPage contains '/docs/' or page.nextPage contains '/development/' %}
<a class="right" href="{{ page.nextPage }}">Next &rarr;</a>
{% elsif page.permalink contains '/docs/' %}
<a class="right" href="/docs/{{ page.nextPage }}">Next &rarr;</a>
{% else %}
<a class="right" href="/development/{{ page.nextPage }}">Next &rarr;</a>
{% endif %}
{% endif %}
</div>

<a id="_"></a>
Expand Down