This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Hugo module that adds Bootstrap Icons support to Hinode sites. It extends the mod-fontawesome module and reuses its icon rendering infrastructure while adding Bootstrap Icons as an additional icon set.
npm start # Start Hugo dev server (includes clean + vendor)
npm run build # Production build (includes clean + vendor)
npm test # Run tests (alias for build)npm run mod:update # Update all Hugo modules
npm run mod:vendor # Vendor Hugo modules to _vendor/
npm run mod:tidy # Clean up unused module dependencies
npm run mod:clean # Remove Hugo module cachenpm run clean # Remove public/ and resources/ directories
npm run upgrade # Update all dependencies (npm + Hugo modules)
./meta.sh # Regenerate data/bi-icons.yml from Bootstrap Iconsnpx git-cz # Interactive commit with Conventional Commits format- config.toml: Defines Hugo module mounts
- Mounts Bootstrap Icons fonts to
static/webfonts - Mounts Bootstrap Icons SCSS to
assets/scss/modules/bootstrap-icons - Mounts Bootstrap Icons SVGs to
assets/svgs/bi
- Mounts Bootstrap Icons fonts to
- data/bi-icons.yml: Generated list of all available Bootstrap Icons (use
./meta.shto regenerate) - exampleSite/: Test site demonstrating module usage with Hugo workspaces
- This module extends mod-fontawesome - both modules MUST be imported together
- Bootstrap Icons are integrated using the same infrastructure as FontAwesome
- Icons can be used via Hinode's icon shortcode system (e.g.,
{{< icon bi bootstrap >}}) - The module supports three rendering modes via the FontAwesome infrastructure: symbols (static SVG sprites with
<use>references), svg (build-time inline SVG), and webfonts (CSS-based) - Hugo workspaces (
exampleSite/mod-bootstrap-icons.work) allow local development without publishing
config.toml: Module configuration and Hugo module mountsdata/bi-icons.yml: List of available icons (auto-generated)meta.sh: Script to regenerate icon list from node_modulesexampleSite/hugo.toml: Example configuration showing workspace usagepackage.json: npm scripts, dependencies, and semantic-release configuration
This project uses semantic-release for automated versioning and releases:
- All commits MUST follow Conventional Commits format
- Husky enforces commit message format via commitlint
- On push to
mainbranch, semantic-release:- Analyzes commits to determine version bump
- Generates release notes
- Creates GitHub release
- Publishes to npm registry
Commit types:
feat:- New feature (minor version bump)fix:- Bug fix (patch version bump)feat!:orfix!:- Breaking change (major version bump)chore:,docs:,style:,refactor:,test:- No version bump
When used in a Hinode site, both modules must be imported:
[module]
[[module.imports]]
path = "github.com/gethinode/mod-bootstrap-icons"
[[module.imports]]
path = "github.com/gethinode/mod-fontawesome/v5"The module inherits FontAwesome configuration parameters:
params.modules.fontawesome.mode: Icon rendering mode - "symbols" (static SVG sprites), "svg" (build-time inline SVG), or "webfonts" (CSS-based fonts)params.modules.fontawesome.debug: Enable debug loggingparams.modules.fontawesome.skipMissing: Skip missing icons without errors
Note: The legacy inline and embed parameters are deprecated as of mod-fontawesome v4.2.0 in favor of the unified mode parameter.
CI runs on macOS, Windows, and Ubuntu with Node.js 22.x and 24.x. Tests validate that the Hugo build completes successfully.