Use this guide when your site is already published and you have a page to link to. If the page does not exist yet, create it first. A menu entry does not create a page.
Edit the link
- Open the page on your website and note its path. For the starter’s About page,
use
/about/. For a site athttps://ana.github.io/my-blog/about/, the menu value is still/about/: the theme adds the site’sbaseurl. - In your repository’s Code tab, open
_config.ymland click the pencil. Find the existingnavbarsection and itsnavlist. - Change the matching entry’s
titleorurl. If it is a new destination, add one entry to that list. Keep other links and the existingbrand,styleandexpandsettings. Do not add a secondnavbarsection.
For example, the nav list for Home and About is:
navbar:
nav:
- title: Home
url: /
- title: About
url: /about/
This example shows the link list, not a replacement for your complete navbar
section. Match the indentation of your existing entries and change the example
label and path for your page.
Publish and check
Save with Commit changes on your publishing branch. Wait for the run in Actions to succeed, then open your website from Settings > Pages. Open the menu on a narrow screen and follow the edited link. Check that it opens the intended page, including on a site with a repository path.
If it opens a missing page, check the page’s published address and its permalink.
If the old link remains, follow the publishing checks.
For dropdown links and navbar style options, consult the navbar reference.