Skip to content

Commit

Permalink
Use position_number instead of position
Browse files Browse the repository at this point in the history
  • Loading branch information
rycoll committed Aug 21, 2019
1 parent c075f68 commit 513ed00
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ Aviator is already optimised for adding, updating and removing documentation pag
### Usage

* Each section is a different collection, this helps organise your content.
* Set the order of the collections with the position field in collection configuration in `_config.yml`.
* Set the order of the documents inside a collection by setting the position in front matter.
* Set the order of the collections with the position_number field in collection configuration in `_config.yml`.
* Set the order of the documents inside a collection by setting the position_number in front matter.

### Search

Expand Down
2 changes: 1 addition & 1 deletion _api/_defaults.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title:
position:
position_number:
parameters:
- name:
content:
Expand Down
2 changes: 1 addition & 1 deletion _api/books_add.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: /books
position: 1.1
position_number: 1.1
type: post
description: Create Book
parameters:
Expand Down
2 changes: 1 addition & 1 deletion _api/books_delete.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: /books/:id
position: 1.5
position_number: 1.5
type: delete
description: Deletes a book
parameters:
Expand Down
2 changes: 1 addition & 1 deletion _api/books_get.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: /books/:id
position: 1.3
position_number: 1.3
type: get
description: Get Book
parameters:
Expand Down
2 changes: 1 addition & 1 deletion _api/books_list.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: /books
position: 1.0
position_number: 1.0
type: get
description: List all books
parameters:
Expand Down
2 changes: 1 addition & 1 deletion _api/books_update.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: /books/:id
position: 1.4
position_number: 1.4
type: put
description: Update Book
parameters:
Expand Down
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ timezone: Etc/UTC
collections:
documentation:
title: Documentation
position: 1
position_number: 1
api:
title: APIs
position: 2
position_number: 2
plugins:
- jekyll-sitemap
- jekyll-seo-tag
Expand Down
2 changes: 1 addition & 1 deletion _documentation/_defaults.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title:
position:
position_number:
parameters:
- name:
content:
Expand Down
2 changes: 1 addition & 1 deletion _documentation/authentication.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Authentication
position: 2
position_number: 2
parameters:
- name:
content:
Expand Down
2 changes: 1 addition & 1 deletion _documentation/errors.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Errors
position: 3
position_number: 3
parameters:
- name:
content:
Expand Down
2 changes: 1 addition & 1 deletion _documentation/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Getting Started
position: 1
position_number: 1
parameters:
- name:
content:
Expand Down
4 changes: 2 additions & 2 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div id="sidebar" class="sidebar">
{% assign sorted_collections = site.collections | sort: "position" %}
{% assign sorted_collections = site.collections | sort: "position_number" %}
{% for collection in sorted_collections %}
{% if collection.label != "posts" %}
<section>
<h6>{{ collection.title }}</h6>
<ul>
{% assign sorted_docs = collection.docs | sort: "position" %}
{% assign sorted_docs = collection.docs | sort: "position_number" %}
{% for doc in sorted_docs %}
<li>
<a href="{% if page.url != '/' %}/{% endif %}#{{ doc.id | replace: '/', '' | replace: '.', '' }}">
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: API Docs
---
{% assign sorted_collections = site.collections | sort: "position" %}
{% assign sorted_collections = site.collections | sort: "position_number" %}
{% for collection in sorted_collections %}
{% assign sorted_docs = collection.docs | sort: "position" %}
{% assign sorted_docs = collection.docs | sort: "position_number" %}
{% for doc in sorted_docs %}
<section class="doc-content">
<section class="left-docs">
Expand Down

0 comments on commit 513ed00

Please sign in to comment.