<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/release-v0-166-0-gohugoio-hugo-uiuzzbg31" -->

---
title: Release v0.166.0 · gohugoio/hugo | daily.dev
description: Hugo v0.166.0 ships a breaking KaTeX upgrade to version 0.18.4 that requires updating the CDN stylesheet link for sites using transform.ToMath with html or...
canonical: https://daily.dev/posts/release-v0-166-0-gohugoio-hugo-uiuzzbg31
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Release v0.166.0 · gohugoio/hugo | daily.dev
og:description: Hugo v0.166.0 ships a breaking KaTeX upgrade to version 0.18.4 that requires updating the CDN stylesheet link for sites using transform.ToMath with html or...
og:url: https://daily.dev/posts/release-v0-166-0-gohugoio-hugo-uiuzzbg31
og:image: https://api.daily.dev/og/posts/UIUzZBG31.png
og:image:alt: Release v0.166.0 · gohugoio/hugo
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Release v0.166.0 · gohugoio/hugo

**[Hugo](https://daily.dev/sources/hugo)** · 4 min read · 7 upvotes · 0 comments

## Summary

Hugo v0.166.0 ships a breaking KaTeX upgrade to version 0.18.4 that requires updating the CDN stylesheet link for sites using transform.ToMath with html or htmlAndMathml output, since older CSS versions like 0.16.21 will render math and chemical expressions incorrectly. The release also bumps to Go 1.27, adds es2025 as a supported JS build target, hardens security around remote fetches and resolved addresses, adds a resources.Publish template function, and fixes several bugs including a slice bounds panic and incorrect reading-time calculations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/gohugoio/hugo/releases/tag/v0.166.0>

## Questions this post answers

### Do I need to update my KaTeX CSS version after upgrading to Hugo v0.166.0?

Yes, sites using transform.ToMath with the output option set to html or htmlAndMathml must update their KaTeX stylesheet reference to version 0.18.4 or higher. Older versions such as 0.16.21 will cause certain mathematical or chemical expressions to render incorrectly. Update the CDN link in templates from katex@0.16.21 to katex@0.18.4.

_Track breaking changes like this KaTeX bump before they hit your Hugo build, via daily.dev._

### What version of Go does Hugo v0.166.0 use?

Hugo v0.166.0 upgrades its internal build to Go 1.27. This is one of several improvements in the release, alongside adding es2025 as a supported JavaScript build target and various performance and security enhancements.

_Keep tabs on toolchain upgrades like Hugo's Go bump with daily.dev._

### What security hardening changes are included in Hugo v0.166.0?

Hugo v0.166.0 hardens default http.urls and resolved address checks, validates resolved addresses on remote fetches, denies text/org content by default, escapes code-fence attribute values in the default markdown renderer, and fails on symlinks that escape Node.js permission paths in hexec.

_Follow security-relevant static site generator changes like these via daily.dev._

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#golang](https://daily.dev/tags/golang)

[View this post on daily.dev](https://daily.dev/posts/release-v0-166-0-gohugoio-hugo-uiuzzbg31)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Release v0.166.0 · gohugoio/hugo","url":"https://daily.dev/posts/release-v0-166-0-gohugoio-hugo-uiuzzbg31","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/release-v0-166-0-gohugoio-hugo-uiuzzbg31"},"datePublished":"2026-09-09T15:19:01.960Z","dateModified":"2026-09-14T09:24:03.826Z","description":"Hugo v0.166.0 ships a breaking KaTeX upgrade to version 0.18.4 that requires updating the CDN stylesheet link for sites using transform.ToMath with html or...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6ae0ea5d27d11b775a0ae9fa38d36c4b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6ae0ea5d27d11b775a0ae9fa38d36c4b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hugo","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hugo","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/0b9e9e4bd6dc4a96bba3ca9663c6d6b7","url":"https://daily.dev/sources/hugo"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/release-v0-166-0-gohugoio-hugo-uiuzzbg31","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":7},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,golang","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hugo","item":"https://daily.dev/sources/hugo"},{"@type":"ListItem","position":3,"name":"Release v0.166.0 · gohugoio/hugo"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/release-v0-166-0-gohugoio-hugo-uiuzzbg31#faq","mainEntity":[{"@type":"Question","name":"Do I need to update my KaTeX CSS version after upgrading to Hugo v0.166.0?","acceptedAnswer":{"@type":"Answer","text":"Yes, sites using transform.ToMath with the output option set to html or htmlAndMathml must update their KaTeX stylesheet reference to version 0.18.4 or higher. Older versions such as 0.16.21 will cause certain mathematical or chemical expressions to render incorrectly. Update the CDN link in templates from katex@0.16.21 to katex@0.18.4. Track breaking changes like this KaTeX bump before they hit your Hugo build, via daily.dev."}},{"@type":"Question","name":"What version of Go does Hugo v0.166.0 use?","acceptedAnswer":{"@type":"Answer","text":"Hugo v0.166.0 upgrades its internal build to Go 1.27. This is one of several improvements in the release, alongside adding es2025 as a supported JavaScript build target and various performance and security enhancements. Keep tabs on toolchain upgrades like Hugo's Go bump with daily.dev."}},{"@type":"Question","name":"What security hardening changes are included in Hugo v0.166.0?","acceptedAnswer":{"@type":"Answer","text":"Hugo v0.166.0 hardens default http.urls and resolved address checks, validates resolved addresses on remote fetches, denies text/org content by default, escapes code-fence attribute values in the default markdown renderer, and fails on symlinks that escape Node.js permission paths in hexec. Follow security-relevant static site generator changes like these via daily.dev."}}]}
```

