The navbar is rendered by layouts/partials/sections/header.html on every page.
/#about, /#experience, …).menu.main).params:
favicon: "/fav.png"
navbar:
brandLogo: "/logo.png" # default: params.favicon
showBrandLogo: true # false hides the logo
brandName: "My Name" # default: params.title
navbar:
align: ms-auto # ms-auto = right (default), mx-auto = centre, me-auto = left
stickyNavBar:
enable: true
showOnScrollUp: true # only show the sticky bar when scrolling up
enableSeparator: false # thin divider between section links and custom links
A link is shown when its section is enable: true and the matching flag below is not true:
navbar:
menus:
disableAbout: false
disableExperience: false
disableEducation: false
disableProjects: false
disableAchievements: false
disableContact: false
The link text is the section’s title or, if empty, the translation keys nav_about, nav_experience, nav_education, nav_projects, nav_achievements, nav_contact.
Use Hugo’s menu configuration. With multiple languages, define the menu under each language (as exampleSite/hugo.yaml does); for a single language you can use top-level menus:
menus:
main:
- identifier: blog
name: Blog
title: Blog posts
url: /blogs
weight: 1
- identifier: gallery
name: Gallery
title: Image gallery
url: /gallery
weight: 2
Give children a parent equal to the parent’s identifier:
menus:
main:
- identifier: dropdown
name: Dropdown
title: Example dropdown menu
weight: 3
- identifier: dropdown1
name: Example 1
title: Example dropdown 1
url: /#
parent: dropdown
weight: 1
pre can hold an icon or HTML that is printed before the name.
It queries /index.json, produced by layouts/_default/index.json for every regular page (title, description, content, image, permalink). The home page must output JSON:
outputs:
home: ["HTML", "RSS", "JSON"]
static/js/search.js debounces typing (300 ms), matches the query case-insensitively against title, description and content, HTML-escapes results and only links to http(s) URLs.Customise or remove:
params:
navbar:
disableSearch: true # remove search entirely (also skips search.js)
searchPlaceholder: "Search" # default comes from i18n key `search_placeholder`
.Site.Home.RelPermalink + index.json), so results are language-specific.A sun/moon button toggles the dark class and stores the choice in localStorage (pref-theme). See Color Customization for default theme and disabling the button.
See Internationalization.
layouts/404.html shows static/404.png and the translated text from params.terms.pageNotFound or the page_not_found i18n key.