사이트 광고 슬롯 설정 추가

This commit is contained in:
2026-06-05 15:43:57 +09:00
parent 928b8446b4
commit 9a4820e69c
16 changed files with 408 additions and 7 deletions

View File

@@ -15,6 +15,9 @@ const { data: tags } = await useFetch('/api/tags', {
const { data: posts } = await useFetch('/api/posts', {
default: () => []
})
const { data: siteSettings } = await useFetch('/api/site-settings', {
default: () => ({})
})
const postToc = useState('post-detail-toc', () => [])
if (!post.value) {
@@ -338,9 +341,19 @@ useHead(() => ({
<section>
<div class="mx-auto max-w-[720px] px-4 sm:px-5">
<SiteAdSlot
class="post-detail__ad-slot post-detail__ad-slot--top mb-8"
:code="siteSettings?.adPostTopCode"
location="post-top"
/>
<ContentRenderer>
<ContentMarkdownRenderer class="post-detail__content" :content="post.content" />
</ContentRenderer>
<SiteAdSlot
class="post-detail__ad-slot post-detail__ad-slot--bottom mt-8"
:code="siteSettings?.adPostBottomCode"
location="post-bottom"
/>
</div>
</section>