mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
fix(v2): custom searchbar should appear even if themeconfig.algolia is undefined (#1909)
* fix(v2): custom searchbar should appear even if themeconfig.algolia is undefined * nits * Docs docs * inaccuracy * changelog * nits
This commit is contained in:
parent
f853171791
commit
64871b76e4
6 changed files with 67 additions and 13 deletions
51
website/docs/theme-classic.md
Normal file
51
website/docs/theme-classic.md
Normal file
|
@ -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"`.
|
||||
|
||||
## Footer
|
Loading…
Add table
Add a link
Reference in a new issue