gohugoio/hugo
52.0
Adequate · 6 August 2026
107.7k
lines of production code
Go
primary language
3
measurements over time
What this system is
Hugo is a static site generator that provides a comprehensive framework for building websites from content, templates, and assets. The system manages the entire build lifecycle, including content parsing, multi-format markup rendering, and resource processing such as image manipulation and CSS/JS bundling. It features a modular architecture with extensive template functions for data manipulation, security policies, and deployment capabilities.
How it got here
2013–2018 — Template function expansion and internal refactoring
67 changes.
This period focused on significantly expanding the template function namespace with new utilities for cryptography, encoding, images, and string manipulation. Concurrently, the codebase underwent extensive internal refactoring, including a centralized dependency container, a new template descriptor system, and improved error reporting. The work also introduced features like related content, minification configuration, and privacy settings, while updating dependencies to Go 1.26.0.
2019–2020 — Resource and markup modernization
56 changes.
This period focused on modernizing Hugo's resource and markup systems, introducing Go Modules for dependency management, and replacing the Blackfriday Markdown engine with Goldmark. The work also added new capabilities for JavaScript and CSS bundling, image processing, and external content rendering.
2021–2026 — Architecture modernization and security hardening
54 changes.
This period focused on modernizing Hugo's internal architecture by introducing a unified configuration system, a new multi-dimensional site matrix, and a structured logging framework. Concurrently, the project significantly improved security through default policies for external tools and HTTP requests, while also removing the legacy Blackfriday engine and consolidating various utility packages.
Features
Add AVIF image format support
The internal/warpc module now supports encoding and decoding AVIF images via a new C-based WebAssembly binary built from libavif, aom, and dav1d. This adds a new image processing pipeline for AVIF, including integration tests for color property preservation, animated image handling, and memory error recovery. The implementation includes a new \avif.go\ codec, associated integration and color tests, and build scripts for the WASM target.
internal/warpc · high confidence
Add Babel JavaScript transpilation support
Hugo now supports transpiling JavaScript using Babel. Users can apply the new \babel\ resource transformation in templates (e.g., \`{{ resources.Get
_resources/resource\transformers/babel · high confidence
Add CSS @import inlining and TailwindCSS support
Hugo now supports inlining of CSS @import statements, allowing stylesheets to be merged during the build process. This is exposed via the new \css.PostCSS\ and \css.TailwindCSS\ functions, which accept an \inlineImports\ option to enable this behavior. For TailwindCSS, a new \disableInlineImports\ option is available to prevent inlining when needed. The implementation includes a new \importResolver\ that recursively processes imports, with support for an \importContext\ to resolve imports from in-memory resources. Tests confirm that missing imports can be handled gracefully via the \skipInlineImportsNotFound\ option.
_resources/resource\transformers/cssjs · high confidence
Add CSS string type definitions
Added new Go types, QuotedString and UnquotedString, to the common/types/css package. These types distinguish between CSS strings that require quoting and those that do not, providing a more explicit type system for handling CSS string literals in the template engine.
common/types/css · high confidence
Add Dart Sass support for CSS transformation
Hugo now supports using Dart Sass as a CSS transpiler. Users can set the 'transpiler' option to 'dartsass' in their configuration or templates to compile SCSS/SASS files using the Dart Sass embedded protocol (v2). This brings new options such as 'vars' for passing variables, 'importContext' for custom imports, and 'silenceDeprecations' to suppress specific deprecation warnings from Dart Sass. The implementation includes a new client and transformer in the 'resources/resource\_transformers/tocss/dartsass' directory, along with helper functions in 'resources/resource\_transformers/tocss/sass/helpers.go' to manage Hugo variables and CSS value typing for both Dart Sass and LibSass.
_resources/resource\transformers/tocss/dartsass · high confidence
Add Emacs Org-Mode support
Users can now convert Emacs Org-Mode files to HTML. This change introduces a new converter in the markup/org package that utilizes the go-org library to parse and render Org-Mode content, including support for highlighting code blocks within the converted output.
markup/org · high confidence
Add Hugo template namespace for site access
A new 'hugo' template namespace has been added to the template functions, allowing templates to access the Hugo site object via the 'Context' function. This change introduces a way for templates to retrieve the current site information through the Hugo integration layer.
tpl/hugo · high confidence
Add OpenAPI 3 template function for unmarshalling API specs
A new \openapi3.Unmarshal\ template function has been added to Hugo, allowing templates to parse OpenAPI 3 (Swagger) specification files (YAML or JSON) into structured objects. The implementation supports resolving external \$ref\ references by fetching remote URLs or loading local files from the assets directory, with optional configuration for remote resource fetching. This enables users to integrate API documentation directly into their Hugo sites.
tpl/openapi · high confidence
Add SVG diagram generation via the Goat library
Users can now generate SVG diagrams from input data using the new \diagrams\ template namespace. The \Goat\ function accepts an \io.Reader\, byte slice, or string to produce an \SVGDiagram\ object, which provides methods to access the full SVG markup, the inner SVG content, and the diagram's dimensions.
tpl/diagrams · high confidence
Add StripHTML template function
The tpl package now includes a new StripHTML function that removes HTML tags from strings, exposing this capability to templates. A corresponding test suite validates the stripping behavior across various HTML structures and edge cases.
tpl · high confidence
Add citation support for Pandoc
The Pandoc converter now supports citations and bibliographies. When rendering content, Pandoc is invoked with the \--citeproc\ flag, enabling the processing of citation keys and bibliography data. This allows users to include in-text citations and reference lists in their posts when using the Pandoc markup handler.
markup/pandoc · high confidence
Add colored terminal output and progress reporting
The terminal package now supports colored output for ERROR, WARNING, and NOTICE log levels, with colors applied only when the output is a terminal and the NO\_COLOR environment variable is not set. Additionally, the terminal now supports OSC 9;4 progress reporting sequences for build status updates.
common/terminal · high confidence
Add configuration options for Asciidoctor integration
The Hugo Asciidoctor integration now exposes a dedicated configuration struct (Config) that allows users to control Asciidoctor behavior. This includes setting the output backend (e.g., html5, docbook5), enabling section numbers, verbose output, and trace mode. Users can also configure safe mode levels (unsafe, safe, server, secure), failure levels (fatal, warn), and manage document attributes. The configuration also supports preserving the table of contents (TOC) and specifying extensions.
_markup/asciidocext/asciidocext\config · high confidence
Add crypto template functions for hashing and HMAC
The tpl/crypto package now provides template functions for cryptographic operations, including MD5, SHA1, SHA256, and a generic Hash function supporting MD5, SHA1, SHA256, SHA384, and SHA512 algorithms. Additionally, an HMAC function is available for creating message authentication codes using MD5, SHA1, SHA256, or SHA512, with optional binary or hex encoding output. These functions are registered in the 'crypto' namespace and can be used in templates to generate checksums or signed messages.
tpl/crypto · high confidence
Add embedded templates for alias redirects, RSS, and sitemaps
Hugo now includes built-in templates for handling URL aliases, generating RSS feeds, and producing XML sitemaps. The new alias.html template performs HTTP redirects to the canonical URL, while rss.xml provides structured feed output with author and date formatting. Additionally, sitemap.xml and sitemapindex.xml templates generate standard-compliant XML sitemaps, including translation links and last-modified dates.
tpl/tplimpl/embedded/templates · high confidence
Add error page template for server-side errors
A new HTML template for rendering error pages in the Hugo server has been added. This template defines the structure and styling for displaying error messages, including code highlighting and file location details, to users when a server-side error occurs.
_tpl/tplimpl/embedded/templates/\server · high confidence
Add hdebug package with debug print and assertion helpers
A new hdebug package has been added to the codebase, providing debug utilities such as Printf, Panicf, and AssertNotNil. These functions are designed to be active during development but will panic if executed in a real CI environment, ensuring that debug statements are not accidentally committed to production code.
common/hdebug · high confidence
Add hqt test helper library
The htesting/hqt package introduces a new set of test helpers for the Hugo test suite, including custom checkers for string, type, float, and number comparisons, as well as utilities for slice equality and deep comparison of unexported fields. This provides a unified testing utility library for internal test code.
htesting/hqt · high confidence
Add inflect template functions for word inflection
Users can now use the new inflect template functions—humanize, pluralize, and singularize—to transform words in templates. The humanize function converts strings to a more readable format, pluralize and singularize handle word forms, and the namespace is now explicitly registered via the internal template functions system.
tpl/inflect · high confidence
Add jsconfig.json builder for editor IntelliSense
A new jsconfig package has been introduced to generate jsconfig.json files, which assist editors with TypeScript/JavaScript IntelliSense. The implementation includes a Builder that collects source roots and produces a configuration with relative paths, while explicitly excluding the deprecated 'baseUrl' setting.
resources/jsconfig · high confidence
Add page template function to access the current Page object
Users can now use the new 'page' template function in templates to access the current Page object, which serves as the entry-level context for the current template. This is implemented in the 'tpl/page' package, which registers the 'page' namespace and provides a function to retrieve the page from the context. An integration test confirms that the page object is correctly available across various template contexts, including shortcodes, partials, and different page types.
tpl/page · high confidence
Add parallel task executor helper
A new \common/para\ package has been introduced to provide a parallel task execution helper. This utility allows users to run multiple tasks concurrently with a configurable number of workers, simplifying the implementation of parallel processing patterns in the codebase.
common/para · high confidence
Add reStructuredText (RST) markup support
Hugo now supports reStructuredText as a markup language. The \markup/rst\ package provides a converter that invokes the external \rst2html\ (or \rst2html.py\) binary to render RST content to HTML. Users can configure syntax highlighting for code blocks via the \markup.rst.syntaxHighlight\ option, which accepts \short\, \long\ (default), or \none\ to control Pygments output. The implementation includes a configuration struct for RST settings and integration tests verifying the rendering behavior across different syntax highlighting modes.
markup/rst · high confidence
Add reflect template functions for type checking
The tpl/reflect package introduces a new 'reflect' namespace in templates, providing functions to check the type of values at runtime. This includes reflect.IsMap and reflect.IsSlice for generic Go types, as well as Hugo-specific checks: reflect.IsPage, reflect.IsResource, reflect.IsSite, reflect.IsImageResource, reflect.IsImageResourceWithMeta, and reflect.IsImageResourceProcessable. These allow template authors to conditionally render content based on the nature of the data, such as distinguishing between different resource types or verifying if a value is a page or site object.
tpl/reflect · high confidence
Add render hooks and support for Obsidian-style blockquote alerts
The Hugo markdown processor now supports rendering blockquotes via template hooks, allowing users to customize the HTML output for standard blockquotes. Additionally, the parser recognizes GitHub-style and Obsidian-style callout headers (e.g., \\[!NOTE\]\, \\[!tip\]\) within blockquotes, exposing alert type, title, and folding state to the template context for custom styling.
markup/goldmark/blockquotes · high confidence
Add render hooks for code blocks and passthrough content
Hugo now supports custom render hooks for fenced code blocks and passthrough content (such as LaTeX or other custom delimiters). For code blocks, the new \render-codeblock-\<language\>.html\ templates receive a context with \.Type\ (language), \.Inner\ (raw content), and \.Attributes\ (e.g., line numbers, classes). For passthrough content, \render-passthrough-\<type\>.html\ templates (inline or block) receive \.Inner\, \.Type\, and \.Ordinal\. This allows users to customize how code and special markup are rendered, enabling features like syntax highlighting, diagram generation, or custom HTML wrappers. The implementation includes new Go files (\render.go\, \passthrough.go\) and integration tests (\codeblocks\_integration\_test.go\, \passthrough\_integration\_test.go\) to verify the new hook behavior.
markup/goldmark/codeblocks · high confidence
Add role and version dimensions to the site matrix
Hugo now supports configuring sites by role and version in addition to language. This introduces new configuration keys for \[roles\] and \[versions\], allowing content to be filtered and served based on user roles (e.g., 'guest', 'member') and specific version numbers. The site matrix now includes these new dimensions, enabling more granular control over content visibility and site structure. This change also includes internal refactoring of the sites matrix to support these new dimensions, with corresponding integration tests verifying the behavior.
hugolib/sitesmatrix · high confidence
Add simple template metrics feature
A new metrics tracking system has been introduced to provide detailed performance insights for template rendering. The \metrics\ package now tracks cumulative, average, and maximum durations for templates, along with cache hit counts and similarity-based cache potential hints. Users can view these metrics in the CLI output, which includes columns for cumulative duration, average duration, maximum duration, cache potential, cache hit percentage, cached count, and total count. The system also includes a \howSimilar\ function to evaluate template similarity for caching hints, and tests have been updated to use \quicktest\.
metrics · high confidence
Add site template function namespace
A new template function namespace named 'site' has been added to the template system. This change allows templates to access the current Site object via the 'site' namespace, providing a dedicated way to interact with site-level data in templates.
tpl/site · high confidence
Add support for HTML attributes and auto-generated IDs for headings and definition terms
Users can now add HTML attributes to block elements like tables and code fences, and headings and definition terms will automatically receive unique IDs. This enables direct linking to specific sections and allows for custom styling or JavaScript hooks. The implementation includes a new 'attributes' extension that processes attribute blocks and generates IDs based on content, handling edge cases like duplicate IDs and stray attributes to prevent crashes.
markup/goldmark/internal/extensions · high confidence
Add test configuration helpers for Hugo
A new testconfig package is introduced to provide helper functions (GetTestConfigs, GetTestConfig, GetTestDeps, GetTestConfigSectionFromStruct) that simplify the creation of test environments. These utilities allow tests to easily instantiate Hugo's configuration and dependency structures, including support for WASM dispatchers and empty environment variables, streamlining the testing process for Hugo's internal components.
config/testconfig · high confidence
Add xxHash and FNV32a template functions
The template system now includes new hashing capabilities via the \hash\ namespace. Users can use \hash.XxHash\ to generate xxHash digests and \hash.FNV32a\ for FNV-1a 32-bit hashes. These functions are exposed in templates, allowing for faster non-cryptographic hashing compared to previous methods like MD5.
tpl/hash · high confidence
Added Markdown table rendering with alignment support
Hugo now provides a new render hook for Markdown tables, allowing users to customize table output via a \render-table.html\ template. The parser extracts table structure (header and body rows) and cell alignment (left, center, right) from the Markdown source, making this data available to the template. This enables full control over table markup and styling. An integration test confirms that alignment attributes and cell content are correctly passed to the hook.
markup/goldmark/tables · high confidence
Added Scratch storage for temporary state
Introduced a new Scratch type in the hstore package, providing a thread-safe key-value store for temporary state during build operations. The implementation includes methods to Set, Get, Add (supporting numeric and string concatenation), Delete, and manage nested maps, ensuring safe concurrent access via mutexes.
common/hstore · high confidence
Added resource transformation helper functions
Introduced new helper functions in the resourcehelpers package to standardize argument resolution for resource transformations. The new ResolveIfFirstArgIsString and ResolveArgs functions provide consistent handling of string and map arguments, improving error messaging and supporting both pipeline behavior and options as arguments in resource transformations.
tpl/internal/resourcehelpers · high confidence
Added support for external content rendering via third-party binaries
Users can now configure Hugo to process content through external helper binaries. A new \ExternallyRenderContent\ function in \markup/internal/external.go\ manages the execution of external commands, capturing stdout/stderr and handling line-feed normalization. The file also includes a \GetPythonBinaryAndExecPath\ helper to locate the Python executable, enabling Python-based external rendering pipelines.
markup/internal · high confidence
Automated JSON marshaling for Page interface
The Hugo build process now automatically generates Go code to implement the JSON marshaling logic for the Page interface. This code generation, located in the page\_generate package, ensures that all types satisfying the Page interface are correctly serialized to JSON, which is required for features like the API or data exports.
_resources/page/page\generate · high confidence
Automated release process for Hugo
The release workflow has been automated via a new \releaser\ package that handles version bumping, commit creation, and environment variable generation for downstream tools. The system now supports alpha, beta, and RC releases, and can operate in a dry-run mode for testing.
releaser · high confidence
Centralized and unified configuration system
Hugo now uses a single, unified configuration struct (allconfig) to manage all settings, replacing the previous fragmented approach. This change introduces a structured, type-safe configuration model that simplifies how options like pagination, content types, and language settings are defined and merged. Users will benefit from more consistent configuration behavior, improved error handling during config loading, and better support for environment variables and complex YAML values. The new system also enables better documentation generation and makes it easier to add new configuration options in the future.
config/allconfig · high confidence
Collect HTML elements and classes for build stats
The publisher now collects HTML tags, classes, and IDs from the generated output. This data is aggregated into the \hugo\_stats.json\ file, enabling tools like PurgeCSS to identify which CSS classes are actually used in the HTML. The collector is integrated into the publishing pipeline, capturing elements from both minified and non-minified HTML, while skipping content inside script, style, pre, and textarea tags to avoid false positives.
publisher · high confidence
Enable template execution on resources via ExecuteAsTemplate
Users can now process resource objects as templates using the new ExecuteAsTemplate function, which parses and executes template strings against resource data. This change introduces a dedicated Client for template processing and adds an integration test verifying multi-language template execution, allowing templates to be dynamically generated from resource content.
_resources/resource\transformers/templates · medium confidence
Introduce 'related content' feature with inverted index and fragment support
Hugo now includes a built-in 'related content' feature that uses an inverted index to find related pages based on configurable indices (such as keywords, dates, and page fragments). Users can configure the related content behavior via the \related\ section in their configuration, specifying indices, weights, thresholds, and fragment filtering. The \Related\ template function and \site.RegularPages.Related\ method are available to retrieve related pages. The implementation includes an \InvertedIndex\ for efficient searching, supports 'basic' and 'fragments' index types, and allows filtering by title fragments. Tests verify cardinality thresholds, search functionality, and integration with Hugo's template system.
related · high confidence
Introduce BaseFs as the core filesystem abstraction
Hugo now uses a new \BaseFs\ struct to manage core filesystems, providing a unified interface for accessing project and theme content, static files, and the publish directory. This change simplifies how Hugo handles file mounts and directory structures, ensuring consistent behavior across different site configurations.
hugolib/filesystems · high confidence
Introduce BaseURL struct and RefLinker interface for URL handling
A new BaseURL struct has been added to the common/urls package, providing structured access to base URL components such as the path, port, and host. This struct supports operations like changing the protocol or port, and includes methods to retrieve the URL with or without the path. Additionally, a RefLinker interface has been introduced to support reference linking functionality, requiring implementations of Ref and RelRef methods.
common/urls · high confidence
Introduce Goldmark as the new default Markdown processor
Hugo now uses the Goldmark library as its default Markdown processor, replacing the previous engine. This change brings support for a wider range of Markdown extensions, including typographic substitutions, footnotes, definition lists, tables, strikethrough, task lists, and CJK (Chinese/Japanese/Korean) text handling. Users can now configure these extensions and adjust settings such as auto-generated heading IDs, linkify protocols, and render hooks directly in their site configuration.
_markup/goldmark/goldmark\config · high confidence
Introduce HTTP cache configuration and polling options
Added a new HTTP cache module that allows users to configure caching behavior for remote resources, including options to respect Cache-Control: no-store headers in both requests and responses. The update also introduces configuration for polling remote resources to detect changes, with customizable low and high interval bounds. This enables more granular control over how Hugo caches and monitors external content.
cache/httpcache · high confidence
Introduce Hugo Modules for dependency management
Hugo now supports Go Modules, allowing users to manage themes and other components as versioned dependencies. This change introduces a new \modules\ package that handles module resolution, configuration, and mounting. Users can now define module imports in \hugo.toml\, specify versions, and use features like vendoring, workspace support, and path replacements. The \hugo mod\ CLI commands are added to interact with these modules. This provides a more robust and standardized way to handle project dependencies and theme management.
modules · high confidence
Introduce \_content.gotmpl for generating pages and resources from Go templates
Users can now create pages and resources by placing a \_content.gotmpl file in a content directory. This new template-based content adapter allows for dynamic page generation using Go templates, with support for adding pages and resources via the template context. The change includes the core implementation in pagesfromgotmpl.go and corresponding integration and unit tests.
hugolib/pagesfromdata · high confidence
Introduce \`hugo mod npm pack\` command for bundling npm dependencies
Hugo now provides a new \hugo mod npm pack\ command that aggregates \package.json\ files from Go modules and their workspaces into a single, auto-generated workspace structure. The implementation in \modules/npm\ reads project and module \package.json\ (and \package.hugo.json\) files, merges their dependencies and devDependencies, and writes the combined output to \packages/hugoautogen/\. This enables users to run standard npm tooling against a unified dependency graph without manually managing multiple package files.
modules/npm · high confidence
Introduce codegen inspector for method extraction
Added the codegen/methods.go file, which introduces an Inspector struct and the MethodsFromTypes method to extract and sort method sets from Go types using reflection and AST parsing. The change also includes corresponding test files (methods\_test.go, methods2\_test.go) that verify the new functionality, including handling of embedded interfaces and method ordering.
codegen · high confidence
Introduce configurable output formats with new configuration schema
The output package is refactored to support a new, flexible configuration schema for output formats. A new \output/config.go\ file introduces \OutputFormatConfig\ and a \DecodeConfig\ function that allows users to redefine existing formats (like JSON) or add new ones (like CSV, Calendar, Markdown, and WebAppManifest) via the site configuration. The \Format\ struct in \output/outputFormat.go\ is expanded with new fields such as \Protocol\, \NotAlternative\, and \Permalinkable\ to control rendering behavior. This change enables users to customize how Hugo generates different output types, such as setting a custom base name, protocol, or path for each format.
output · high confidence
Introduce default security policies for external tools, HTTP requests, and content
Hugo now ships with a new \security\ configuration section that enforces sensible defaults to improve security. External command execution is restricted to a whitelist of trusted tools (e.g., \go\, \git\, \node\, \sass\, \tailwindcss\). Environment variable access is limited to a specific set of safe variables. HTTP requests are restricted to public URLs, blocking localhost and URLs containing user information to prevent SSRF attacks. Node.js tool execution is hardened with a new \--permission\ flag and file system access controls. Additionally, serving \text/html\ content is denied by default to prevent XSS vulnerabilities, and inline shortcodes are disabled by default.
config/security · high confidence
Introduce dynamic partitioned cache for improved rebuilds
The \cache/dynacache\ package introduces a new dynamic, partitioned cache implementation (\dynacache.go\) that supports partitioned storage with configurable weights and eviction policies. This new cache system includes logic to handle resource changes when items are already evicted, prevents multiple concurrent resizes, and manages stale entities more robustly. The change also includes a test suite (\dynacache\_test.go\) covering cache creation, partitioning, clearing, and panic recovery. This underpins the improvements to partial rebuilds and server/watch rebuild issues mentioned in the commit messages.
cache/dynacache · high confidence
Introduce hmaps package with new cache, ordered map, and params utilities
The \common/hmaps\ package has been introduced, consolidating map and cache utilities previously located in \common/maps\. This includes a thread-safe \Cache\ with size limits and lazy initialization, an \Ordered\ map that preserves insertion order, an \OrderedIntSet\ backed by a bitset for efficient integer set operations, and \Params\ helpers for nested parameter handling and deep/shallow merging strategies. The change also includes comprehensive test coverage for these new components.
common/hmaps · high confidence
Introduce identity package for dependency tracking
Added a new identity package that provides mechanisms to identify values within Hugo, primarily for dependency tracking. This includes a thread-safe Finder for searching identities, a Question type for one-time answerable queries, and support for predicate-based identity checks. The implementation includes a caching system for faster lookups and a pool for search IDs to optimize performance.
identity · high confidence
Introduce image processing interfaces and utilities
Added the new \common/himage\ package which defines core interfaces for image handling, including \AnimatedImage\ for supporting animated formats like GIF and WebP, \ImageFrames\ for accessing frame data and durations, and \ColorPropertiesProvider\ for preserving HDR color space information. The package also includes utility functions to convert between GIF delay values and frame durations.
common/himage · high confidence
Introduce js.Batch for bundling and grouping JavaScript resources
A new \js.Batch\ template function is introduced, allowing users to group, configure, and build JavaScript resources in batches. This feature enables bundling multiple scripts, runners, and instances into a single output, with support for setting options like \importContext\, \drop\, \platform\, and \mainFields\. The implementation includes a new \Batcher\ interface and related types in \internal/js/api.go\, alongside the core batching logic in \internal/js/esbuild/batch.go\. This change modifies how JavaScript is processed, shifting from individual file builds to grouped batch builds, which affects how templates interact with the JavaScript build system.
internal/js · high confidence
Introduce new predicate and range-matching logic
A new \common/predicate\ package has been added, providing a generic \PR\[T\]\ type for building complex logical conditions using \And\ and \Or\ operations. This includes support for range matching with operators such as \\>=\, \\<=\, \\>\, \\<\, \==\, and \!=\, enabling users to filter resources based on version or index ranges. The change also introduces helper functions like \Filter\ and \FilterCopy\ to apply these predicates to collections of data.
common/predicate · high confidence
Introduce post-publish resource wrapper for deferred field resolution
A new \postpub\ package is added to the \resources\ directory, introducing a \PostPublishResource\ wrapper that defers the resolution of resource fields (such as Permalink, RelPermalink, Name, Title, and MediaType) by replacing actual values with placeholder strings. This mechanism allows the system to handle post-publish transformations where certain resource properties are not yet available at creation time, ensuring that minifiers and other post-processing steps can safely manipulate these placeholders before final output.
resources/postpub · high confidence
Introduce segment-based rendering control via \`renderSegments\` configuration
Hugo now supports a new \renderSegments\ configuration option that allows users to selectively render specific segments of their site. This feature enables filtering content by dimensions such as language, path, kind, and output format, with support for glob patterns and exclusion rules. The implementation includes a new \segments\ package in \hugolib/segments\ that compiles segment filters and integrates with the build process, including merging \hugo\_stats.json\ when segments are active. Tests confirm that only matching content is rendered, while non-matching paths are excluded from the output.
hugolib/segments · high confidence
Introduce structured contribution guidelines and automated quality checks
The repository now enforces code quality and contribution standards through new tooling and documentation. A new AGENTS.md file provides detailed code and test writing guidelines for contributors, while CONTRIBUTING.md has been updated to reflect the new workflow. To ensure compliance, a new check.sh script automates gofmt, staticcheck, and test execution, and a corresponding check\_gofmt.sh script is added. Additionally, .gitattributes and .gitignore are introduced to standardize line endings and exclude build artifacts, and a .prettierignore file is added to exclude embedded templates from formatting tools.
(repo-wide) · high confidence
Introduce structured versioning with pre-release support
The \common/version\ package now provides a structured \Version\ type that parses and compares version strings, supporting both simple numeric formats (e.g., \v1\, \v2\) and full semantic versioning. It includes logic to identify and handle pre-release suffixes such as \alpha\, \beta\, and \rc\ (e.g., \0.22-DEV\), and offers methods to navigate to the next or previous minor or patch versions.
common/version · high confidence
Introduce template function registry for namespace-based function management
Added a new internal template function registry system that organizes template functions into namespaces, each with method mappings, aliases, and examples. This enables better organization and documentation of template functions, with support for GoDoc information and example generation for Hugo templates.
tpl/internal · high confidence
Introduce the 'hugo new' command for creating new content
Users can now use the 'hugo new' command to generate new content files based on configured archetypes. The command supports both single-file and directory-based (bundle) archetypes, allowing for flexible content creation workflows.
create · high confidence
Introduce unified .Site.Config with a services section
Hugo now provides a unified .Site.Config object that groups configuration for various services, including Disqus, Google Analytics, Instagram, X (formerly Twitter), and RSS feeds. This new structure allows users to configure these services in a single, organized location. The change also maintains backward compatibility by falling back to root-level settings for Google Analytics and Disqus if the new nested configuration is not provided.
config/services · high confidence
Introduces file classification logic for Hugo component folders
A new file classifier is introduced in the Hugo filesystem layer, defining the standard component folders (archetypes, static, layouts, content, data, assets, i18n) and helper functions to identify them. This provides the foundation for the new page store and dynamic cache by correctly categorizing files into their respective Hugo components.
hugofs/files · high confidence
Major image processing refactoring and new filters
The image processing subsystem has been refactored to support a new, extensible filter system. This introduces several new image filters including \images.Text\ for adding text overlays, \images.Overlay\ for compositing images, \images.Mask\ for applying masks, \images.Padding\ for adding borders, \images.AutoOrient\ for EXIF-based rotation, and \images.Dither\ for color quantization. The \ImageConfig\ structure has been reworked to support per-format options (e.g., specific quality or hint settings for WebP and AVIF) and the \Imaging\ global config options are now deprecated in favor of the new structured configuration. Additionally, the \images.Colors\ function is now available to retrieve dominant colors from an image.
resources/images · high confidence
New CSS template functions and improved CSS build integration
Added the css.Build template function, which handles CSS processing with support for @import, url() resolution, and loader options. Introduced css.ChromaStyles to generate Chroma code highlighter stylesheets, including support for light/dark modes and custom mode classes. Added css.TailwindCSS for Tailwind CSS processing. Deprecated libsass in favor of dartsass for CSS transpilation. The css.Build function now supports importContext, externals, and loader options for better control over CSS processing. Added integration tests for CSS build, ChromaStyles, and edit scenarios.
tpl/css · high confidence
New Hugo template functions and environment variables for build and site configuration
The \common/hugo\ package now exposes several new template functions and variables for templates and the CLI: \hugo.IsMultihost\ and \hugo.IsMultilingual\ indicate whether the site is configured for multiple hosts or languages; \hugo.Sites\ provides access to the collection of all site instances; \hugo.BuildDate()\ and \hugo.BuildInfo()\ expose build metadata; \hugo.WorkingDir\ returns the current working directory; and \hugo.IsExtended\/\hugo.IsWithdeploy\ reflect the current build edition. Additionally, the \hugo env\ command now includes non-Go dependencies in its output, and environment variables \HUGO\_ENVIRONMENT\, \HUGO\_ENV\, and \HUGO\_PUBLISHDIR\ are set for external programs.
common/hugo · high confidence
New buffer pool for reusing byte buffers
A new \bufferpool\ package has been added, providing a \sync.Pool\-based mechanism to allocate and recycle \bytes.Buffer\ instances via \GetBuffer\ and \PutBuffer\ functions. This introduces a new internal capability for efficient buffer reuse, accompanied by corresponding tests using the \quicktest\ framework.
bufferpool · high confidence
New case-insensitive string comparison utilities
The compare package now provides new functions for case-insensitive string comparison and lexicographic sorting. The \Eq\ and \ProbablyEq\ functions now support a custom \Eqer\ interface, allowing templates to define custom equality semantics. Additionally, \Strings\, \LessStrings\, and \compareFold\ implement case-insensitive, lexicographic string comparison, enabling more predictable sorting and comparison of strings in Hugo templates.
compare · high confidence
New cast template functions for data type conversions
Added the cast template function namespace, providing int, float, and string conversion functions (ToInt, ToFloat, ToString) that now correctly handle HTML, CSS, JS, and JSStr template types by converting them to strings before processing.
tpl/cast · high confidence
New collections package with Append, Slice, and Stack utilities
The \common/collections\ package has been introduced to centralize collection handling. It provides a new \Append\ function that safely appends items to slices, handling mixed types and nested slices, along with a \Slice\ helper for creating typed slices and \Stack\ types (including a thread-safe variant) for LIFO operations.
common/collections · high confidence
New common iterator utilities for concatenation and locking
Added a new \hiter\ package providing generic iterator helpers: \Concat\ and \Concat2\ to merge multiple sequences (ignoring nils), and \Lock\ and \Lock2\ to wrap iterators with lock/unlock calls. These utilities simplify safe iteration over shared data structures.
common/hiter · high confidence
New debug template functions for template debugging
The \tpl/debug\ package introduces new template functions to aid in debugging templates. \debug.Dump\ allows serializing values to JSON for inspection, while \debug.Timer\ provides a way to measure and log the duration of template operations, including average and median timing statistics. Additionally, \debug.VisualizeSpaces\ helps identify whitespace issues in template output.
tpl/debug · high confidence
New deploy command with multi-provider support and CDN invalidation
A new 'deploy' command has been added to Hugo, enabling site deployment to remote cloud storage providers. The implementation uses Go CDK to support multiple backends, including AWS S3, Google Cloud Storage, and Azure Blob Storage. The change introduces a new 'deploy' package containing the core deployer logic, including file diffing, parallel uploads, and MD5-based change detection. Additionally, the update adds support for invalidating CDN caches on AWS CloudFront and Google Cloud CDN, allowing users to purge cached content after deployment. The feature is gated by the 'withdeploy' build tag, meaning the deploy command is not compiled by default.
deploy · high confidence
New deployment configuration system
The deployment configuration has been refactored into a new \deployconfig\ package, introducing a structured \DeployConfig\ type that manages deployment targets, matchers, and ordering rules. Users can now configure deployment targets with include/exclude glob patterns, set cache control and content headers via matchers, and define the order of file processing. The configuration supports multiple targets with distinct URLs, CDN invalidation settings, and file filtering rules, all parsed from TOML or other config sources. This change also adds support for stripping \index.html\ files during deployment.
deploy/deployconfig · high confidence
New docshelper package for Hugo documentation generation
A new \docshelper\ package has been introduced to support Hugo's documentation tooling. This package provides a \DocProvider\ interface and a registration mechanism (\AddDocProviderFunc\) that allows various components to contribute documentation data. The \GetDocProvider\ function aggregates these contributions into a single map, ensuring that duplicate keys are detected and reported as errors. This change is internal to the documentation generation process and does not directly alter user-facing features.
docshelper · high confidence
New encoding template functions for Base64, Hex, and JSON formatting
The \tpl/encoding\ package has been introduced as a standalone package providing new template functions for content encoding. Users can now use \base64Encode\ and \base64Decode\ for Base64 transformations, \hexEncode\ and \hexDecode\ for hexadecimal conversions, and \jsonify\ for JSON serialization with optional indentation and HTML escaping control. These functions are registered under the \encoding\ namespace in templates (e.g., \`{{
tpl/encoding · high confidence
New hstrings utility package for string operations and caching
A new hstrings package has been added to the codebase, providing a suite of string manipulation utilities including case-insensitive comparison via StringEqualFold, prefix checking, uppercase detection, and slice deduplication (UniqueStrings, UniqueStringsReuse, UniqueStringsSorted). The package also introduces a thread-safe regular expression cache (GetOrCompileRegexp) to optimize regex compilation, alongside helper functions like InSlice and ToString. Comprehensive unit tests and benchmarks are included to validate the new functionality.
common/hstrings · high confidence
New images.QR template function for generating QR codes
The tpl/images package now includes a new \images.QR\ template function that allows users to generate QR code images from text strings. The function accepts the text to encode and optional parameters for error correction level (low, medium, quartile, or high) and scale. It returns an image resource that can be used in templates. The implementation includes integration tests verifying the generation of QR codes with various options and error handling for invalid inputs.
tpl/images · high confidence
New js template namespace for JavaScript asset handling
The Hugo template functions now expose a dedicated 'js' namespace that provides three primary capabilities for managing JavaScript assets: the 'Build' function processes JavaScript resources using ESBuild, the 'Batch' function creates batched JavaScript bundles, and the 'Babel' function transforms JavaScript using Babel. These functions are registered via the new tpl/js package, allowing users to compile, bundle, and transpile JavaScript directly within templates.
tpl/js · high confidence
New js.Build resource transformer for bundling JavaScript and CSS
Hugo now supports bundling JavaScript and CSS assets using the esbuild engine via the new \js.Build\ template function. This feature allows users to bundle, minify, and transform JavaScript, JSX, TSX, and CSS files, with support for external dependencies, source maps, and import context resolution. The implementation includes a new \Client\ struct in \resources/resource\_transformers/js\ that handles the build process, processes output files, and manages file-loader artifacts. Integration tests verify the functionality with various build scenarios, including module imports and npm dependencies.
_resources/resource\transformers/js · high confidence
New localized number formatting functions in the lang namespace
The lang template namespace now includes new functions for formatting numbers, percentages, and currencies: FormatNumber, FormatPercent, FormatCurrency, and FormatAccounting. Additionally, FormatNumberCustom is available for custom formatting with configurable delimiters. These functions adapt to the current language's locale settings, providing consistent number formatting across different languages.
tpl/lang · high confidence
New math utility for reflection-based arithmetic
Added a new \common/math\ package that provides a \DoArithmetic\ function capable of performing addition, subtraction, multiplication, and division on numeric types (integers, floats, and unsigned integers) using reflection. The implementation handles type coercion between int, float, and uint types, and also supports string concatenation via the '+' operator. A corresponding test suite using the \quicktest\ framework validates these arithmetic operations across various type combinations.
common/math · high confidence
New os template functions for file and directory access
The Hugo template engine now exposes a new 'os' namespace with functions for interacting with the file system. Users can use fileExists to check if a file exists, readFile to read file contents as a string, readDir to list directory contents, and stat to retrieve file information. These functions are registered in the template namespace and include integration and unit tests to verify their behavior, including handling of missing files and directory listing.
tpl/os · high confidence
New page parser implementation
The page parser has been replaced with a new implementation in the \parser/pageparser\ package. This change introduces a new lexer and item types for parsing page content, including front matter (YAML, TOML, JSON, ORG), summary dividers, and shortcodes. The new parser supports typed parameters for shortcodes (booleans, integers, floats, and raw strings) and handles edge cases such as nested shortcodes, inline shortcodes, and commented-out front matter. Tests have been added to verify the correct parsing of these elements.
parser/pageparser · medium confidence
New path template functions for manipulating file paths
The \path\ template namespace now includes functions for common path operations: \Base\ (last element of a path), \BaseName\ (last element without extension), \Dir\ (directory component), \Ext\ (file extension), \Split\ (separates directory and file), \Join\ (combines path elements), and \Clean\ (normalizes paths). These are available in templates via the \path\ namespace.
tpl/path · high confidence
New privacy configuration for third-party services
Added a new \config/privacy\ package that introduces a structured privacy configuration for third-party services including Google Analytics, YouTube, Vimeo, Instagram, X (Twitter), and Disqus. This allows users to enable privacy-enhancing features such as respecting the Do Not Track header for Google Analytics, enabling privacy-enhanced mode for YouTube, and activating simple/static modes for social media shortcodes to reduce data tracking.
config/privacy · high confidence
New project and theme skeleton generation with format support
The \create/skeletons\ package now provides the Go implementation for generating new Hugo projects and themes. This includes the \CreateProject\ and \CreateTheme\ functions, which write out the default \hugo.toml\ (or YAML/JSON) configuration and a default archetype file. The implementation respects the \--format\ flag to determine the configuration file extension and content type, and embeds the necessary template files via Go's \embed\ directive.
create/skeletons · high confidence
New render hook interfaces and context types for Markdown elements
The Hugo rendering system now exposes a comprehensive set of Go interfaces and context structs for Markdown elements, including links, images, code blocks, blockquotes (with support for GitHub-style alerts and Obsidian titles), tables, headings, and passthrough snippets. Each context provides specific accessors (e.g., \Destination\, \Type\, \Inner\, \AlertType\) that allow templates to customize the HTML output for these elements. This change introduces the foundational types (\LinkContext\, \CodeblockContext\, \TableContext\, etc.) and their corresponding renderer interfaces (\LinkRenderer\, \CodeBlockRenderer\, etc.), enabling users to implement custom rendering logic for these specific Markdown components.
markup/converter/hooks · high confidence
New safe template function namespace
The tpl/safe package is introduced as a standalone package that provides template functions for escaping untrusted content or encapsulating trusted content. It registers a 'safe' namespace containing functions for safe CSS, HTML, HTML attributes, JavaScript, JavaScript strings, and URLs, along with a 'try' function. Tests are added for each of these template functions.
tpl/safe · high confidence
New shared utility types and helpers
The common/types package now includes several new shared utilities: a RunEvery scheduler for periodic tasks, a Closer interface and Closers container for resource cleanup, conversion helpers (ToDuration, ToString, ToStringSlicePreserveString) for template and internal use, an EvictingQueue for managing recent items, and helper types like KeyValues and LowHigh for range/slice operations.
common/types · high confidence
New strings template functions and namespace
The \tpl/strings\ package has been created as a standalone package providing a \strings\ namespace for template functions. This introduces new template functions including \chomp\, \contains\, \containsAny\, \containsNonSpace\, \count\, \countRunes\, \countWords\, \diff\, \findRE\, \findRESubmatch\, \firstUpper\, \hasPrefix\, \hasSuffix\, \repeat\, \replace\, \replacePairs\, \replaceRE\, \slicestr\, \split\, \substr\, \truncate\, and \truncate\ with HTML support. The implementation includes \init.go\ for namespace registration, \regexp.go\ for regex operations, \strings.go\ for general string manipulation, and \truncate.go\ for text truncation, all accompanied by comprehensive tests in \\*\_test.go\ files.
tpl/math, tpl/strings · high confidence
New template functions and improved partial decorator handling
The templates package introduces new template functions: templates.Exists to check if a template exists, templates.Current to get information about the currently executing template, and templates.Defer to defer template execution. Additionally, partial decorators are now supported, allowing partials to wrap other partials using the {{ inner }} function. Several bugs in partial decorator handling were fixed, including issues with falsy returns, script context escaping, and multiple defers in the same template.
tpl/templates · high confidence
New template functions for structured logging and error suppression
The \tpl/fmt\ package introduces new template functions for structured logging and error handling: \errorf\, \erroridf\, \warnf\, \warnidf\, \errormf\, and \warnmf\. The \\*idf\ variants (e.g., \erroridf\) allow users to suppress specific log messages by adding their IDs to the \ignoreLogs\ configuration option, providing a way to manage noise from known, non-critical issues. Additionally, \errormf\ and \warnmf\ are added as experimental functions for structured logging with metadata fields.
tpl/fmt · high confidence
New text utility functions and position tracking
Added new text processing utilities in the common/text package: a Position struct and Positioner interface for tracking file, line, and column information in error messages, along with functions to remove accents from strings, trim trailing newlines, ensure trailing newlines, and iterate over lines. Tests for these new capabilities were also added.
common/text · high confidence
New time template functions: In, Duration, ParseDuration, and Now
The tpl/time package has been refactored into a standalone, namespaced module that exposes new template functions: \time.In\ for converting a time to a specified IANA timezone, \time.Duration\ for converting a number to a time.Duration, \time.ParseDuration\ for parsing duration strings, and \time.Now\ for the current time. The \time\ namespace also supports calling \time.AsTime\ with an optional location argument to override the default location, and \time.Format\ for date formatting. These changes are accompanied by comprehensive unit and integration tests for the new functionality.
tpl/time · high confidence
New transform chain architecture for content processing
The \transform\ package now provides a \Chain\ type that allows multiple content transformers to be executed in sequence. This new architecture enables features such as injecting a Hugo generator meta tag, injecting a LiveReload script for development, and replacing relative URLs with absolute ones. The change introduces a reusable pipeline where each step receives the output of the previous one, allowing for more modular and testable content processing logic.
transform · high confidence
New type conversion and reflection helpers in common/hreflect
The common/hreflect package now includes new utility functions for safe type conversion and reflection. Specifically, convert.go introduces ToInt64, ToFloat64, and ToString functions that handle conversions with overflow and precision checks, addressing issues with YAML integer types and template function expectations. Additionally, helpers.go adds IsTruthful and IsTruthfulValue to determine truthiness based on Go's template logic, and implements caching for reflect method lookups to improve performance. These changes support more robust handling of numeric types and template value evaluation.
common/hreflect · high confidence
New urls template namespace with URL manipulation functions
The \tpl/urls\ package is introduced as a dedicated namespace for URL-related template functions. It provides new template functions including \Parse\ for parsing raw URLs, \JoinPath\ for joining path elements, \PathEscape\ and \PathUnescape\ for URL encoding/decoding, and \Anchorize\ for generating sanitized anchor names. The existing \ref\ and \relref\ functions are also registered within this namespace, consolidating URL handling logic into a single, self-contained package.
tpl/urls · high confidence
Restructure and expand the resources template functions
The resources template functions have been reorganized into a new package structure, introducing new capabilities such as resources.Copy, resources.GetRemote, and resources.GetMatch, while also adding support for remote resource fetching via HTTP and improving error handling and caching for remote resources.
tpl/resources · high confidence
Restructure the transform template function namespace
The template functions for content transformation (such as emojify, highlight, markdownify, plainify, toMath, unmarshal, and xmlEscape) are now organized under a dedicated 'transform' namespace. This change consolidates the registration of these functions, ensuring they are all accessible via the 'transform' prefix in templates (e.g., {{ transform.Highlight ... }}). The implementation has been refactored into a standalone package, improving code organization and making the API more consistent.
tpl/transform · high confidence
Rework template function namespaces and add new collection functions
The \tpl/collections\ package has been restructured into a standalone package, with template functions like \append\, \apply\, \complement\, \index\, \merge\, and \querify\ moved into dedicated files. The \apply\ function now supports built-in functions like \len\ and \not\, and the \index\ function now supports nested keys/fields with missing values. The \merge\ function now handles case-insensitive map keys and supports \hmaps.Params\. The \querify\ function now accepts maps, slices, or scalar values to generate URL query strings. Additionally, the \collections\ namespace is now explicitly registered via \init()\ in \tpl/collections/init.go\, and integration tests have been updated to use the new template structure.
tpl/collections · high confidence
Support SHA-384 for resource integrity hashes
The integrity transformer now supports the SHA-384 algorithm for generating subresource integrity (SRI) hashes and file fingerprints. Users can now specify 'sha384' as a hash algorithm, in addition to the existing 'md5', 'sha256', and 'sha512' options, allowing for stronger integrity verification on static assets.
_resources/resource\transformers/integrity · high confidence
Architecture
Centralized path and URL handling in common/paths
Hugo has extracted and consolidated path and URL handling logic into the new common/paths package. This refactoring introduces a dedicated path parser that supports multi-dimensional identifiers (such as language, version, and role prefixes) and provides standardized functions for path manipulation, sanitization, and URL generation. This change improves code reuse and ensures consistent path processing across the codebase.
common/paths · high confidence
Refactor SCSS client into dedicated package
The SCSS transformation logic has been reorganized into a new \resources/resource\_transformers/tocss/scss\ package, introducing a \Client\ struct that encapsulates the configuration (\Options\) and transformation pipeline for SCSS files. This change separates the core transformation logic from the broader resource system, providing a cleaner interface for handling SCSS compilation, including support for \includePaths\, \outputStyle\, \precision\, and source maps. The refactoring also includes updated integration tests to verify SCSS import resolution and error handling within this new structure.
_resources/resource\transformers/tocss/scss · high confidence
Refactor compare template functions into a standalone package
The template functions for comparing values (such as eq, ne, gt, ge, lt, le, and default) have been reorganized into a new, self-contained \tpl/compare\ package. This change improves the modularity of the template namespace, allowing the compare functionality to be initialized and used independently. Users will see no change in how these functions behave, but the internal structure is now cleaner and more maintainable.
tpl/compare · high confidence
Refactor resource handling with new internal interfaces and helpers
The resource package has been restructured to improve internal organization and type safety. New interfaces such as \Dated\ and \ResourceFinder\ are introduced to standardize how resources expose metadata and are located. Helper functions like \Param\ and \GetParam\ are added to simplify accessing resource parameters and handling type conversions. The \Resources\ type gains new methods including \Mount\ for path remapping, \ByType\ for filtering, and \Get\/\GetMatch\ for locating resources by name or pattern. These changes streamline how Hugo manages and accesses resources internally.
resources/resource · high confidence
Relocate Hugo environment info and page interfaces to the resources/page package
The \HugoInfo\ struct, which exposes environment details such as version, build date, Go version, and state flags like \IsDevelopment\, \IsProduction\, \IsServer\, and \IsExtended\, has been moved from \common/hugo\ to \resources/page\. This change consolidates the core \Page\ interface and its associated providers (such as \ContentProvider\, \MarkupProvider\, and \GitInfoProvider\) within the \resources/page\ package, ensuring that all page-related types and their implementations are co-located. This structural shift supports the broader refactoring of the page model, making these core interfaces and the environment info object directly accessible from the page context in templates.
resources/page · high confidence
Behavioural changes
Added placeholder files to project skeleton directories
The project skeleton template now includes .gitkeep placeholder files in the assets, content, data, i18n, layouts, static, and themes directories. This ensures these directories are tracked by version control, preserving the expected folder structure for new projects.
create/skeletons/project · high confidence
Added polling-based file watching as a fallback
The file watcher now includes a polling-based file watcher implementation that serves as a fallback when native filesystem events are unavailable or fail. This ensures that file change detection continues to function in environments where native watchers (like inotify) are not supported or are exhausted, by periodically checking for file modifications instead.
watcher · high confidence
Asciidoctor integration and external converter handling
The Asciidoctor integration has been refactored into a new internal converter that standardizes behavior when the external Asciidoctor tool is missing, ensuring a clear error message rather than a crash. The converter now supports boolean document attributes, allowing users to set attributes to true or false (e.g., using '!' for false). Additionally, the system validates Asciidoctor extensions and attributes, ignoring or warning about disallowed or fixed attributes to prevent security or configuration issues.
markup/asciidocext/internal · medium confidence
Centralize Hugo path and multihost configuration in a new Paths struct
Hugo now uses a dedicated Paths struct to manage absolute resource and publish directories, as well as multihost configuration details like per-language base paths. This change consolidates path-related logic, ensuring that relative and absolute URLs are correctly resolved for static content, resources, and multihost setups.
hugolib/paths · high confidence
Centralized dependency container for Hugo's internal services
The internal dependency container (deps) has been restructured into a single, centralized struct that holds shared services such as the logger, file systems, template store, and build state. This change consolidates how Hugo manages its internal components, ensuring that all parts of the application share the same instances of these services, which improves consistency and simplifies the initialization of new features like the new file cache and template handling.
deps · high confidence
Centralized markup configuration structure
The configuration for all markup engines (Goldmark, Asciidoctor, reStructuredText, code highlighting, and table of contents) is now managed through a single, unified config struct. This change introduces a migration path for legacy boolean configuration options, automatically converting old boolean settings for Goldmark's typographer and footnote extensions into their new struct-based equivalents to ensure backward compatibility.
_markup/markup\config · high confidence
Centralizes and clarifies page kind constants
The page kind constants (e.g., KindPage, KindHome, KindSection) are now defined in a dedicated 'kinds' package, making them easier to reference and maintain. The code also adds helper functions like GetKindMain and GetKindAny to resolve string inputs to their corresponding kind constants, and includes tests to ensure the constant values remain stable.
resources/kinds · high confidence
Centralizes warning and field name constants
The constants for warning identifiers (e.g., 'warning-rendershortcodes-in-html', 'warning-goldmark-raw-html') and special field names (e.g., 'RelPermalink', 'Permalink') are now defined in a single 'common/constants' module. This centralizes the source of truth for these identifiers, ensuring consistent usage across the codebase.
common/constants · high confidence
Code block rendering and styling options expanded
The code highlighting system now supports inline code blocks via the new \hl\_inline\ option, allowing syntax highlighting to be applied within a single line of text. Additionally, the CSS generation for Chroma has been enhanced to support dark and light mode selectors, configurable class names for each mode, and the ability to override the code block's wrapper class. The \lineNos\ configuration now explicitly supports \inline\ and \table\ string values, and the \wrapperClass\ option allows customizing the outermost element's CSS classes for highlighted code blocks.
markup/highlight · high confidence
Complete rewrite of the live reload subsystem with improved WebSocket handling
The live reload functionality has been completely rewritten to use a dedicated WebSocket hub for managing client connections, addressing previous data races and connection issues. The Go backend now properly handles host header validation using the \X-Forwarded-Host\ header for environments like Codespaces, and the JavaScript client has been updated to v4.0.2 with a custom Hugo plugin that supports port-specific reloading and graceful disconnection during page swaps.
livereload · high confidence
Configurable wrapping of standalone Markdown images within paragraphs
The Goldmark markup processor now supports a new configuration option, \markup.goldmark.parser.wrapStandAloneImageWithinParagraph\, which controls whether standalone images in Markdown are wrapped in a paragraph tag. When enabled, block-level images are wrapped in a \\<p\>\ element; when disabled, they remain as block elements. This behavior is also exposed via the \render-image\ template hook, allowing users to conditionally render images differently based on whether they are inline or block-level, with the template receiving an \IsBlock\ flag to distinguish the two contexts.
markup/goldmark/images · high confidence
Consolidate hashing utilities into a common package
The \common/hashing\ package has been introduced to centralize hashing utilities, replacing scattered implementations across the codebase. This change migrates image processing to use xxHash instead of MD5, providing faster and more efficient content hashing. The package includes functions for generating xxHash and MD5 hashes from readers and strings, as well as a generic \HashString\ function that leverages the \hashstructure\ library to create deterministic hashes for complex objects like pages and resources. This consolidation improves performance and ensures consistent hashing behavior throughout the application.
common/hashing · high confidence
Consolidated metadata decoders and added XML support
The metadata decoders have been consolidated into a new, unified \parser/metadecoders\ package, which now supports parsing XML in addition to the existing formats. This change also introduces configuration options for CSV parsing, including a configurable delimiter, comment character, lazy quotes, and target type (map or slice). Additionally, the implementation fixes a crash caused by nil maps when processing empty YAML configuration files.
parser/metadecoders · high confidence
Docker entrypoint now supports custom initialization scripts and npm setup
The Docker image now executes a custom \hugo-docker-entrypoint.sh\ script if present, allowing users to inject custom initialization logic before Hugo runs. Additionally, the entrypoint automatically installs npm packages via \npm i\ if a \package.json\ is detected and \node\_modules\ is missing, ensuring dependencies are available without requiring a pre-built \package-lock.json\.
scripts/docker · high confidence
Enhanced remote resource fetching with caching, retries, and security controls
The \resources.GetRemote\ function now supports a \timeout\ option for per-request limits, respects the \Retry-After\ header for temporary HTTP errors, and includes an HTTP cache that persists across restarts. The client also enforces security policies by validating URLs against \security.http.urls\ and allows whitelisting \mediaTypes\. Additionally, the response data now includes headers and status codes, and the implementation uses a context dispatcher for resource identification.
_resources/resource\factories/create · high confidence
Hugo's template function map is now initialized via a new registry-based system
The template function map is now constructed by iterating over an internal registry of template function namespaces, each providing context and method mappings. This change consolidates how Hugo's template functions are registered and initialized, replacing the previous mechanism with a more structured, registry-driven approach that ensures all template functions are properly initialized with their required context.
tpl/tplimplinit · medium confidence
Improved Asciidoctor integration and configuration
The Asciidoctor integration has been reworked to improve reliability and security. The converter now supports boolean document attributes and allows configuration of Asciidoctor command-line arguments via the site configuration. A new \preserveTOC\ option has been added to control Table of Contents behavior. Additionally, the integration now validates and restricts disallowed arguments and extensions to prevent potential security issues, while also fixing previous bugs in TOC parsing and argument handling.
markup/asciidocext · medium confidence
Improved Node.js tool execution with enhanced security and fallback resolution
Hugo now executes Node.js tools (like PostCSS, Babel, and TailwindCSS) using the Node.js permission model, which restricts file system access to only the necessary directories. This change adds a fallback mechanism where, if a tool fails to resolve via the standard Node.js resolver, Hugo will attempt to resolve it using the system PATH. Additionally, a new ESM loader hook ensures that bare imports in ESM configuration files (like postcss.config.js) are resolved correctly by falling back to the NODE\_PATH environment variable, preventing ERR\_ACCESS\_DENIED errors in restricted environments.
common/hexec · high confidence
Improved error reporting with file, line, and column information
Hugo now provides more precise error messages by including the filename, line number, and column number for errors. This makes it easier to locate and fix issues in configuration files, templates, and other assets. The error handling system has been refactored to support this enhanced context, including support for wrapped errors and improved nil pointer error messages.
common/herrors · high confidence
Improved i18n fallback, pluralization, and error handling
The i18n system now falls back to the default content language instead of English when a translation is missing, and prefers the language code over the locale for translation lookups. Pluralization now correctly handles floats and page contexts, while error messages for reserved keys and missing translations have been improved. The implementation also supports translation files with a .yml suffix and fixes issues with language code case sensitivity.
langs/i18n · high confidence
Improved localization of time formatting in templates
The \time.Format\ template function now correctly localizes abbreviated month names (e.g., 'Jan' to 'gen' in Italian) and weekday names. This fix ensures that date and time outputs in templates respect the site's configured language and locale settings, providing accurate localized text for users.
common/htime · high confidence
Improved menu URL resolution and caching for faster, more reliable navigation
The navigation package was refactored to improve menu handling. Menu entries now prioritize the associated Page's relative permalink over a manually configured URL, ensuring that menu links stay in sync with page URLs. A new thread-safe menu cache was introduced to store and retrieve sorted menu lists, reducing redundant processing. Additionally, the logic for determining if a page is currently active or in the current menu has been simplified and optimized.
navigation · high confidence
Improved syntax highlighting performance via lexer caching
The Chroma lexer lookup is now cached, which significantly improves performance for syntax highlighting by avoiding repeated, slow lookups for languages that are not found. This change introduces a concurrent map-based cache for the lexer retrieval process.
markup/highlight/chromalexers · medium confidence
Introduce Hugo context markers to fix RenderShortcodes leaks and data races
The Goldmark markup processor now wraps rendered content with internal context markers (e.g., \{{\_\_hugo\_ctx pid=42}}\) to correctly identify the active page during \.RenderShortcodes\ execution. This change resolves issues where context markers were leaking into output, causing extra paragraphs or indentation errors, and eliminates a data race in the Hugo context wrapper. Additionally, the system now logs a warning when raw HTML is omitted due to the \unsafe\ configuration, ensuring users are aware when content is being filtered.
markup/goldmark/hugocontext · high confidence
Introduce configurable media type system with support for multiple file suffixes
The media package now uses a new configuration-driven system for defining media types (MIME types). This change introduces a \BuiltinTypes\ struct and a \defaultMediaTypesConfig\ map that maps MIME types to their file suffixes (e.g., \text/html\ maps to \html\ and \htm\). This allows users to customize which file extensions correspond to which media types via the site configuration. The system supports multiple suffixes per type and allows for custom delimiter configuration. This refactor replaces the previous hardcoded logic for resolving media types, providing a more flexible and configurable approach to handling content types in Hugo.
media · high confidence
Introduce hstring.HTML type to prevent infinite template recursion
A new hstring.HTML type has been added to represent rendered HTML content. This type implements PrintableValueProvider and behaves like a string, but is specifically designed to be treated as safe HTML in templates, which prevents infinite recursion issues that could occur with certain template constructs.
common/types/hstring · high confidence
Introduce structured attributes and options handling for Markdown and code blocks
A new internal package, markup/internal/attributes, has been added to centralize the parsing and storage of Markdown attributes. This change separates general attributes from code-block-specific options (such as hl\_inline and anchorLineNos) by introducing an AttributesHolder that distinguishes between attributes passed to render hooks and options passed to the Chroma highlighter. This structural change supports improved handling of code block attributes and Markdown image processing.
markup/internal/attributes · high confidence
Introduce structured minification configuration for HTML, CSS, JS, JSON, SVG, and XML
The minifiers package now uses a dedicated configuration struct (MinifyConfig) that exposes granular control over each content type's minifier settings, including new defaults like KeepEndTags for HTML and KeepWhitespace false for HTML. Users can now explicitly disable minification for specific MIME types (HTML, CSS, JS, JSON, SVG, XML) and configure underlying tdewolff/minify options such as CSS version, JS version, and SVG namespace preservation. Deprecated config keys (decimals, keepcss2, keepconditionalcomments) are automatically migrated to their new names with deprecation warnings.
minifiers · medium confidence
Introduces a new converter interface for markdown processing
The \markup/converter\ package now defines a \Converter\ interface and a \Provider\ system, establishing a standardized abstraction for markup rendering. This change introduces the core interfaces (\Converter\, \ParseRenderer\, \ResultRender\) and context structures (\DocumentContext\, \RenderContext\) that will be used to replace the previous Blackfriday engine with Goldmark, enabling more flexible and hook-based rendering of markdown content.
markup/converter · high confidence
JavaScript concatenation now includes safety barriers
When concatenating multiple JavaScript files, Hugo now inserts a newline and semicolon between each file. This prevents the last line of one file from affecting the first line of the next, ensuring safe and correct execution of the combined script.
_resources/resource\factories/bundler · high confidence
Minification errors are now surfaced to the user
When minifying resources (CSS, HTML, JS, JSON, SVG, XML), any errors encountered during the minification process are now propagated to the user rather than being silently ignored. For example, invalid JavaScript syntax (such as legacy octal numbers) will now cause the build to fail with a clear error message, ensuring that minification issues are not hidden.
_resources/resource\transformers/minifier · high confidence
Refactor CLI command structure and improve server behavior
The command-line interface has been restructured, introducing 'hugo build' as an alias for the default build command and moving several commands (config, gen, list, mod, new, convert, import) to be non-global subcommands. The 'hugo config' command now supports outputting configuration in JSON, YAML, or TOML formats. The Hugo server now renders and serves from memory by default, which provides a significant performance improvement. Additionally, the server correctly handles the --baseURL flag and displays the full server URL, including the port, on startup.
commands · high confidence
Refactor and consolidate helper functions for content, paths, and URLs
The \helpers\ package has been reorganized into new, focused files: \content.go\ introduces a \ContentSpec\ to manage content rendering and HTML trimming, while \path.go\ and \pathspec.go\ centralize path manipulation and URL generation logic within a \PathSpec\ struct. Additionally, \emoji.go\ and \general.go\ provide dedicated implementations for emoji processing and general utility functions, with corresponding test files added to verify the new behavior.
helpers · high confidence
Refactor and improve the Table of Contents API
The Table of Contents implementation has been refactored to expose a structured data model (Headings, Fragments) and a new .Fragments API for templates, allowing access to heading titles, IDs, and levels. The .ToHTML method now accepts startLevel, stopLevel, and an ordered-list flag as arguments, enabling templates to control the depth and list style of the rendered ToC. Additionally, the change includes a fix for a nil pointer error when accessing ToC headings.
markup/tableofcontents · high confidence
Refactor common/hugio I/O abstractions and add file copy utilities
The common/hugio package introduces new abstractions for I/O operations, including a HasBytesWriter for efficient pattern matching on byte streams, a CopyDir/CopyFile implementation for non-OS filesystems, and updated writer/reader interfaces. These changes improve performance and correctness in file handling and byte scanning within the Hugo core.
common/hugio · medium confidence
Refactor config loading and build configuration structures
The config package has been restructured to use a new \ConfigNamespace\ pattern and a \defaultConfigProvider\ backed by \hmaps.Params\. This introduces a typed \BuildConfig\ struct with \UseResourceCacheWhen\ (controlling cache usage as 'never', 'fallback', or 'always') and \BuildStats\ (enabling/disabling tags, classes, and IDs in \hugo\_stats.json\). The \server\ configuration now supports \headers\ and \redirects\ with regex support. Additionally, environment variables \HUGO\_NUMWORKERMULTIPLIER\ and \HUGO\_MEMORYLIMIT\ are now used to control parallel execution and memory limits for caches.
config · high confidence
Refactor front matter and JSON serialization in the parser
The parser now handles front matter serialization through a new \frontmatter.go\ module that explicitly supports YAML, TOML, JSON, and XML output formats. Additionally, JSON key handling has been refactored: keys are now lowercased by default, and empty or zero-value fields are omitted from the output, ensuring a cleaner and more consistent JSON representation of configuration and metadata.
parser · high confidence
Refactored Hugo's internal filesystem (hugofs) with new components and tests
The hugofs package was restructured and expanded with new filesystem implementations: componentFs for managing component-specific file systems, createCountingFs for tracking file creation, baseFileDecoratorFs for file metadata decoration, dirsmerger for directory merging, filenameFilterFs for glob-based filtering, hasBytesFs for content pattern matching, and hashingFs for checksum calculation. The FileMeta struct was converted to a proper struct with fields for module, weight, and site matrix, and tests were added for FileMeta, filename filtering, and globbing.
hugofs · high confidence
Refactored file cache implementation and configuration
The file cache implementation and its configuration have been split into separate files (filecache.go, filecache\_config.go, filecache\_pruner.go) to improve code organization. The cache now supports a prune function to remove expired and unused items, with specific handling for case-insensitive filesystems to prevent accidental deletion of legacy cache entries. Tests have been added to verify the pruning behavior and configuration decoding.
cache/filecache · high confidence
Refactored page metadata handling and front matter validation
The page metadata and front matter parsing logic has been refactored into the new \resources/page/pagemeta\ package. This change introduces stricter validation for front matter dates, ensuring that invalid date formats (such as booleans, floats, or malformed strings) are rejected with clear error messages, while also supporting full datetime prefixes in filenames. The \BuildConfig\ for pages is now represented as an enum (using string values like 'always', 'never', 'local', and 'link') rather than booleans, providing more granular control over how pages are listed and rendered. Additionally, the implementation ensures that each call to open a page's source content returns an independent reader, preventing race conditions and data corruption when multiple readers access the same content simultaneously.
resources/page/pagemeta · high confidence
Refactored render context to support page-specific rendering and improved position tracking
The internal render context was restructured to track page IDs and values per node kind, enabling render hooks to access the correct page context (including inner pages) and improving the accuracy of source position tracking for generated HTML. This change supports the new Markdown render hooks for code blocks, tables, and inline/block passthrough snippets, ensuring that template authors receive the correct page and position data when customizing Markdown output.
markup/goldmark/internal/render · high confidence
Refactored resource and image handling with new caching and metadata support
The resource package has been refactored to improve caching, metadata handling, and error reporting. Image resources now support a new \.Meta\ property for reading image metadata (replacing the deprecated \.Exif\), and image processing errors now include the full filename for better debugging. The image cache key logic has been updated to prevent duplicate publishing of processed images and to correctly handle multihost setups. Additionally, the \resources.Get\ method now returns \nil\ when a resource is not found, simplifying template logic.
resources · high confidence
Reimplemented partials template functions with improved caching and return value support
The \partials\ namespace template functions (\partial\ and \partialCached\) have been reimplemented to support returning values from partials and to fix concurrency issues in the caching layer. Users can now use \return\ statements inside partials to pass data back to the caller, and the cached partial invocation is guaranteed to run only once per request, preventing deadlocks and race conditions.
tpl/partials · high confidence
Reimplemented template system with new template descriptor and lookup logic
The template lookup and rendering system has been completely reworked, introducing a new template descriptor and weight-based matching logic to determine the best template for a given page or context. This change affects how templates are resolved, including support for plain text templates, improved handling of layout priorities, and updated embedded templates for links, images, and tables. The implementation includes new files such as templatestore.go, templatedescriptor.go, and various embedded template files, alongside extensive integration tests to verify the new behavior.
tpl/tplimpl · high confidence
Removal of Blackfriday Markdown engine
The Blackfriday Markdown engine has been removed from the project. Users relying on this engine for rendering Markdown content will need to switch to an alternative Markdown processor. The file anchors.go, which previously contained compatibility functions for Blackfriday v1, is now part of the removal process, indicating that the engine is no longer supported or available for use.
markup/blackfriday · high confidence
Replace Blackfriday with Goldmark as the default Markdown processor
Hugo now uses the Goldmark library for Markdown processing, replacing the previous Blackfriday-based implementation. This change introduces new render hooks for headings, links, images, and code fences, allowing templates to customize the HTML output. The auto-generated heading IDs are now configurable via the \autoIDType\ setting (supporting 'github' or 'blackfriday' styles), and attributes can be applied to blocks like tables and code fences. Additionally, the Table of Contents now supports strikethrough, emojis, and other extensions, while security is improved by excluding event attributes from markdown render hooks.
markup/goldmark · high confidence
Replaced the document tree implementation with a new multi-dimensional tree structure
The internal \hugolib/doctree\ package has been completely rewritten to support multi-dimensional data storage (language, version, role) via new \NodeShiftTree\ and \TreeShiftTreeSlice\ implementations. This change introduces a new radix-based tree structure that allows for more efficient handling of content trees with many sections and deeper hierarchies. The update includes new test coverage for the tree operations and simplifies the lock setup in the thread-safe tree implementation to reduce read allocations.
hugolib/doctree · high confidence
Replaced the logging system with structured logging and new handlers
The internal logging implementation in common/loggers has been replaced with a new structured logging system. This change introduces new handler files (handlerdefault.go, handlersmisc.go, handlerterminal.go) and a new logger.go interface, replacing the previous logging setup. Users will see logs formatted with color-coded levels (INFO, WARN, ERROR) and potentially different output destinations (stdout vs stderr) depending on the log level. The new system supports features like suppressing duplicate messages, storing errors separately, and stripping ANSI escape codes from browser error logs.
common/loggers · high confidence
Rework language configuration and locale handling
The language configuration has been restructured with a new LanguageConfig struct and a dedicated Language type in the langs package, introducing canonical fields like Locale, Label, and Direction while deprecating legacy fields such as LanguageCode and LanguageName. This change improves locale resolution and language sorting, and includes tests to verify fallback behavior for legacy configuration fields.
langs · high confidence
Switch default Markdown processor to Goldmark
Hugo now uses the Goldmark library as the default Markdown processor, replacing the previous Blackfriday engine. This change updates the markup handling in the Go code to register Goldmark as the default handler, while also registering support for AsciiDoc, ReStructuredText, Pandoc, and Emacs Org Mode. The system will now return an error if a configuration specifies Blackfriday, as that engine has been removed.
markup · high confidence
Unified image metadata extraction with XMP and IPTC support
The image metadata system has been refactored to support multiple metadata sources (EXIF, IPTC, and XMP) via a new \MetaInfo\ struct that consolidates data from these sources. Users can now configure which metadata sources to read using the \sources\ config option, and filter specific fields using the \fields\ option. The previous \disableDate\ and \disableLatLong\ configuration options have been removed in favor of the new \fields\ and \sources\ settings. This change enables access to richer metadata, including XMP and IPTC tags, and allows for more granular control over which metadata is extracted and exposed to templates.
resources/images/meta · medium confidence
Updated Go template engine to Go 1.26.1
The internal Go template engine in tpl/internal/go\_templates/texttemplate has been updated to match Go 1.26.1. This brings the latest template parsing, execution, and function behaviors from the Go standard library, ensuring compatibility with newer Go versions and incorporating upstream improvements and bug fixes.
_tpl/internal/go\templates/texttemplate · high confidence
Updated Go template engine to sync with Go 1.26.3
The internal Go template implementation has been updated to sync with Go 1.26.3. This update includes a new \cfg\ package for managing Go environment variables, a \fmtsort\ package for stable map sorting, and updated \htmltemplate\ files that define content types, attribute handling, and context states. These changes ensure the template engine remains compatible with the latest Go standard library features and security practices.
_tpl/internal/go\templates/htmltemplate · high confidence
Updated Go template fork to sync with Go 1.26.3
The internal Go template fork in \scripts/fork\_go\_templates\ has been updated to match the Go 1.26.3 source code. This update brings the latest changes from the standard library's \text/template\ and \html/template\ packages into Hugo's internal implementation, ensuring compatibility with newer Go versions and incorporating upstream template engine improvements.
_scripts/fork\_go\templates · high confidence
Updated Go template parser to match Go 1.22.5
The internal Go template parser in tpl/internal/go\_templates/texttemplate/parse has been synchronized with the Go 1.22.5 source. This update brings the template parsing logic, including the lexer and node definitions, in line with the latest Go standard library, ensuring compatibility with newer Go template syntax and bug fixes present in Go 1.22.5.
_tpl/internal/go\templates/texttemplate/parse · high confidence
Updated Go template testenv with modernized subprocess and environment handling
The \tpl/internal/go\_templates/testenv\ package was updated to modernize subprocess execution and environment management. The \CommandContext\ helper now automatically calculates a dynamic grace period based on the test's deadline, ensuring subprocesses are cleaned up before the test times out. Additionally, \CleanCmdEnv\ now explicitly filters out \GODEBUG\ and \GOTRACEBACK\ from the environment to prevent test output parsing failures, and \MustHaveExec\ now uses a \sync.OnceValue\-based probe that skips tests on platforms like iOS, WASI, and JavaScript where process execution is unsupported.
_tpl/internal/go\templates/testenv · high confidence
Updated default theme skeleton with modern layout and asset handling
The default theme skeleton has been updated to include a complete set of layout templates (baseof, home, page, section, taxonomy, and term) that structure the page with semantic header, main, and footer regions. The header now renders a menu, and the footer includes a copyright notice. Asset handling has been modernized to use Hugo's resource pipeline, with CSS and JavaScript files processed via css.Build and js.Build respectively, including minification and fingerprinting in production builds. The theme also introduces a new CSS structure with separate files for header, footer, and main styles, and adds placeholder files for data and i18n.
create/skeletons/theme · medium confidence
Updated embedded shortcodes for X (Twitter), Vimeo, and YouTube
The embedded shortcodes for X (formerly Twitter), Vimeo, and YouTube have been updated. The \x\ and \x\_simple\ shortcodes now use the \publish.x.com\ domain for fetching embed data, replacing the previous \api.twitter.com\ and \publish.twitter.com\ endpoints. The \vimeo\ and \vimeo\_simple\ shortcodes have been adjusted to handle API changes, including a fix for the \allowFullScreen\ option. The \youtube\ shortcode template has also been updated to reflect current YouTube embed requirements.
_tpl/tplimpl/embedded/templates/\shortcodes · high confidence
Updated embedded templates for page images, pagination, and social metadata
The embedded templates in the \_partials directory have been updated to improve how page images are resolved and rendered. The new get-page-images.html function now checks both local page resources and global resources, ensuring that images are found more reliably. The pagination.html template has been updated to support 'default' and 'terse' formats with improved accessibility attributes. Additionally, the opengraph.html, schema.html, and twitter\_cards.html templates have been updated to use the new image resolution logic, ensuring consistent social media metadata. The disqus.html template has also been updated to handle local development environments more gracefully.
_tpl/tplimpl/embedded/templates/\partials · medium confidence
Updated file ignoring logic to exclude dotfiles, backup files, and emacs temp files
The source package now explicitly ignores files that start with a dot (.), hash (\#), or end with a tilde (\~) during file processing. This change ensures that editor temporary files (like .\#file.md), backup files, and hidden dotfiles are not processed as content, aligning with standard version control and editor behaviors. A new test suite in source/content\_directory\_test.go validates this filtering logic.
source · high confidence
Fixes
Fix .WordCount, .FuzzyWordCount, and .ReadingTime when summary marker is set
The calculation of .WordCount, .FuzzyWordCount, and .ReadingTime is corrected to properly account for the presence of a summary marker (e.g., \\<!--more--\>\) in the content. Previously, these metrics might have been calculated on the full content rather than just the summary portion, leading to inaccurate word counts and reading time estimates for pages with manual summaries.
hugolib · high confidence
Test coverage
Added template test fixtures for HTML template parsing; Added test data fixtures for remote resources and content; Added test helper utilities for Hugo; Refactored golden image testing infrastructure; Updated test data with new image resources and license.
Dependencies
Updated Go version and dependencies
The project has been upgraded to Go 1.26.0, as specified in the go.mod files. This update includes a comprehensive refresh of dependencies, with key libraries such as esbuild (v0.28.1), Goldmark (v1.8.5), and Chroma (v2.27.0) being updated to their latest versions. These changes ensure the project uses the latest features and security patches from its dependencies.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 52.
Lenses
- Code Health 32
- Architecture 100
- Maturity 68
- Readiness 65
- Security 77
- Accessibility 73
Changes since last survey
- 300 commits — 264 feature/other, 36 fixes
By area
- (root) — 106 commits
- common/hugo — 20 commits
- tpl/tplimpl — 11 commits
- resources/images — 9 commits
- internal/js — 8 commits
- markup/goldmark — 8 commits
- .github/workflows — 7 commits
- internal/warpc — 6 commits
- config/security — 5 commits
- resources/page — 5 commits
- resources/resource_transformers — 5 commits
- (repo) — 4 commits
- content/en — 4 commits
- hugolib/cascade_test.go — 4 commits
- tpl/collections — 4 commits
- commands/commandeer.go — 3 commits
- common/hexec — 3 commits
- common/paths — 3 commits
- hugolib/content_map_page_assembler.go — 3 commits
- resources/resource_factories — 3 commits
Notable commits
- fix: Fix RenderShortcodes leaking context markers when indented
- fix: Fix auto-creation of root sections in multilingual sites
- fix: Fix filename dimension identifiers (_role_X_, _version_X_) to replace mount config
- fix: Fix it so we never auto-fallback to page resources in other roles/versions
- fix: Fix multi --renderSegments merge behavior
- fix: Fix panic on edit of legacy mapped template names that's also a valid path in the new setup
- fix: Fix panic on server atomic save edits on MacOS
- fix: Fix panic when passthrough elements are used in headings
- fix: Fix potential content XSS by escaping dangerous URLs in links and images
- fix: Fix prevention of direct symlink reads in resources.Get
- fix: Fix some recently introduced Position issues
- fix: Revert "common/hugo: Deprecate extended and extended_withdeploy editions"
- fix: Revert "markup/tableofcontents: Skip empty TOC levels"
- fix: Revert "tpl/collections: Make dict return nil when no values are provided"
- fix: commands: Fix convert command
- fix: commands: Fix environment isolation for configuration settings
- fix: commands: Fix github-dark chromastyles
- fix: commands: Fix import from Jekyll
- fix: create: Fix non-deterministic conflict detection in hugo new content
- fix: hugolib: Fix Page.GitInfo for modules with go.mod in a repo subdirectory
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
gohugoio/hugo was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 33d1f2c853ecaca2cef0ba817b89bcf74347c6a6 — the exact code this score is about.
- Scored under rubric-2026.08.19 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer latest.