페이지 섹션 관리와 홈 Pages 진열장 연동, 공개 목록 표시개수 설정 관련 누적 로컬 변경을 기능 단위로 정리해 반영한다. 문서 이력과 패키지 버전을 v1.9.23으로 맞춰 코드와 문서 상태를 동기화한다. Co-authored-by: Cursor <cursoragent@cursor.com>
39 lines
1.0 KiB
Vue
39 lines
1.0 KiB
Vue
<script setup>
|
|
definePageMeta({
|
|
layout: 'page'
|
|
})
|
|
|
|
const route = useRoute()
|
|
const slug = computed(() => String(route.params.slug || ''))
|
|
|
|
const { data: page } = await useFetch(() => `/api/pages/${slug.value}`)
|
|
|
|
if (!page.value) {
|
|
throw createError({
|
|
statusCode: 404,
|
|
statusMessage: '페이지를 찾을 수 없습니다.'
|
|
})
|
|
}
|
|
|
|
onMounted(() => {
|
|
if (page.value?.renderMode === 'html_document') {
|
|
window.location.reload()
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<article v-if="page.renderMode !== 'html_document'" class="static-page mx-auto min-h-screen max-w-3xl px-6 py-16">
|
|
<p class="static-page__eyebrow text-xs font-semibold uppercase text-muted">
|
|
Page
|
|
</p>
|
|
<h1 class="static-page__title mt-4 text-5xl font-semibold leading-tight">
|
|
{{ page.title }}
|
|
</h1>
|
|
<ContentRenderer class="static-page__content mt-8">
|
|
<ContentMarkdownRenderer :content="page.content" />
|
|
</ContentRenderer>
|
|
</article>
|
|
<div v-else class="static-page__html-redirect min-h-screen" />
|
|
</template>
|