41 lines
1.9 KiB
Markdown
41 lines
1.9 KiB
Markdown
# Docusaurus Settings
|
|
|
|
Docusaurus is the tool that generates the website that hosts docs in cloud and OSS.
|
|
Here are some quick relevant guides using docusaurus at Airbyte.
|
|
|
|
### I want to change the sidebar
|
|
- **OSS**: sidebar is generated in a [JSON blob here](https://github.com/airbytehq/airbyte/blob/master/docusaurus/sidebars.js)
|
|
- **OSS**: Here is a guide to the [JSON blob structure](https://docusaurus.io/docs/sidebar/items)
|
|
- **Cloud**: sidebar is autogenerated
|
|
- folders will become dropdown items
|
|
- if there is a `README.md` in the folder
|
|
- it will be the default view
|
|
- the first `# heading` will be the folder title
|
|
- if there is not a `README.md` in the folder name of folder will be the drop down name
|
|
|
|
### But how do I change the links on top?
|
|
- go to one of these config files
|
|
- [OSS file location](https://github.com/airbytehq/airbyte/blob/master/docusaurus/docusaurus.config.js)
|
|
- [Cloud file location](https://github.com/airbytehq/airbyte-cloud/blob/master/docusaurus/docusaurus.config.js#L64)
|
|
- Copy an existing JSON object like this but change the values a bit so people don't think you copied my homework
|
|
```js
|
|
{
|
|
href: 'https://theuselessweb.com',
|
|
position: 'left',
|
|
label: 'A collection of useless websites',
|
|
},
|
|
```
|
|

|
|
- test locally [following this guide](locally_testing_docusaurus.md)
|
|
|
|
|
|
### Updating docusaurus
|
|
|
|
For security and an occasional cool features you may want to update docusaurus. From time to time docusaurus will suggest you do just that.
|
|
It is a reasonable decision to copy the update command docusaurus suggests. It should look something like this:
|
|
```bash
|
|
yarn upgrade @docusaurus/core@latest @docusaurus/plugin-google-gtag@latest @docusaurus/preset-classic@latest
|
|
```
|
|
Keep in mind this won't update dependencies. The upside is that the dependencies probably won't break.
|
|
The downside is that they probably also contain known security vulnerabilities.
|