-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hi,
I'm not sure if this is the correct place to post this, please redirect me if I'm wrong.
We have a grunt setup to create our api documentation (http://api.meteomatics.com).
The main content pages have a handlebar header as follows:
---
title: Overview
sortOrder: 0
---
Our news blog entries like so:
---
title: "Model Output Statistics (MOS) is now available in our API" # 'to change' - Title for news blog always inside of ""
posted: "2018-04-06T12:00Z" # 'to change' - Posted Date (Format YYYY-MM-DDTHH:mmZ) UTC Time
linkforid: "2018-04-06Mos" # 'to change' - Link to scroll to this news blog, has to be unique
notInNav: true # 'keep this' - it hides the news blog in the side navigation, but it is still in the News tab
post: true # 'keep this if' - true shows this news blog, false hide it
---
Then we build our navbar using #withSort:
<ul class="nav navbar-nav">
{{#isnt page.data.notInNav true}}
{{#withSort pages 'data.sortorder'}}
{{#isnt data.notInNav true}}
<li {{#is ../../page.dest this.dest}} class="active"{{/is}}><a href="{{filename}}" >{{data.title}}{{#is pagename "Search.html"}}<span style="float:right; margin-right: 30px;">🔍</span>{{/is}}</a>
</li>
{{/isnt}}
{{/withSort}}
{{else}}
{{#withSort pages 'data.sortorder'}}
{{#isnt data.notInNav true}}
<li {{#is ../../page.title 'Available Parameters'}}
{{#is this.dest "dest/Available-Parameters.html"}}
class="active"
{{/is}}
{{/is}}><a href="{{filename}}" >{{data.title}}
</li>
{{/isnt}}
{{/withSort}}
{{/isnt}}
</ul>(I removed some content to make the example smaller)
This works all fine with up to 41 input pages. As soon as I add the 42nd (The 10th news blog entry), the sorting breaks and the navigation is in alphabetical order.
Does anyone have an Idea, what this could be?
Metadata
Metadata
Assignees
Labels
No labels