process.env.NUXT_PUBLIC_STATAMIC_URLstringbaseUrl option to set the base URL of the Statamic CMS.export default defineNuxtConfig({
modules: ['@nobears-front-end/nuxt-statamic'],
statamic: {
// Not recommended but possible, rather use the .env file instead.
baseUrl: 'https://your-statamic-api-url.com',
},
});
// Recommended way to set the baseUrl.
NUXT_PUBLIC_STATAMIC_URL=https://your-statamic-api-url.com
process.env.NUXT_DEBUG or falsebooleantrue to enable additional logging and debugging information.export default defineNuxtConfig({
modules: ['@nobears-front-end/nuxt-statamic'],
statamic: {
debug: true,
},
});
NUXT_DEBUG=true
@nuxtjs/i18n module to be installed and configured in your project. (v10 or higher)falsebooleantrue to enable i18n support for the module.Composables:
export default defineNuxtConfig({
modules: ['@nobears-front-end/nuxt-statamic'],
statamic: {
i18n: true,
},
});
v1.1.0falsebooleantrue to enable multi-tenancy support for the module.Composables:
export default defineNuxtConfig({
modules: ['@nobears-front-end/nuxt-statamic'],
statamic: {
multiTenancy: true,
},
});
[]type NavigationsOptions = Array<SingleNavigationsOption | string>;
export default defineNuxtConfig({
modules: ['@nobears-front-end/nuxt-statamic'],
statamic: {
navigations: [
'main',
{
handle: 'footer',
fields: ['title', 'links'],
},
],
},
});
falsebooleanredirects option to enable redirects support for the module.export default defineNuxtConfig({
modules: ['@nobears-front-end/nuxt-statamic'],
statamic: {
redirects: true,
},
});
false | { sitemap: { path: "/sitemap.xml" }, titleTemplate: "%s" }type SeoOptions = {
sitemap?: {
path?: string;
} | boolean;
titleTemplate?: string;
ogImageTemplate?: string;
} | boolean;
seo option to enable SEO support for the module.true or an object, the module will apply the following default configuration and override with the provided options:{
"sitemap": {
"path": "/sitemap.xml"
},
"titleTemplate": "%s"
}
export default defineNuxtConfig({
modules: ['@nobears-front-end/nuxt-statamic'],
statamic: {
seo: true,
// or
seo: {
sitemap: {
path: "/sitemap.xml",
},
titleTemplate: "%s",
},
},
});
{
api: {
globals: {
maxAge: 60 * 60
},
navigations: {
maxAge: 60 * 60
},
redirects: {
maxAge: 60 * 60 * 24
},
sitemap: {
maxAge: 60 * 60 * 24
}
}
}
type ServerOptions = {
/**
* API endpoints configuration
*/
api?: {
globals?: GlobalsCacheOptions;
navigations?: NavigationsCacheOptions;
redirects?: RedirectsCacheOptions;
sitemap?: SitemapCacheOptions;
};
};
server option to configure the server side caching for the module.globals, navigations, redirects and sitemap server side endpoints.export default defineNuxtConfig({
modules: ['@nobears-front-end/nuxt-statamic'],
statamic: {
server: {
api: {
globals: {
maxAge: 60 * 60,
},
// ...
},
},
},
});