I have an Astro project with an astro.config.mjs
configured with a site
value.
export default defineConfig({
site: 'https://example.com',
// ...etc
})
In my layout, I have <meta>
tags that have the same URL hard coded in them.
<meta property="og:url" content="https://example.com" />
<meta property="og:image" content="https://example.com/social.png" />
I would like to be able to access the site
config value to replace all the hard coded URLs.
<meta property="og:url" content={config.site} />
<meta property="og:image" content={`${config.site}/social.png`} />
How can I access the config values from within a page?