Skip to main content
this section: | noindex |

Layout templates

~4 m

The tmpl/ partials build the structural scaffolding of every page: the <head>, navigation, footer, SEO metadata, taxonomies, and pagination. They are called from Hugo base templates (baseof.html, home.html, list.html, single.html), not from content shortcodes.

Content authors do not call these directly. Developers extending the theme can override any of them by placing an identically-named file in their site’s layouts/_partials/tmpl/ folder.


Head and assets

PartialPurpose
head.htmlAssembles the full <head> element — calls head-css, head-js, head-favicons, head-seo, page-description. Writes the robots meta: noindex, nofollow when the page sets noindex: true, otherwise index, follow
head-css.htmlInjects theme CSS; includes theme-init.js inline before CSS to prevent flash of wrong theme
head-js.htmlInjects JavaScript includes for libraries enabled in params.yaml
head-favicons.htmlFavicon link tags derived from the site logo: a raster logo is packed into a 32×32 icon and a 180×180 apple-touch-icon; an SVG logo is linked as the icon, with the PNGs packed from a .png beside it — no PNG there warns pihuw-favicon-svg-no-png
head-seo.htmlCanonical URL, Open Graph and Twitter card meta. Suppress with ui.hide.seo
body-scripts.htmlDeferred scripts injected just before </body>

Keeping a page out of search engines

Two front matter settings, which do different jobs:

Front matterEffect
noindex: trueThe robots meta says noindex, nofollow and the page is left out of sitemap.xml. Search engines that find the URL some other way — a link posted elsewhere, a printed URL — leave it out of their results. The page is still listed on the site
build: {list: never}Hugo leaves the page out of every page collection: section lists, childbars, menus built from pages, RSS and the sitemap. The page is still built at its URL

For a page only people with the link should find, set both. See the noindex example .

PartialPurpose
navbar.htmlTop navigation bar — delegates to the three responsive breakpoint partials
navbar-brand.htmlSite logo and name in the navbar
navbar-btn-basic.htmlA single nav item with no children
navbar-btn-parent.htmlA nav item that has a dropdown of child links
navbar-lang-selector.htmlLanguage switcher dropdown (multi-language sites)
navbar-s-smallscreen.htmlNavbar layout for small screens (< 500px)
navbar-m-mediumscreen.htmlNavbar layout for medium screens (500–1100px)
navbar-w-widescreen.htmlNavbar layout for wide screens (> 1100px)
breadcrumb.htmlPage breadcrumb trail
sidebar.htmlLeft or right sidebar wrapper
sidebar-tree.htmlTree-style navigation listing in the sidebar; hidden with Params.ui.hideSidebar
childbar-horizontal.htmlHorizontal list of child-section links; hidden with Params.ui.hideChildbar
search-input.htmlSearch input field

Page content frame

PartialPurpose
page-title.htmlPage heading and subtitle area
page-title-blog.htmlBlog-specific page heading with date and reading time
page-description.html<meta name="description"> tag — SEO page summary
page-meta-lastmod.htmlLast-modified date badge
page-meta-links.htmlEdit-on-GitHub and similar source links
reading-time.htmlCalculates and renders estimated reading time
toc.htmlTable of contents for the current page
section-index.htmlAuto-generated index of child pages in a section
numbered-header.htmlNumbered heading renderer — called by the H shortcode
PartialPurpose
footer.htmlThe footer, two rows: pihuw version (1/3) and ui.footer.links credits (2/3), then the build metadata across the width. One column below the -s breakpoint
footer-left.htmlBuild metadata items for row 2 — site title, version, mod and build dates, each behind a ui.footer.show* flag
footer-right.htmlGitHub source item appended to row 2 — icon, source: view · edit · issue, when github.url and github.repo are set

Pagination

PartialPurpose
pagination.htmlPage-level pagination for list pages
pager.htmlPrevious / next navigation between sibling pages

Taxonomy

PartialPurpose
taxonomy-tags-logic.htmlDecides which taxonomies to show on a page and calls taxonomy-tags for each
taxonomy-tags.htmlRenders the tag/category labels for a single taxonomy
taxonomy-display-class.htmlReturns the CSS class for a taxonomy label
taxonomy-display-label.htmlReturns the display text for a taxonomy term
taxonomy_terms_cloud.htmlTag cloud for a single taxonomy
taxonomy_terms_clouds.htmlAll configured taxonomy clouds on one page

Data and utilities

PartialPurpose
get-blogs-date.htmlReturns all blog pages sorted newest-first
get-version-data.htmlFirst entry of the site’s own data/releases.yaml (empty dict if none) — the footer’s site version
outputformat.htmlHandles alternate output formats (RSS, JSON)
dbg-template-comment.htmlEmits an HTML comment with the current template name — server only