Add sort key to pages

Signed-off-by: trivernis <trivernis@protonmail.com>
gh-pages
trivernis 3 years ago
parent d7ccb57b8b
commit b041bc934a
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -11,7 +11,8 @@
<div class="clearfix border-bottom-thick header-border"> <div class="clearfix border-bottom-thick header-border">
<ul class="list-reset right py-1 header-text font-smoothing"> <ul class="list-reset right py-1 header-text font-smoothing">
{% for my_page in site.pages %} {% assign pages = site.pages | sort: "sort_index" %}
{% for my_page in pages %}
{% if my_page.title %} {% if my_page.title %}
<li class="inline-block"> <li class="inline-block">
<a class="align-middle link-primary header-link mr-2" href="{{ my_page.url | prepend: site.baseurl }}">{{ <a class="align-middle link-primary header-link mr-2" href="{{ my_page.url | prepend: site.baseurl }}">{{

@ -2,6 +2,7 @@
layout: page layout: page
title: About title: About
permalink: /about/ permalink: /about/
sort_index: 1000
--- ---
The theme of this page is based on the [swiss](https://github.com/broccolini/swiss) jekyll The theme of this page is based on the [swiss](https://github.com/broccolini/swiss) jekyll

@ -2,6 +2,7 @@
layout: page layout: page
title: Docs title: Docs
permalink: /docs/ permalink: /docs/
sort_index: 1
--- ---
<div> <div>

@ -2,6 +2,7 @@
layout: page layout: page
title: Posts title: Posts
permalink: /posts/ permalink: /posts/
sort_Index: 10
--- ---
<div class="container mx-auto px-2 py-4"> <div class="container mx-auto px-2 py-4">

Loading…
Cancel
Save