THIS REPOSITORY IS ARCHIVED
All documentation has been moved to the main Towhee repo.
This repo contains the website configuration powering the Towhee docs website.
cd towhee-docsto go into the project root.yarnto install the website's workspace dependencies.
yarn startto fetch doc content from submodule and start the development server (powered by Docusaurus).open http://localhost:3000/to open the site in your favorite browser.
-
All our documentation is generated from markdown files you can find in the
towhee-io/towheerepository'sdocsdirectory. -
Add a new doc
- Create a new markdown file and put it under
towhee-io/towheerepository'sdocsdirectory - At the top of file, specify
idandtitlein the front matter.titlewill be default sidebar label, you can setsidebar_labelto overwrite it. - If you want to add authors in the doc, you can set
authorsobject in the front matter as following example
--- id: first-pipeline title: Running your first pipeline sidebar_label: Hello pipeline authors: - name: Joel Marcey # show as description (optional) title: Co-creator of Docusaurus 1 url: https://github.com/JoelMarcey # show on the left (optional) imageURL: https://github.com/JoelMarcey.png - name: Sébastien Lorber url: https://sebastienlorber.com imageURL: https://github.com/slorber.png --- - Create a new markdown file and put it under
-
Update sidebar
- Take a look at the
sidebar.jsfile indocs - In
sidebarsobject,docrepresents menus on the left which is listed in order, you can switch item's position to change order. - If you want to add a new nested menu, just push a new key-value pair to
doclist. If you just want to add a new link, you only need to insert that markdown'sidto the list.
Attention: If your markdown isn't placed in the root directory, you should add the name of the folder it is in before id, like 'folder-name/markdown-id'.
docs: [ // add new nested menu in sidebar example { 'parent-menu-label': [ 'parent-folder/child-content-id-1', 'parent-folder/child-content-id-2', ], }, // add new link in sidebar example 'quick-start', ];
- Take a look at the
-
In most cases, you needn't use custom components in markdown, but if you do, change the file extension from
mdtomdxso you can write JSX in markdown files and render them as React components easily. For more, please refer to https://docusaurus.io/docs/markdown-features/react. -
If you want to use code block, please specify language, otherwise the code highlighting will not take effect.
```javascript
doc: [{
key: value
}]
```
Our doc website is a static site generated using Docusaurus. Please make sure you have been familiar with it before contributing.