feat: allow using pure HTML as label in navbar links (#7079)

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
Alexey Pyltsyn 2022-04-07 13:33:52 +03:00 committed by GitHub
parent 529d853ab8
commit bfbc78e52a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 27 deletions

View file

@ -112,6 +112,13 @@ describe('themeConfig', () => {
docId: 'intro',
label: 'Introduction',
},
// Doc link with HTML as label
{
type: 'doc',
position: 'left',
docId: 'intro',
html: '<b>Introduction</b>',
},
// Regular link
{
to: '/guide/',
@ -119,6 +126,13 @@ describe('themeConfig', () => {
position: 'left',
activeBaseRegex: '/guide/',
},
// Regular link with HTML as label
{
to: '/guide/',
html: '<b>Guide</b>',
position: 'left',
activeBaseRegex: '/guide/',
},
// Regular dropdown
{
label: 'Community',
@ -136,10 +150,10 @@ describe('themeConfig', () => {
},
],
},
// Dropdown with name
// Dropdown with label as HTML
{
type: 'dropdown',
label: 'Tools',
label: 'Tools <sup>new</sup>',
position: 'left',
items: [
{