mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 20:46:58 +02:00
feat: allow using pure HTML as label in navbar links (#7079)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
529d853ab8
commit
bfbc78e52a
5 changed files with 63 additions and 27 deletions
|
@ -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: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue