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.
28 lines
614 B
Vue
28 lines
614 B
Vue
<script setup lang="ts">
|
|
import type { NuxtError } from '#app'
|
|
|
|
const props = defineProps<{ error: NuxtError }>()
|
|
|
|
const isNotFound = computed(() => props.error.statusCode === 404)
|
|
|
|
useSeoMeta({ robots: 'noindex' })
|
|
</script>
|
|
|
|
<template>
|
|
<NuxtLayout>
|
|
<h1>{{ isNotFound ? 'Pagina non trovata' : 'Qualcosa è andato storto' }}</h1>
|
|
|
|
<p class="muted">
|
|
{{
|
|
isNotFound
|
|
? 'Il contenuto che cerchi non esiste o è stato spostato.'
|
|
: 'Riprova tra qualche istante.'
|
|
}}
|
|
</p>
|
|
|
|
<p>
|
|
<NuxtLink to="/">Torna alla home</NuxtLink>
|
|
</p>
|
|
</NuxtLayout>
|
|
</template>
|