Skip to content

Commit e97b62d

Browse files
committed
More explicit sidebar item sorting
1 parent 657c888 commit e97b62d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

_includes/sidebar.html

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@
1313

1414
{% comment %}
1515
The code below dynamically generates a sidebar nav of pages with
16-
`layout: page` in the front-matter. See readme for usage.
16+
`sidebar_order` set in the front-matter.
1717
{% endcomment %}
1818

19-
{% assign pages_list = site.pages | sort:"url" %}
19+
{% assign pages_list = site.pages | sort:"sidebar_order" %}
2020
{% for node in pages_list %}
21-
{% if node.title != null %}
22-
{% if node.layout == "page" && node.url != 'posts.html' %}
23-
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ node.url | absolute_url }}">{{ node.title }}</a>
24-
{% endif %}
21+
{% if node.sidebar_order != null %}
22+
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ node.url | absolute_url }}">{{ node.title }}</a>
2523
{% endif %}
2624
{% endfor %}
2725

about.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
layout: page
33
title: About
4+
sidebar_order: 999
45
---
56

67
Chris Glein is a Seattle area [game designer](https://boardgamegeek.com/boardgamedesigner/120507/chris-glein) and [artist](https://boardgamegeek.com/boardgameartist/120507/chris-glein). You can find him monthly with the Seattle Tabletop Game Designers at [Blue Highway Games](https://www.bluehighwaygames.com/events/events-schedule/)'s industry meet up, playing and creating all sorts of game prototypes. He is endlessly looking for new and interesting ways to pair theme and mechanics so that he has an excuse to draw more pictures and put them on cards.

games.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Game Design
33
description: My game design projects
44
layout: page
55
thumbsurl: media/thumbnails
6+
sidebar_order: 1
67
---
78
<style type="text/css" rel="stylesheet">
89
img {

0 commit comments

Comments
 (0)