Access the current site config within a Nuxt context.
<script setup lang="ts">
const siteConfig = useSiteConfig()
</script>
<template>
<div>
<h1>{{ siteConfig.name }}</h1>
</div>
</template>
booleanfalseWill provide a _context object that can be used to track the source of what is setting the site config.
export default defineNuxtConfig({
site: {
name: 'My Site',
},
})
const siteConfig = useSiteConfig({ debug: true })
console.log(siteConfig.name, siteConfig._context.name)
// My Site, 'nuxt.config.ts'
resolveRefsbooleanfalseShould any ref values within the site config be resolved when returned.
skipNormalizebooleanfalseSkips the normalizing of the site config, will return it in a raw format in how it was provided.