-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(v2): custom searchbar should appear even if themeconfig.algolia i…
…s undefined
- Loading branch information
Showing
4 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
id: theme-classic | ||
title: Classic Theme Configuration | ||
--- | ||
|
||
_This section is a work in progress._ | ||
|
||
## Navbar | ||
|
||
### Navbar Title & Logo | ||
|
||
You can add a logo and title to the navbar via `themeConfig.navbar`. Logo can be placed in [static folder](static-assets.md). | ||
|
||
```js | ||
// docusaurus.config.js | ||
module.exports = { | ||
themeConfig: { | ||
navbar: { | ||
title: 'Site Title', | ||
logo: { | ||
alt: 'Site Logo', | ||
src: 'img/logo.svg', | ||
}, | ||
} | ||
} | ||
``` | ||
### Navbar Links | ||
You can add links to the navbar via `themeConfig.navbar.links`: | ||
```js | ||
// docusaurus/config.js | ||
module.exports = { | ||
themeConfig: { | ||
navbar: { | ||
links: [ | ||
{ | ||
to: 'docs/docusaurus.config.js', | ||
label: 'docusaurus.config.js', | ||
position: 'left', | ||
}, | ||
// ... other links | ||
], | ||
} | ||
} | ||
``` | ||
Outbound links automatically get `target="_blank" rel="noopener noreferrer"`. You can offer `target` and `rel` to customize the attributes: | ||
## Footer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters