FixIt
CLAUDE.md1.1k starsChanged 15 months agoMITView on GitHub
FixIt is a modern, responsive theme for the Hugo static site generator. Built with Hugo templates, SCSS, UnoCSS, and TypeScript. When theme params are added, removed, or renamed, or Hugo templates/partials (including shortcodes and render hooks) are added, removed, or renamed: There are no unit tests. Verify changes by building pnpm build:demo or pnpm build:test and inspecting the output. Root package.json is @hugo-fixit/core. pnpm workspaces include apps/* and packages/*: Service-class architecture with direct constructor calls:
- Installs packages
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about hugo-fixit/FixIt
- @aetos.me“なんで Japanese が「しろうと」なんだよ。 github.com/hugo-fixit/F...”Bluesky · Apr 19, 2026 · 2 likes
- GGhua/blog“Bump themes/FixIt from `a73416e` to `3f50661`”GitHub · Nov 1, 2026
- mulberyn/blog“Bump themes/FixIt from `a8961f3` to `3f50661`”GitHub · Nov 1, 2026
- mulberyyn/fixit-starter“Bump themes/FixIt from `a8961f3` to `3f50661`”GitHub · Nov 1, 2026
- wangzhiman123/blog“Bump themes/FixIt from `22d86c1` to `d4509f5`”GitHub · Oct 29, 2026
The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 51
Talked about on GitHub and Bluesky (51 times).
On GitHub · 50
- Nov 1, 2026Bump themes/FixIt from `a73416e` to `3f50661` — GGhua/blog0 reactions · 1 comment
- Nov 1, 2026Bump themes/FixIt from `a8961f3` to `3f50661` — mulberyn/blog0 reactions · 1 comment
- Nov 1, 2026Bump themes/FixIt from `a8961f3` to `3f50661` — mulberyyn/fixit-starter0 reactions · 1 comment
- Oct 29, 2026Bump themes/FixIt from `22d86c1` to `d4509f5` — wangzhiman123/blog0 reactions · 2 comments
- Oct 1, 2026build(deps): bump themes/FixIt from `b971a2c` to `99108d5` — nek0x1a/nek0x1a.github.io0 reactions · 3 comments
45 more on GitHub
- Oct 1, 2026Bump themes/FixIt from `a73416e` to `c089db9` — GGhua/blog0 reactions · 2 comments
- Oct 1, 2026Build(deps): Bump themes/FixIt from `b971a2c` to `a16ed3d` — hugo-fixit/hugo-fixit-starter10 reactions · 1 comment
- Aug 1, 2026build(deps): bump themes/FixIt from `a5a7b98` to `a73416e` — nek0x1a/nek0x1a.github.io0 reactions · 3 comments
- Aug 1, 2026Bump themes/FixIt from `658f03d` to `a73416e` — GGhua/blog0 reactions · 1 comment
- Aug 1, 2026Build(deps): Bump themes/FixIt from `a5a7b98` to `a73416e` — hugo-fixit/hugo-fixit-starter10 reactions · 1 comment
- Jul 11, 2026build(deps): bump themes/FixIt from `52ab989` to `6188165` — nek0x1a/nek0x1a.github.io0 reactions · 2 comments
- Jul 1, 2026Bump themes/FixIt from `994a5d4` to `0f35108` — JohanChane/my-blog0 reactions · 2 comments
- Jul 1, 2026Bump themes/FixIt from `eeff00f` to `658f03d` — GGhua/blog0 reactions · 1 comment
- Jul 1, 2026Bump themes/FixIt from `a9b380c` to `658f03d` — la-syh/la-syh-github.io0 reactions · 1 comment
- Jul 1, 2026Build(deps): Bump themes/FixIt from `1012fdc` to `994a5d4` — hugo-fixit/hugo-fixit-starter10 reactions · 1 comment
- Jun 3, 2026Bump themes/FixIt from `4ffd531` to `eeff00f` — GGhua/blog0 reactions · 1 comment
- Jun 3, 2026Bump themes/FixIt from `a9b380c` to `eeff00f` — la-syh/la-syh-github.io0 reactions · 2 comments
- Jun 1, 2026Build(deps): Bump themes/FixIt from `03d81f0` to `eeff00f` — hugo-fixit/hugo-fixit-starter10 reactions · 1 comment
- May 29, 2026Bump themes/FixIt from `0fe8e10` to `a4a0eb1` — attajak/hugo-fixit-bundle-gitmodule0 reactions · 1 comment
- May 17, 2026Bump themes/FixIt from `97ddee0` to `a9b380c` — AuDHDivergent/audhdivergent.github.io0 reactions · 2 comments
- May 15, 2026Bump themes/FixIt from `297670c` to `92b0a6b` — attajak/hugo-fixit-bundle-gitmodule0 reactions · 1 comment
- May 1, 2026Bump themes/FixIt from `e2436a2` to `92b0a6b` — ev1l0o4g/ev1l0o4g.github.io0 reactions · 1 comment
- Apr 1, 2026Bump themes/FixIt from `9e946c6` to `92b0a6b` — ltqk/ai_test0 reactions · 1 comment
- Mar 1, 2026Bump themes/FixIt from `053e5b4` to `2a5bd26` — TypeCombinator/TypeCombinator.github.io0 reactions · 3 comments
- Mar 1, 2026Bump themes/FixIt from `9e946c6` to `93d0b52` — ltqk/ai_test0 reactions · 2 comments
- Mar 1, 2026Bump themes/FixIt from `3f66669` to `2a5bd26` — miiz711/miiz7110 reactions · 1 comment
- Mar 1, 2026Bump themes/FixIt from `f5fb989` to `2a5bd26` — TranDung6129/TranDung6129.github.io0 reactions · 1 comment
- Feb 1, 2026Bump themes/FixIt from `053e5b4` to `9e946c6` — TypeCombinator/TypeCombinator.github.io0 reactions · 2 comments
- Feb 1, 2026Bump themes/FixIt from `3f66669` to `9e946c6` — miiz711/miiz7110 reactions · 2 comments
- Feb 1, 2026Bump themes/FixIt from `f5fb989` to `9e946c6` — TranDung6129/TranDung6129.github.io0 reactions · 2 comments
- Feb 1, 2026Bump themes/FixIt from `c3cba94` to `9e946c6` — yamadatt/hugo-fixit0 reactions · 1 comment
- Jan 1, 2026Bump themes/FixIt from `f5fb989` to `44b1271` — TranDung6129/TranDung6129.github.io0 reactions · 2 comments
- Jun 1, 2025Bump themes/FixIt from `3f66669` to `cfe1d7a` — salvari/fixit_2025010 reactions · 1 comment
- Jun 1, 2025Bump themes/FixIt from `2b936cb` to `cfe1d7a` — salvari/fixtit_20250 reactions · 1 comment
- May 1, 2025Bump themes/FixIt from `094a33e` to `a85a665` — DesmonXD/gitweb0 reactions · 1 comment
- May 1, 2025Bump themes/FixIt from `0781670` to `a85a665` — gzbigegg/agentic0 reactions · 1 comment
- Feb 1, 2025Bump themes/FixIt from `094a33e` to `3f66669` — fengguowudi/fengguowudi.github.io0 reactions · 1 comment
- Jan 2, 2025Adicionar Guia de Contribuição — pydatamanaus/pydatamanaus.github.io0 reactions · 1 comment
- Jan 1, 2025Bump themes/FixIt from `c0b9a51` to `1e59a68` — geekstormm/geekstormm.github.io0 reactions · 1 comment
- Nov 1, 2024Bump themes/FixIt from `51d64cb` to `0c0fb03` — deepreadingnet/hugo-fixit0 reactions · 1 comment
- Jul 26, 2024请问这个服务会长期保持可用性吗? — evannotfound/vercount0 reactions · 9 comments
- Jul 1, 2024Bump themes/FixIt from `c9af0b9` to `9d1ab1a` — Weikunzh/kkuner.github.io0 reactions · 1 comment
- May 1, 2024Bump themes/FixIt from `9eb18b9` to `fd0b171` — sunnywanggit/site0 reactions · 1 comment
- Mar 1, 2024Bump themes/FixIt from `8b2dd97` to `c9af0b9` — Charles2029/charles20291.github.io0 reactions · 1 comment
- Mar 1, 2024Bump themes/FixIt from `95c8113` to `c9af0b9` — salvari/newFixItgit0 reactions · 1 comment
- Feb 1, 2024Bump themes/FixIt from `95c8113` to `b7dba07` — VonGHemsidor/kranar-online0 reactions · 1 comment
- Jan 8, 2024Bump themes/FixIt from `8bb2a35` to `38eb829` — zengrunzi/zengrunzi.github.io0 reactions · 1 comment
- Jan 1, 2024Bump themes/FixIt from `b5208b3` to `8b2dd97` — CGNAV/cf0 reactions · 1 comment
- Nov 30, 2023Bump themes/FixIt from `95c8113` to `8aa3cf9` — xilet/xilet.github.io0 reactions · 1 comment
- Aug 1, 2023Bump themes/FixIt from `ff95cfa` to `3443e07` — 1an8r0wn/hugo-fixit0 reactions · 1 comment
On Bluesky · 1
- Apr 19, 2026なんで Japanese が「しろうと」なんだよ。 github.com/hugo-fixit/F... — @aetos.me2 likes and reposts · 1 reply
In this repositoryOne other file it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
18 rules. About 0 are common, 5 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
When theme params are added, removed, or renamed, or Hugo templates/partials (including shortcodes and render hooks) are added, removed, or …
- Very specific: line 47
Update the corresponding pages in ../fixit-docs/content/en/ and ../fixit-docs/content/zh-cn/.
- Very specific: line 49
Do not hand-edit content between the HUGO_FIXIT_PARAMS or HUGO_FIXIT_PARTIALS markers.
- Very specific: line 50
Run pnpm -C ../fixit-docs lint after editing docs.
- Very specific: line 122
Use fi-var(name, fallback) to reference CSS custom properties (auto-adds the --fi- prefix), never use var(--fi-...) directly
- Very specific: line 124
Put nested selectors and at-rules after the parent block's declarations and @includes
- Distinctive: line 126
Use CSS variables for theme switching.
- Distinctive: line 127
Prefer relative units (rem, em, %) over absolute units
- Distinctive: line 128
Keep selector nesting shallow
- Very specific: line 153
Use UnoCSS for one-off layout, spacing, visibility, and alignment on template markup: hidden, sr-only, flex, items-center, justify-center, …
- Very specific: line 154
Use SCSS for component styling: visual identity, is-active/is-open states, pseudo-elements, --fi-* custom properties, light-dark(), RTL, …
- Distinctive: line 156
Never mix both on the same concern: a component class owns its internal styling.
- Very specific: line 157
Do not use @apply in SCSS.
- Very specific: line 169
Use ES6 # private fields — not TypeScript private with _ prefix
- Very specific: line 172
Import the shared eventBus singleton from core/event-bus — do not create new instances
- Very specific: line 181
Use partialCached for expensive partials that don't change per page
- Very specific: line 182
Use .Site.Store for shared computed values (e.g.
- Very specific: line 183
Check hugo.IsProduction before adding analytics or minification
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
FixIt is a modern, responsive theme for the Hugo static site generator. Built with Hugo templates, SCSS, UnoCSS, and TypeScript.
Development Commands
Prerequisites
- Node.js >= 20
- Hugo Extended >= 0.166.0 (Dart Sass required)
- pnpm
Development
pnpm install # Install dependencies
pnpm dev:demo # Start demo site dev server
pnpm dev:test # Start test site dev server
pnpm dev:docs # Start docs dev server (requires fixit-docs as sibling directory)Build
pnpm build:demo # Build demo site
pnpm build:test # Build test site
pnpm build # Build all sites (demo + test, merged into public/)
pnpm preview # Preview built site (requires build first)Code Generation
pnpm gen:lexers # Regenerate assets/scss/core/maps/_chroma-lexers.scss from Chroma source
pnpm gen:docs # Regenerate English theme config and partials docs into ../fixit-docsDocumentation
When theme params are added, removed, or renamed, or Hugo templates/partials (including shortcodes and render hooks) are added, removed, or renamed:
- Run
pnpm gen:docs. - Update the corresponding pages in
../fixit-docs/content/en/and../fixit-docs/content/zh-cn/. gen:docsregenerates English pages only; manually sync the Chinese translations.- Do not hand-edit content between the
HUGO_FIXIT_PARAMSorHUGO_FIXIT_PARTIALSmarkers; regenerate it instead. - Run
pnpm -C ../fixit-docs lintafter editing docs.
Code Quality
pnpm lint # Run ESLint
pnpm typecheck # Run TypeScript type checkingThere are no unit tests. Verify changes by building pnpm build:demo or pnpm build:test and inspecting the output.
Architecture
Monorepo Structure
Root package.json is @hugo-fixit/core. pnpm workspaces include apps/* and packages/*:
apps/demo/— Demo site (deployed todemo.fixit.lruihao.cn)apps/test/— Test site for exercising theme featurespackages/shared— Shared utilities (exportsworkspaceRoot,fromRoot,runCommand,capitalize,consola)packages/versioning— Version management (auto-updates version inlayouts/_partials/init/index.htmlduring pre-commit)packages/integration— Post-build: merges demo/test output intopublic/packages/chroma-lexers— Generates Chroma lexer SCSS map from GitHub
JavaScript Module System (assets/js/)
Service-class architecture with direct constructor calls:
main.ts— Entry point. Instantiates all modules with direct constructor calls, builds the typedwindow.fixitpublic API facade, and runs the init sequence onDOMContentLoaded.types/— TypeScript type definitions:config.ts—FixItConfigand all config sub-types.ui.ts—FixItPublicAPI, globalwindowaugmentation for third-party libs.third-party.ts— Types for vendored libraries.
core/— Infrastructure layer:event-bus.ts— Typed event bus singleton wrapping DOMCustomEvents. ExportseventBus(module-level singleton) andFixItEventMaptype.tokens.ts— Service interfaces (CoreService,ThemeService,CodeService, etc.) used for module constructor typing.
modules/— Feature modules. Each is a class implementing its service interface. Dependencies are constructor-injected. Private state uses ES6#fields. Modules: charts, code, content, core, encryption, events, menu, misc, search, theme, toc.pagefind.tsis a standalone factory consumed bySearchModule.utils/— Pure utility functions (no side effects, no DOM state). Re-exported fromutils/index.ts.i18n/— Runtime translations for JS-only strings (not available via Hugo'sTfunction ordata-*attributes). Each language is a separate file (en.ts,zh-CN.ts, etc.) exporting aTranslationsobject. Language codes match Hugo's i18n file names anddocument.documentElement.lang. Exportst(key)with English fallback. To add a language: create<lang>.ts, import inindex.ts. To add a key: add toTranslationsinterface and every language file.lib/— Third-party library wrappers (aplayer, echarts, file-tree, fixit-decryptor, lightgallery, mapbox, mathjax, mermaid, etc.). All import the sharedeventBussingleton.head/—color-scheme.tsruns synchronously in<head>before body render to prevent flash of wrong theme.pages/— Page-specific scripts (e.g.link.tsfor the link guard redirection page).
Cross-module communication uses the shared eventBus singleton, not direct module imports. The window.fixit facade exposes a typed public API for user custom scripts (custom.ts): theme control, scroll state, mask overlay management, content re-initialization, and the event bus.
Hugo Templates (layouts/)
_partials/— Reusable template components (organized intoinit/,base/,function/,plugin/,single/,store/)_shortcodes/— 31 custom shortcodes (admonition, aplayer, echarts, file-tree, mermaid, tabs, timeline, etc.)_markup/— 15 render hooks (code blocks, headings, images, links, tables, blockquote alerts, passthrough for math)
Asset Pipeline
Hugo Pipes processes all assets. The key orchestration is in _partials/base/assets.html:
- CSS:
scss/main.scssis the entry point importingcore/,pages/,widgets/,custom. SCSS variables are configured viahugo:vars(user-configurable from[params.appearance]) andhugo:vars/internal(theme system config). UnoCSS utility classes are pre-built toassets/css/unocss.css(viapnpm unocss), loaded before the main SCSS bundle. - JS:
_partials/function/js-build.htmlwrapsjs.Buildwith minify-in-production defaults. Hugo's@paramsinjection passes config values into TypeScript at build time. - Third-party libraries: Stored in
assets/lib/(vendored, not npm-managed). Tracked bylibrarybot.ymland updated quarterly by thehugo-fixit/librarybotGitHub Action. Can be overridden via CDN config inassets/data/cdn/jsdelivr.ymlorunpkg.yml.
Theme Configuration
hugo.toml— Default theme configuration (1700+ lines). Uses_merge = "shallow"to let user configs override without deep merging.theme.toml— Theme metadata
Coding Standards
SCSS (assets/scss/)
- CSS classes: BEM or semantic naming (
header-desktop,menu-item) - SCSS variables: hyphen-separated, semantic (
$global-font-family) - CSS custom properties: prefixed with
--fi-, written through@include set-fi-var(name, value)(orset-fi-varsfor a map); never write--fi-*: ...directly in SCSS - Runtime JS-set custom properties (e.g.
--fi-nav-scroll-x) are the exception: set them withstyle.setProperty, and read them withfi-var(name, fallback) - Use
fi-var(name, fallback)to reference CSS custom properties (auto-adds the--fi-prefix), never usevar(--fi-...)directly - Within a block, put
@includecalls after all regular declarations and before nested blocks - Put nested selectors and at-rules after the parent block's declarations and
@includes - Separate sibling blocks (nested selectors, at-rules, mixin blocks) with one blank line
- Use CSS variables for theme switching; SCSS variables for colors (no hardcoded values)
- Prefer relative units (rem, em, %) over absolute units
- Keep selector nesting shallow
.sub-menu {
position: absolute;
// regular declarations...
@include set-fi-var(submenu-offset, -0.5rem);
@include border-radius;
@include z-index(base, 1);
[dir="rtl"] & {
@include set-fi-var(submenu-offset, 0.5rem);
}
.menu-item {
// ...
}
}UnoCSS vs SCSS
UnoCSS handles placement; SCSS handles appearance. Do not translate existing component styles into utilities.
- Use UnoCSS for one-off layout, spacing, visibility, and alignment on template markup:
hidden,sr-only,flex,items-center,justify-center,w-full,mx-auto,me-1,my-4,max-sm:w-full,print:hidden, theme colors (text-secondary,bg-danger), and placement wrappers in shortcodes. - Use SCSS for component styling: visual identity,
is-active/is-openstates, pseudo-elements,--fi-*custom properties,light-dark(), RTL, transitions/animations, and anything reused across templates. - Threshold: at most 3 utility classes on one element. Four or more means it is appearance, not placement — extract a component class.
- Never mix both on the same concern: a component class owns its internal styling.
- Do not use
@applyin SCSS.
Generation and constraints:
assets/css/unocss.cssis pre-built and committed. Build and dev do not regenerate it: after adding or removing utility classes inlayouts/orassets/js/, runpnpm unocssand commit the CSS. Classes that are not regenerated silently do nothing.- Dynamically composed class names must be written as complete literals or added to the
safelistinpackages/unocss-preset/src/index.ts(e.g.,order-*,sm:hidden). - Semantic class names must not collide with utility names (e.g.,
table-caption). Add unavoidable collisions to the presetblocklist. - Responsive breakpoints:
sm:(>=680px),md:(>=960px),lg:(>=1200px),xl:(>=1440px). Usemax-sm:for xs (<680px). - Wrap comment prose and SVG
dpath data with@unocss-skip-start/@unocss-skip-endwhen they contain utility-like words (e.g.,grid,filter); the extractor otherwise treats them as class names.
TypeScript
- Use ES6
#private fields — not TypeScriptprivatewith_prefix - One module per file, one service interface per module
- Constructor injection for dependencies — no global state access
- Import the shared
eventBussingleton fromcore/event-bus— do not create new instances - Pure functions only in
utils/— no side effects, no DOM state - Comment style: follow TSDoc conventions
Hugo Templates
- Variable naming: camelCase (
$footerConfig,$fingerprint) - Translation: use
Tfunction ({{ T "header.switchTheme" }}) - Whitespace: use
{{- -}}trim markers - Use
partialCachedfor expensive partials that don't change per page - Use
.Site.Storefor shared computed values (e.g. fingerprint) - Check
hugo.IsProductionbefore adding analytics or minification - Minimize
idattribute usage — prefer class selectors for styling and JS queries. Reserveidfor:<label for>,aria-controls/aria-labelledby, fragment anchors, or third-party library requirements
Commit Convention
Follows Conventional Commits:
<type>(<scope>): <subject>Types: feat, fix, refactor, chore, docs, perf, style, test, ci, build
Scopes: workflow, archetypes, assets, i18n, layouts, config, or specific directories.
Pre-commit Hooks
Pre-commit runs: versioning (dev mode), typecheck, lint-staged (eslint --fix on staged files).
ESLint
Uses @antfu/eslint-config with TypeScript support. Config at eslint.config.ts.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

