Commit Graph

8 Commits

Author SHA1 Message Date
Cell 2c0b48370b feat(gen-docs): add Hugo partials docs generation (#809)
* feat(gen-docs): add documentation generation package with SassDoc and TypeDoc support

Add new `@hugo-fixit/gen-docs` package that parses Hugo config (hugo.toml) and generates
documentation. Includes SassDoc annotations for SCSS variables and mixins, TypeDoc config
for TypeScript source docs, and a `.sassdocrc` configuration file.

* docs(readme): add browsers support section

* feat(gen-docs): add Hugo partials docs generation and fix config empty sections

- Add partial-parser.ts: parses Hugo partial comment blocks (@param/@return/@example)
- Add partials.ts renderer: generates grouped Markdown with param tables
- Add `partials` subcommand with -t/-o options for template injection
- Fix config-parser: empty TOML sections (library.js/library.css) now retain descriptions
- Fix config-parser: correctly distinguish section-level vs key-level comments
- Update README with partials subcommand documentation
2026-07-21 12:19:07 +08:00
Cell a2d756777f fix(tabs): revert tab and tabs rendering (#772) and update chroma lexers 2026-07-10 19:44:17 +08:00
Cell 8af8e806d7 feat(assets): integrate UnoCSS for utility classes and presetIcons (#795)
* refactor(assets): integrate UnoCSS for utility classes

- Add UnoCSS with presetWind3 as pre-built CSS (assets/css/unocss.css)
- Add uno.config.ts with theme breakpoints, colors, safelist, and blocklist
- Replace SCSS utility classes with UnoCSS atomic classes:
  - d-none → hidden
  - d-none-desktop → sm:hidden
  - d-none-mobile → max-sm:hidden
  - order-* (safelist)
  - variant-numeric → tabular-nums lining-nums
- Rename .blur to .is-blur to avoid UnoCSS conflict
- Add @unocss-skip comments for SVG path elements to prevent false positives
- Remove redundant _utilities.scss ($orders map) and simplify _common.scss
- Update documentation (CLAUDE.md, CONTRIBUTING.md, copilot-instructions.md)

* refactor(assets): replace 404/offline SCSS with UnoCSS atomic classes

- Replace _404.scss styles with atomic classes on template elements
- Replace _offline.scss styles with atomic classes on template elements
- Keep selectors (id/class) as user customization hooks
- Delete assets/scss/pages/_404.scss and _offline.scss

* refactor(assets): simplify SCSS with UnoCSS atomic classes

- Replace _bilibili.scss with atomic classes (relative, aspect-video, inset-0)
- Replace _version.scss with atomic classes (whitespace-nowrap, align-text-bottom)
- Replace _noscript-warning.scss with atomic classes (bg-danger, fixed, z-200)
- Add semantic z-index shortcuts (z-hide, z-auto, z-base, z-loading, z-sticky, z-fixed)
- Add h1-h6 to UnoCSS blocklist to prevent false positives
- Use Source path for UnoCSS CSS loading to enable Hugo minify

* chore(assets): minor SCSS and template cleanup

* fix(assets): add secondary color to UnoCSS theme config

text-secondary was broken because the secondary color mapping was missing.

* feat(assets): add UnoCSS presetIcons support and z-index shortcuts

- Add presetIcons preset with empty collections (ready for custom icon sets)
- Add @iconify/json and @iconify/utils devDependencies
- Add semantic z-index shortcuts (z-hide, z-auto, z-base, z-loading, z-sticky, z-fixed)
- Add secondary color to UnoCSS theme config

* refactor(assets): replace SVG icons with UnoCSS presetIcons

- Add Lucide and Octicons icon collections to presetIcons config
- Replace arrow-up/down and enter-key SVGs with Lucide icons
- Replace alert icons (info, light-bulb, report, alert, stop) with Octicons
- Delete replaced SVG files from assets/images/icons/
- Keep custom SVGs (csdn, plume, rootme)

* refactor(layouts): redesign 404 and offline pages with UnoCSS

- Replace translate-y-[30vh] with self-stretch flex centering below header
- Remove arbitrary values (text-[3.6rem], text-[1.8rem], etc.)
- Restore @page print styles in _common.scss
- Simplify offline page layout (icon + title + text)
- Fix hardcoded #57606a → text-secondary
2026-06-27 06:27:12 +08:00
Cell f5b030b4eb chore(packages): replace helpers with standalone chroma-lexers and enrich shared
- Replace helpers dispatcher pattern with standalone chroma-lexers package
- Add runCommand, fromRoot, consola re-export to shared
- Update versioning and integration to use shared utilities
- Shorten dev version format: base36 timestamp, no hash
- Rename eslint.config.js to eslint.config.ts (add jiti)
- Add README.md to each package
2026-06-11 10:35:10 +08:00
Cell 03ca90b49f feat(assets): add helpers package for chroma lexer map generation (#781)
- Add `packages/helpers` with CLI dispatcher pattern for code generation
- Add `chroma-lexers` helper that fetches lexer definitions from alecthomas/chroma
- Rename `$code-type-map` to `$chroma-lexers`, `_code-type.scss` to `_chroma-lexers.scss`
- Fix `fi-var` and `set-fi-var` to preserve quotes for string fallbacks
- Add `capitalize` utility to `packages/shared`
- Replace `console.*` with `consola` in packages
- Add `pnpm gen:lexers` script and CI workflow for auto-regeneration
- Update CLAUDE.md and CONTRIBUTING.md
2026-06-03 16:41:07 +08:00
Cell 76f809794f refactor(assets): simplify template pipeline and resource handling
- Simplify `resources.Get` calls to string paths in script pipeline
  callers (plugin/script.html handles resources.Get internally)
- Refactor js-build.html to use $defaultOptions merge pattern matching
  style.html's ToCSS handling for better readability
- Refactor style.html ToCSS with $defaultOptions merge pattern and
  automatic targetPath generation from resource name
- Remove redundant custom $options dicts for targetPath that match
  the new default behavior
- Update partial docs for script.html and style.html
2026-05-29 21:55:09 +08:00
Cell dd6d320654 refactor!: build with Dart Sass and update Vercel deployment scripts (#746)
* BREAKING CHANGE: refactor with Dart Sass (supplement to #741)

* chore: update .gitignore to include .vercel and .env*.local

* CI: add build script for Hugo site deployment on Vercel

* CI: update build script for Hugo site deployment on Vercel

* refactor: update SCSS layout styles and introduce page-style mixin

* refactor: reorganize SCSS files and improve layout structure

* refactor: rename copy button classes and update related styles
2026-05-10 23:02:54 +08:00
Cell 09e08d0772 refactor!: migrate theme assets from css to scss and centralize deprecation detection (#735)
**Breaking changes**:

1. Legacy custom style/script files are no longer loaded automatically.
2. Users must migrate custom files to:
   - `custom.scss`
   - `override.scss`
   - `_variables.scss`
   - `assets/js/custom.js`

**Migration guide**:

1. Move `assets/css/_custom.scss` to `assets/scss/custom.scss`.
2. Move `assets/css/_override.scss` to `assets/scss/override.scss`.
3. Keep variables in `assets/scss/_variables.scss`.
4. Move `assets/js/_custom.js` to `assets/js/custom.js`.
5. Rebuild site and verify no deprecation warnings remain.
2026-04-19 13:34:01 +08:00