feat(v2): nav dropdown (#2487)

* feat(v2): allow nav dropdown

* docs(v2): document navbar links

* fix bug
This commit is contained in:
Yangshun Tay 2020-04-01 03:10:04 +08:00 committed by GitHub
parent 054563befe
commit f96c2b61d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 108 additions and 40 deletions

View file

@ -91,25 +91,29 @@ module.exports = {
},
links: [
{
to: 'versions',
label: `${versions[0].substr(6)}`,
position: 'left',
style: {
whiteSpace: 'nowrap',
padding: '0.25rem 0.5rem 0.2rem 0.25rem',
fontSize: 'calc(0.9 * var(--ifm-font-size-base))',
textDecoration: 'underline',
},
},
{
to: 'docs/introduction',
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
activeBasePath: 'docs',
items: [
{
label: versions[0],
to: `docs/introduction`,
},
].concat(
versions.slice(1).map(version => ({
label: version,
to: `docs/${version}/introduction`,
})),
),
},
{to: 'blog', label: 'Blog', position: 'left'},
{to: 'showcase', label: 'Showcase', position: 'left'},
{to: 'feedback', label: 'Feedback', position: 'left'},
{
to: 'versions',
label: `v${versions[0]}`,
position: 'right',
},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',