Skip to content

Commit

Permalink
docs: add html in footer example (#1487)
Browse files Browse the repository at this point in the history
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
  • Loading branch information
Jimmylxue and brc-dd committed Oct 14, 2022
1 parent ead9b8c commit 0b61665
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/guide/theme-footer.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,17 @@ export interface Footer {
}
```

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>'
}
}
}
```

Note that footer will not be displayed when the [SideBar](./theme-sidebar) is visible.

2 comments on commit 0b61665

@Goozoon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy-paste to sample site and URL wont render. Stays as "<a href="https://gi..."

@brc-dd
Copy link
Member

@brc-dd brc-dd commented on 0b61665 Nov 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Goozoon Please create an issue instead of commenting on commits. It's working fine for us, you probably have an older version of VitePress installed.

Please sign in to comment.