File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/nimiq-vitepress-theme/src/composables Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ The Nimiq Vitepress theme supports the following frontmatter options:
3333| ` outline ` | ` boolean ` | ` true ` if headings exist | Whether to show the outline (table of contents) |
3434| ` secondarySidebar ` | ` boolean ` | ` true ` for docs layout, ` false ` for home layout | Whether to show the secondary sidebar |
3535| ` widget ` | ` boolean ` | ` true ` for docs layout, ` false ` for home layout | Whether to show the widget area in the secondary sidebar |
36+ | ` changelog ` | ` boolean ` | ` true ` for docs layout, ` false ` for home layout | Whether to show the changelog in the secondary sidebar |
3637
3738## Page Layouts
3839
@@ -76,6 +77,7 @@ layout: home
7677# Override the default home layout behavior to show the widget area
7778secondarySidebar : true
7879widget : true
80+ changelog : true
7981---
8082```
8183
@@ -88,6 +90,7 @@ The secondary sidebar contains both the outline (table of contents) and optional
8890# Hide the outline but keep the widget
8991outline : false
9092widget : true
93+ changelog : true
9194
9295# Or hide both by disabling the entire secondary sidebar
9396secondarySidebar : false
Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ export const useChangelog = createGlobalState(() => {
3636 const showChangelog = computed ( ( ) => {
3737 if ( frontmatter . value . changelog !== undefined )
3838 return ! ! frontmatter . value . changelog
39- return true
39+
40+ // Default behavior: true for docs layout, false for home layout
41+ const layout = frontmatter . value . layout || 'docs'
42+ return layout === 'docs'
4043 } )
4144
4245 return {
You can’t perform that action at this time.
0 commit comments