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

Add weight flag for pages to allow sort navbar. #392

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<li>
<a href="{{ site.baseurl }}/">Home</a>
</li>
{% for page in site.pages %}
{% assign sorted_pages = site.pages | sort: "weight" %}
{% for page in sorted_pages %}
{% if page.title and page.hide-in-nav != true %}
<li>
<a href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
Expand Down
1 change: 1 addition & 0 deletions about.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
weight: 0
layout: page
title: "About"
description: "你是我的梦想"
Expand Down
1 change: 1 addition & 0 deletions archive.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
weight: 1
title: Archive
layout: default
description: keep hungry keep foolish
Expand Down