mirror of https://github.com/vuejs/vitepress
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
3 years ago
|
# Footer
|
||
|
|
||
2 years ago
|
VitePress will display global footer at the bottom of the page when `themeConfig.footer` is present.
|
||
3 years ago
|
|
||
|
```ts
|
||
|
export default {
|
||
|
themeConfig: {
|
||
|
footer: {
|
||
|
message: 'Released under the MIT License.',
|
||
|
copyright: 'Copyright © 2019-present Evan You'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
|
||
|
```ts
|
||
|
export interface Footer {
|
||
2 years ago
|
// The message shown right before copyright.
|
||
3 years ago
|
message?: string
|
||
|
|
||
|
// The actual copyright text.
|
||
|
copyright?: string
|
||
|
}
|
||
|
```
|
||
|
|
||
2 years ago
|
The above configuration also supports HTML strings. So, for example, if you want to configure footer text to have some links, you can adjust the configuration as follows:
|
||
|
|
||
|
```ts
|
||
|
export default {
|
||
|
themeConfig: {
|
||
|
footer: {
|
||
|
message: 'Released under the <a href="https://github.com/vuejs/vitepress/blob/main/LICENSE">MIT License</a>.',
|
||
|
copyright: 'Copyright © 2019-present <a href="https://github.com/yyx990803">Evan You</a>'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
|
||
2 years ago
|
::: warning
|
||
|
Only inline elements can be used in `message` and `copyright` as they are rendered inside a `<p>` element. If you want to add block elements, consider using [`layout-bottom`](../guide/extending-default-theme#layout-slots) slot instead.
|
||
|
:::
|
||
|
|
||
2 years ago
|
Note that footer will not be displayed when the [SideBar](./default-theme-sidebar) is visible.
|
||
1 year ago
|
|
||
|
## Frontmatter Config
|
||
|
|
||
|
This can be disabled per-page using the `footer` option on frontmatter:
|
||
|
|
||
|
```yaml
|
||
|
---
|
||
|
footer: false
|
||
|
---
|
||
5 months ago
|
```
|