Skip to content

Commit 6f23e95

Browse files
BuckyBuck135yanthomasdevsarah11918florian-lefebvre
authored
Fix: build your own font provider - step 3 (#12690)
Co-authored-by: Yan <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: Florian Lefebvre <[email protected]>
1 parent 085a743 commit 6f23e95

File tree

1 file changed

+11
-5
lines changed
  • src/content/docs/en/reference/experimental-flags

1 file changed

+11
-5
lines changed

src/content/docs/en/reference/experimental-flags/fonts.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -857,11 +857,17 @@ An Astro font provider is made up of two parts: the config object and the actual
857857
3. Add your custom provider to your font configuration.
858858
859859
```js title="astro.config.mjs" ins="myProvider()"
860-
fonts: [{
861-
provider: fontProviders.myProvider(),
862-
name: "Custom Font",
863-
cssVariable: "--font-custom"
864-
}]
860+
import { defineConfig } from "astro/config";
861+
import { myProvider } from "./provider/config";
862+
863+
export default defineConfig({
864+
experimental: {
865+
fonts: [{
866+
provider: myProvider(),
867+
// ...
868+
}]
869+
}
870+
});
865871
```
866872
867873
</Steps>

0 commit comments

Comments
 (0)