2021-12-23 14:12:19 +01:00
The Unleash website was created with [Docusaurus ](https://docusaurus.io/ ). The source code lives as part of the main [Unleash repo on GitHub ](https://github.com/Unleash/unleash ) and is built and deployed on all merges to main. This makes it easy to keep the documentation in sync with the latest version of Unleash.
2018-11-20 20:34:42 +01:00
2021-02-25 22:27:11 +01:00
It's hosted on https://docs.getunleash.io
2018-11-20 20:34:42 +01:00
# What's In This Document
2018-11-22 11:20:28 +01:00
- [Get Started in 5 Minutes ](#get-started-in-5-minutes )
- [Directory Structure ](#directory-structure )
- [Editing Content ](#editing-content )
- [Adding Content ](#adding-content )
- [Full Documentation ](#full-documentation )
2018-11-20 20:34:42 +01:00
# Get Started in 5 Minutes
1. Make sure all the dependencies for the website are installed:
```sh
# Install dependencies
$ npm install
```
2018-11-22 11:20:28 +01:00
2018-11-20 20:34:42 +01:00
2. Run your dev server:
```sh
# Start the site
$ npm run start
```
## Directory Structure
Your project file structure should look something like this
```
unleash/
2021-10-25 18:54:46 +02:00
website/
2021-06-04 11:17:15 +02:00
/docs
doc-1.md
doc-2.md
doc-3.md
2018-11-20 20:34:42 +01:00
static/
css/
img/
package.json
sidebar.json
2021-06-04 11:17:15 +02:00
docusaurus.config.js
2018-11-20 20:34:42 +01:00
```
# Editing Content
## Editing an existing docs page
Edit docs by navigating to `docs/` and editing the corresponding document:
`docs/doc-to-be-edited.md`
```markdown
---
id: page-needs-edit
title: This Doc Needs To Be Edited
---
Edit me...
```
For more information about docs, click [here ](https://docusaurus.io/docs/en/navigation )
# Adding Content
## Adding a new docs page to an existing sidebar
1. Create the doc as a new markdown file in `/docs` , example `docs/newly-created-doc.md` :
```md
---
id: newly-created-doc
title: This Doc Needs To Be Edited
---
My new content here..
```
2021-10-25 18:54:46 +02:00
1. Refer to that doc's ID in an existing sidebar in `website/sidebars.json` :
2018-11-20 20:34:42 +01:00
```javascript
// Add newly-created-doc to the Getting Started category of docs
{
"docs": {
"Getting Started": [
"quick-start",
"newly-created-doc" // new doc here
],
...
},
...
}
```
For more information about adding new docs, click [here ](https://docusaurus.io/docs/en/navigation )
## Adding items to your site's top navigation bar
1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js` :
`website/siteConfig.js`
2018-11-22 11:20:28 +01:00
2018-11-20 20:34:42 +01:00
```javascript
{
headerLinks: [
...
/* you can add docs */
{ doc: 'my-examples', label: 'Examples' },
/* you can add custom pages */
{ page: 'help', label: 'Help' },
/* you can add external links */
{ href: 'https://github.com/facebook/Docusaurus', label: 'GitHub' },
...
],
...
}
```
For more information about the navigation bar, click [here ](https://docusaurus.io/docs/en/navigation )
# Full Documentation
Full documentation can be found on the [website ](https://docusaurus.io/ ).