Content-wrapper attrs are only supported in the inline --- { ... } form.
Standalone Goldmark attr lines must remain with their preceding block so
blockquote/list/image attrs reach Hugo render hooks intact.
layouts/partials/page/sections/contract.html
page/sections/contract.html
Builds a normalized semantic/rendering contract for one authored section.
Inputs:
Root, Page, Index, Section: current render context and raw section source.
inherited style/class defaults and section margin parameters from main.html.
Output:
JSON object with section ids, class tokens, semantic axes, content/media block ids,
section body, media metadata, style attributes, editor metadata, and compatibility fields.
Boundary:
This partial computes intent; render.html emits the final DOM.
layouts/partials/page/sections/index.html
page/sections/index.html
Top-level section rendering coordinator.
Inputs:
Root: root template context.
Page: current Hugo page.
section class defaults, class groups, conditional rules, margin/style params.
Responsibilities:
obtains source sections from source-sections.html;
builds one section contract per authored section with contract.html;
prepares editor metadata and inline figure numbering context;
delegates final DOM output to render.html;
writes the page-level editor data contract used by browser editing surfaces.
layouts/partials/page/sections/render.html
page/sections/render.html
Emits the final section DOM from a section contract.
Inputs:
section ids, class string, flow, media metadata, section body, style attrs,
live editor metadata, and legacy partial compatibility fields.
Responsibilities:
renders the semantic section wrapper and content/media nodes;
preserves editor-facing data-ql-* identities;
routes section media through the shared media/figure pipeline;
keeps legacy section partials working while new section axes remain canonical.
Local SVGs must be rendered inline through figure/svg.html, never as <img>.
Otherwise SVG-embedded TeX ($...$, $$...$$) will not be transformed.
layouts/partials/media/utils
layouts/partials/media/utils/find.html
partials/media/utils/find.html
Find & classify a media destination.
Input:
dict{
“Destination”: string
“Page”: .Page (page object)
}
Returns dict:
{
“src”: string // usable src (rel URL if local)
“rel”: string // relPermalink when local
“ext”: string // extension incl. dot, lowercase
“type”: string // one of: youtube,pdf,svg,html,model,image,image-external,video,video-external,external
“resource”: any // Hugo resource (when local)
“external”: bool // true if http(s)
}
Rules for HEIC/HEIF:
If a JPEG/JPG sibling with the same basename exists in the bundle, return THAT resource
and set ext to “.jpeg” (or “.jpg” per the resource subtype).
If no JPEG sibling resource exists, rewrite the src string to “.jpeg” (resource=false),
so callers still emit an , but without Resize.
Head And Runtime
layouts/partials/head
No leading Hugo template comment docstrings found in this directory.
layouts/partials/head/import
layouts/partials/head/import/runtime-core.html
Critical runtime/editor imports. Keep these explicit and ordered.
Site overrides should import this partial rather than hand-rolling core JS tags.
Views
layouts/partials/views
layouts/partials/views/latest.html
This partial is called by _default/list.html
In the future, this could be called elsewhere, such as sidebar or home as a featured article
@first: class attributes
@right: class attributes
@left: class attributes
@summary: bool
@authors: bool
@date: bool
@figure: bool
@timeFormat: timeFormat
@width: int
@title: string
layouts/partials/views/summaries.html
summary.html partial documentation
This partial renders a list of page summaries, sorted by shared ordered-page
logic, slug, or date.
Sorting:
• ordered mode (default): uses shared ordered-pages logic:
weight first, then front matter date, then file modification time.
• slug mode: orders all pages by the base name of .RelPermalink.
• date mode:
- pages are sorted by Date descending.
Implementation:
1. Builds a slice of dicts: each dict contains:
- Page: the Page object
- Name: basename of .RelPermalink
2. Depending on .Params.Summaries.sort (“ordered”, “slug”, or “date”), computes the final $pages slice.
3. Loops over $pages, setting:
- loading: “eager” for the first item, “lazy” for others.
- class: CSS classes for first, even, odd items (using .Params.Summaries.first, .right, .left).
4. Merges global .Params.Summaries into each dict and invokes the “views/summary” partial.
Parameters (merged into $dict for partial “views/summary”):
- Page *Page : The Hugo Page object being rendered.
- class string : CSS classes for summary container.
- loading string : Image loading attribute (“eager” or “lazy”).
- first string : CSS classes for the first summary.
- right string : CSS classes for summaries with even index (excluding first).
- left string : CSS classes for summaries with odd index (excluding first).
- summary bool : Show or hide summary text.
- authors bool : Show or hide authors list.
- date bool : Show or hide date.
- figure bool : Wrap thumbnail in a element.
- timeFormat string : Go time.Format layout for displaying dates.
- width int : Width in pixels for thumbnail images.
layouts/partials/views/summary.html
views/summary.html
Renders one summary card for a page in list/section output.
Inputs:
Page: page to summarize.
path: optional page path relative to the current page.