feat(content-docs): sidebar item type "html" for rendering pure markup (#6519)

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
Jody Heavener 2022-02-02 13:38:35 -04:00 committed by GitHub
parent 65ba551f5b
commit 6ec0db4722
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 172 additions and 3 deletions

View file

@ -71,6 +71,33 @@ const sidebars = {
},
],
},
{
type: 'category',
label: 'HTML items tests',
items: [
// title
{
type: 'html',
value: 'Some Text',
defaultStyle: true,
},
// Divider
{
type: 'html',
value:
'<span style="border-top: 1px solid var(--ifm-color-gray-500); display: block;margin: 0.5rem 0 0.25rem 1rem;" />',
},
// Image
{
type: 'html',
defaultStyle: true,
value: `
<span style="font-size: 0.5rem; color: lightgrey;">Powered by</span>
<img style="width: 100px; height: 100px; display: block;" src="/img/docusaurus.png" alt="Docusaurus Logo" />
`,
},
],
},
],
anotherSidebar: ['dummy'],
};