diff --git a/docs/reference/default-theme-config.md b/docs/reference/default-theme-config.md index 5f1db2a5..9b078eae 100644 --- a/docs/reference/default-theme-config.md +++ b/docs/reference/default-theme-config.md @@ -246,6 +246,7 @@ type SocialLinkIcon = ## footer - Type: `Footer` +- Can be overridden per page via [frontmatter](./frontmatter-config#footer) Footer configuration. You can add a message or copyright text on the footer, however, it will only be displayed when the page doesn't contain a sidebar. This is due to design concerns. diff --git a/docs/reference/default-theme-footer.md b/docs/reference/default-theme-footer.md index 6457798e..02ec70f2 100644 --- a/docs/reference/default-theme-footer.md +++ b/docs/reference/default-theme-footer.md @@ -41,3 +41,13 @@ Only inline elements can be used in `message` and `copyright` as they are render ::: Note that footer will not be displayed when the [SideBar](./default-theme-sidebar) is visible. + +## Frontmatter Config + +This can be disabled per-page using the `footer` option on frontmatter: + +```yaml +--- +footer: false +--- +``` \ No newline at end of file diff --git a/docs/reference/frontmatter-config.md b/docs/reference/frontmatter-config.md index 9008e2b9..1f6ce7f1 100644 --- a/docs/reference/frontmatter-config.md +++ b/docs/reference/frontmatter-config.md @@ -160,3 +160,16 @@ Whether to display [Edit Link](./default-theme-edit-link) in the footer of the c editLink: false --- ``` + +### footer + +- Type: `boolean` +- Default: `true` + +Whether to display [Footer](./default-theme-footer) in the footer of the current page. + +```yaml +--- +footer: false +--- +``` \ No newline at end of file diff --git a/src/client/theme-default/components/VPFooter.vue b/src/client/theme-default/components/VPFooter.vue index 50c381d9..d1dd939c 100644 --- a/src/client/theme-default/components/VPFooter.vue +++ b/src/client/theme-default/components/VPFooter.vue @@ -2,12 +2,12 @@ import { useData } from '../composables/data' import { useSidebar } from '../composables/sidebar' -const { theme } = useData() +const { theme, frontmatter } = useData() const { hasSidebar } = useSidebar()