Okay, I think I understand the problem better now. Whenever you add a page, it adds it to the menu for you and you do not want that, correct?
The challenge here is that you are using the Minima theme and you will need to overwrite some of the code to accomplish this, which is super simple.
I see you have some YAML code in your site already that says nav:true
, but I worry you used that all over the place and I’m not sure if you planned on using that for the menu or something else.
First, in the pages you want to appear in the menu, add another piece of YAML front matter and call it something like siteNav
(it doesn’t really matter what you call it), then add that with the value of true
. You do not need to go and edit all the other pages because by default, they will be false
.
Farabi.md
---
layout: page
title: Farabi's emanation scheme
permalink: /Farabi
nav: true
siteNav: true
---
This is a test page.
Now, you will need to modify the /_includes/header.html
for your site. Unfortunately, you are working with a GEM-based theme, so you will have to override the theme or that one file. Follow the instructions to get that file (or the whole theme) onto your site. Personally, I like to override the theme because then I have full control and honestly they rarely change (plus if they do, they might change to your dismay )
Now that you [at least] have the _includes/header.html
code in your site, you can add two extra lines of code that check for the siteNav
YAML item. There are nicer ways to do this so you don’t end up with lots of if
statements, but this will get you what I believe you are looking for.
/_includes/header.html
{% comment %} Create a navigation pane {% endcomment %}
{%- if page_paths -%}
<nav>
<ul>
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
{%- if my_page.siteNav -%}
<li><a class="page-link" href="{{ my_page.url | relative_url }}">{{- my_page.title | escape -}}</a></li>
{%- endif -%}
{%- endif -%}
{%- endfor -%}
</ul>
</nav>
{%- endif -%}
</div>
</header>
Note that you are really only adding the following lines:
{%- if my_page.siteNav -%}
...
{%- endif -%}
Hope that helps