The browser never talks to Strapi: pages call Nitro endpoints under server/api/, which are the only place Strapi queries are built. That keeps the Strapi URL internal to the Docker network and avoids CORS entirely. Article bodies are rendered from Markdown to HTML in the endpoint, so the content is server-rendered and crawlable, marked stays out of the client bundle, and the meta description is derived from the opening of the body. Pages carry canonical URLs, Open Graph tags and BlogPosting structured data, and handle empty, missing and failed states.
31 lines
774 B
TypeScript
31 lines
774 B
TypeScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
export default defineNuxtConfig({
|
|
compatibilityDate: '2025-07-15',
|
|
devtools: { enabled: true },
|
|
|
|
css: ['~/assets/css/main.css'],
|
|
|
|
app: {
|
|
head: {
|
|
htmlAttrs: { lang: 'it' },
|
|
meta: [{ name: 'viewport', content: 'width=device-width, initial-scale=1' }],
|
|
},
|
|
},
|
|
|
|
runtimeConfig: {
|
|
// Server-only: internal Strapi address, never exposed to the browser.
|
|
strapiUrl: 'http://localhost:1337',
|
|
strapiToken: '',
|
|
public: {
|
|
// Canonical origin of the public website.
|
|
siteUrl: 'http://localhost:3000',
|
|
// Browser-reachable Strapi origin, used to build absolute media URLs.
|
|
strapiUrl: 'http://localhost:1337',
|
|
},
|
|
},
|
|
|
|
typescript: {
|
|
strict: true,
|
|
},
|
|
})
|