feat: conditional render component

This commit is contained in:
Jacky Zhao
2025-03-23 17:34:14 -07:00
parent 951efc1c80
commit 8c5f45a3a4
5 changed files with 50 additions and 2 deletions

View File

@@ -17,7 +17,10 @@ export const sharedPageComponents: SharedLayout = {
// components for pages that display a single page (e.g. a single note)
export const defaultContentPageLayout: PageLayout = {
beforeBody: [
Component.Breadcrumbs(),
Component.ConditionalRender({
component: Component.Breadcrumbs(),
condition: (page) => page.fileData.slug !== "index",
}),
Component.ArticleTitle(),
Component.ContentMeta(),
Component.TagList(),