I want to enqueue an external CSS from Typekit (Adobe fonts). They provide a link like this:
<link rel="stylesheet" href="https://use.typekit.net/xxxxxxxxxxxxx.css">
How do I enqueue this external link with Bud?
I want to enqueue an external CSS from Typekit (Adobe fonts). They provide a link like this:
<link rel="stylesheet" href="https://use.typekit.net/xxxxxxxxxxxxx.css">
How do I enqueue this external link with Bud?
@import
as it is blockingwp_enqueue_style
, which you could add in the wp_enqueue_scripts
action in app/
Something like this:
wp_enqueue_style('muh-font', 'https://font.saas/muh-font', false);
For non WordPress use of bud.js
In case someone is searching for how to do this outside the context of Sage:
<link>
directly to the <head>
element.bud.template()
and pass it the path to the file you made:export default async bud => {
bud.template({
template: bud.path(`index.html`)
})
}