feat: conditional render component
This commit is contained in:
parent
4e74d11b1a
commit
aaa5c8e8e4
5 changed files with 50 additions and 2 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue