Galaxy Theme by FutureThemes

๐Ÿ“… Fri Apr 05 2024

Galaxy 1.0.6 launched

Now you can add arbitrary tags to your site's <head> through config!


Author:

Jacob Jenkins

One swell guy

FutureThemes Founder


Tags:
galaxy

Galaxy 1.0.6

Now you can pass scripts into your siteโ€™s <head> straight from your Astro config! This is useful for adding things like analytics scripts, favicons, icons and meta data!

astro.config.mjs
GalaxyTheme({
head: [
{
tag: 'script',
attrs: {
async: true,
src: 'https://www.googletagmanager.com/gtag/js?id=G-12345',
}
},
{
tag: 'script',
content: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-12345');
`
}
]
})

Or even add a favicon!

astro.config.mjs
GalaxyTheme({
head: [
{
tag: 'link',
attrs: {
rel: 'icon',
type: 'image/svg+xml'
href: '/favicon.svg',
}
},
]
})

See the documentation here!

Thanks all!

Jacob