Skip to content

Commit

Permalink
Fix docs front page (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronDewes authored Nov 14, 2023
1 parent 309bd35 commit 8ad802a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions _layouts/docs.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,22 @@ layout: default
{{ content }}

{% for doc in collections.docs %}
{% if docs.data.next == doc.fileSlug %}
{% if not docs.fileSlug %}
{% assign currentSlug = "README" %}
{% else %}
{% assign currentSlug = docs.fileSlug %}
{% endif %}
{% if not docs.data.next %}
{% assign nextSlug = "hello-world" %}
{% else %}
{% assign nextSlug = docs.data.next %}
{% endif %}

{% if nextSlug == doc.fileSlug %}
{% assign next = doc %}
{% endif %}

{% if doc.data.next == docs.fileSlug %}
{% if doc.data.next == currentSlug %}
{% assign previous = doc %}
{% endif %}
{% endfor %}
Expand Down

0 comments on commit 8ad802a

Please sign in to comment.