25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
// Fonts and the icon sprite keep fixed names that no build step hashes or renames, so a file that
|
|
// didn't change stays in every visitor's cache across deploys (0011, 0012). Fonts have no version: a
|
|
// changed font ships as a new file with a new name. The sprite's version lives only in its link.
|
|
|
|
/**
|
|
* Raise it with every change to `icons/*.svg` or to the svgo step in `icon-sprite-plugin`, in the
|
|
* same commit. Never reuse or lower it.
|
|
*/
|
|
export const ICON_SPRITE_VERSION = 2;
|
|
|
|
/** Where `icon-sprite-plugin` writes the sprite, under each app's `public/`. Its name never changes. */
|
|
export const ICON_SPRITE_PATH = '/icons/symbol-defs.svg';
|
|
|
|
/**
|
|
* Root-relative and same-origin: `<use href>` never loads across origins, and CORS can't change
|
|
* that. The version is a query string, so a CDN must keep the query in its cache key.
|
|
*/
|
|
export const ICON_SPRITE_URL = `${ICON_SPRITE_PATH}?v=${ICON_SPRITE_VERSION}`;
|
|
|
|
/**
|
|
* The face every page renders first, Yekan Bakh FaNum. Each root layout preloads it. A font file
|
|
* is named only here and in `styles/fonts.css`.
|
|
*/
|
|
export const CRITICAL_FONT_URL = '/fonts/yekan-bakh-fa-num-vf.woff2';
|