You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -4,13 +4,15 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Overview
6
6
7
-
This is a Hugo module that provides Font Awesome icon integration for Hinode sites. It automatically fetches Font Awesome SVG files during installation and exposes them through Hugo shortcodes (`{{< icon >}}`, `{{< fa >}}`, `{{< fab >}}`, `{{< fas >}}`). The module supports both inline SVG embedding and web font approaches.
7
+
This is a Hugo module that provides Font Awesome icon integration for Hinode sites using FontAwesome's official SVG+JS approach. The module supports both SVG rendering (using FontAwesome JavaScript) and webfont rendering (using FontAwesome CSS).
8
+
9
+
**Version 4.0 Changes:** This module now uses FontAwesome's official SVG+JS architecture and mounts directly from node_modules. No more dist/ folder or build scripts.
8
10
9
11
## Development Commands
10
12
11
13
### Setup and Installation
12
14
```bash
13
-
npm install # Install dependencies and copy Font Awesome files to dist/
15
+
npm install # Install dependencies (FontAwesome is in node_modules)
14
16
npm run mod:vendor # Vendor Hugo modules into _vendor/
-`embed` (boolean, default: false) - Enable symbol maps for SVG icons. When enabled, icons are defined once in a hidden `<svg>` element and referenced via `<use>`. Only applies to inline SVG mode (custom icons, Bootstrap Icons, etc.). Reduces HTML size when icons are reused. Requires `{{- partial "assets/symbols.html" . -}}` in your layout.
98
+
-`debug` (boolean, default: false) - Debug output for FontAwesome icons
99
+
-`skipMissing` (boolean, default: false) - Error handling for missing icons
100
+
-`styles` (array, optional) - Icon sets to load when `inline=true`. Valid values: "solid", "regular", "brands". Default: all three.
101
+
102
+
**Removed parameters (from v3):**
103
+
-`renderMode` - No mixed mode support in v4
104
+
105
+
### Template Integration
106
+
107
+
Sites using this module must include the FontAwesome JS loader partial in their layout:
64
108
65
-
**Important:** When using webfonts (`inline = false`), Dart Sass is required to compile Font Awesome 7.x SCSS. Configure the transpiler in your stylesheet partial:
| fontawesome.embed | true | If set, generates a symbol map with embedded vector images. Only works in conjunction with `inline`. Include the symbol with the partial `assets/symbols.html` (requires the current page context).|
47
-
| fontawesome.inline | true | If set, uses inline vector images instead of web fonts. Both methods support Font Awesome styling and animation. However, when using vector images you cannot use aliases. Instead, use the default name of the icon. |
48
-
| fontawesome.debug | true | If set, prints the original code `<i class="[...]" style=[...]></i>` as comments next to the inline vector image. |
49
-
| fontawesome.skipMissing | false | If set, displays a warning when an icon cannot be found. The missing icon is replaced with a dummy. By default, Hinode exits with an error when an icon is missing. |
46
+
| fontawesome.embed | false | If set, generates a symbol map with embedded vector images. Only works with inline SVG mode (`inline = true`). Icons are defined once in a hidden `<svg>` element and referenced via `<use>`, reducing HTML size when icons are reused. Requires including the partial `{{- partial "assets/symbols.html" . -}}` in your layout (requires the current page context).|
47
+
| fontawesome.inline | true | If set, uses inline SVG mode with FontAwesome JS. If false, uses web fonts via CSS. Both methods support Font Awesome styling and animation. |
48
+
| fontawesome.debug | false | If set, prints debug information as comments in the generated HTML. |
49
+
| fontawesome.skipMissing | false | If set, displays a warning when an icon cannot be found instead of exiting with an error. |
50
+
| fontawesome.styles |["solid", "regular", "brands"]| Array of FontAwesome icon sets to load when `inline=true`. Valid values: "solid", "regular", "brands". Omit this parameter to load all three. |
0 commit comments