base.astro
692 Bytes
---
import { getSitePage } from '@lib/api.ts'
import { Replace } from '@lib/astro.ts'
import '@config.ts'
const { data: layoutHtml } = await getSitePage('msd', '/')
const layoutReplacements = {
['.hero-section']: 'content',
['.content-section']: 'DELETE',
['.content-section-4']: 'DELETE',
//['.navbar.w-nav:nth-child(n + 1)']: 'DELETE',
// The following 2 are not implemented yet
//[':nth-child(n + 1 of .navbar.w-nav)']: 'DELETE',
//['.navbar.w-nav:nth-of-type(n + 1)']: 'DELETE',
}
---
<Replace debug={true} html={layoutHtml} replacements={layoutReplacements}>
<define slot="DELETE">{(node) => ''}</define>
<define slot='content'>{(node) => <slot/>}</define>
</Replace>