惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
WordPress大学
WordPress大学
博客园_首页
罗磊的独立博客
D
Docker
N
Netflix TechBlog - Medium
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
D
DataBreaches.Net
I
InfoQ
L
LangChain Blog
GbyAI
GbyAI
V
V2EX
博客园 - 聂微东
P
Proofpoint News Feed
博客园 - 【当耐特】
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
U
Unit 42
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏

Tags from hugo

Release v0.166.0 · gohugoio/hugo Release v0.164.0 · gohugoio/hugo Release v0.163.3 · gohugoio/hugo Release v0.163.2 · gohugoio/hugo Release v0.163.1 · gohugoio/hugo Release v0.163.0 · gohugoio/hugo Release v0.162.1 · gohugoio/hugo Release v0.162.0 · gohugoio/hugo Release v0.161.1 · gohugoio/hugo Release v0.161.0 · gohugoio/hugo Release v0.160.1 · gohugoio/hugo Release v0.160.0 · gohugoio/hugo Release v0.159.2 · gohugoio/hugo Release v0.159.1 · gohugoio/hugo Release v0.159.0 · gohugoio/hugo Release v0.158.0 · gohugoio/hugo
Release v0.165.0 · gohugoio/hugo
2026-08-12 · via Tags from hugo

The two main new things is the new css.ChromaStyles template func and the new importContext option demonstrated below.

{{ $light := css.ChromaStyles (dict "targetPath" "css/components/chroma-light.css" "style" "github" "mode" "light") }}
{{ $dark := css.ChromaStyles (dict "targetPath" "css/components/chroma-dark.css" "style" "github" "mode" "dark") }}
{{ $opts := dict "minify" true "importContext" (slice $light $dark) }}
{{ $css := resources.Get "css/main.css" | css.Build $opts }}

The importContext is relevant for css.Build, js.Build, css.Sass, and css.PostCSS. and it allows you to make resources (e.g. built from resources.FromString) resolvable in e.g. CSS @import statements.