My blog is built with Jekyll on Github. In the navigation bar, the default order is Pages, Messages, About, Archives. I want to change the list to Pages, Archives, About, Messages. What should I do?
I think it is related to the code below
{% assign pages_list = site.pages %}
I think site.pages
is what I should change, but I don't know how.
You can use gem 'jekyll-redirect-from' in jekyll to set different homepage than index. html and also customize output URL of any xxxx. html. As a result, www.website.com/about will redirect to www.website.com and content of about.
You can create custom order of your menu items like this:
--- layout: default published: true title: Page title order: 1 ---
{% assign sorted_pages = site.pages | sort:"order" %} {% for node in sorted_pages %} <li><a href="{{node.url}}">{{node.title}}</a></li> {% endfor %}
You'll end up with an ordered (ASC) list of pages, based on the 'order' field value you add to each page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With