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-docs
to go into the project root.yarn
to install the website's workspace dependencies.
yarn start
to 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/towhee
repository'sdocs
directory. -
Add a new doc
- Create a new markdown file and put it under
towhee-io/towhee
repository'sdocs
directory - At the top of file, specify
id
andtitle
in the front matter.title
will be default sidebar label, you can setsidebar_label
to overwrite it. - If you want to add authors in the doc, you can set
authors
object 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.js
file indocs
- In
sidebars
object,doc
represents 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
doc
list. If you just want to add a new link, you only need to insert that markdown'sid
to 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
md
tomdx
so 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.