function generateFontPathFixes
generateFontPathFixes(options: FixFontPathsOptions): Array<{ name: string; command: string; }>

Generates individual fix commands for manual registration

Use this if you want more control over when each font CSS is fixed.

Examples

Example 1

const fixes = generateFontPathFixes({
  cssFiles: ["fonts-en.css", "fonts-ja.css"],
  fontDirs: ["fonts-en", "fonts-ja"],
});

fixes.forEach(({ name, command }) => {
  site.script(name, command);
  site.addEventListener("afterBuild", name);
});

Parameters

Configuration options

Return Type

Array<{ name: string; command: string; }>

Array of {name, command} objects

Usage

import { generateFontPathFixes } from ".";