generate() — astro Function Reference
Architecture documentation for the generate() function in dev-font-file-id-generator.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD bb3e7b8e_f549_5cdb_4511_cf808eba6364["generate()"] 768a8024_e2d9_a21c_8496_03d353df56e2["DevFontFileIdGenerator"] bb3e7b8e_f549_5cdb_4511_cf808eba6364 -->|defined in| 768a8024_e2d9_a21c_8496_03d353df56e2 style bb3e7b8e_f549_5cdb_4511_cf808eba6364 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/assets/fonts/infra/dev-font-file-id-generator.ts lines 30–50
generate({
cssVariable,
originalUrl,
type,
font,
}: {
originalUrl: string;
type: FontType;
cssVariable: string;
font: unifont.FontFaceData;
}): string {
return [
cssVariable.slice(2),
this.#formatWeight(font.weight),
font.style,
font.meta?.subset,
`${this.#hasher.hashString(this.#contentResolver.resolve(originalUrl))}.${type}`,
]
.filter(Boolean)
.join('-');
}
Domain
Subdomains
Source
Frequently Asked Questions
What does generate() do?
generate() is a function in the astro codebase, defined in packages/astro/src/assets/fonts/infra/dev-font-file-id-generator.ts.
Where is generate() defined?
generate() is defined in packages/astro/src/assets/fonts/infra/dev-font-file-id-generator.ts at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free