Documentation

Required Dependencies

Setting up the local environment

To start you need to fork the project on GitHub, see: Fork a repoopen in new window

# Clone the repo locally
git clone https://github.com/<YOUR GITHUB NAME>/joplin-utils.git
# Navigate to documentation folder
cd website/
# Install required dependencies
yarn
# Start the local development environment
yarn docs:dev
1
2
3
4
5
6
7
8

You should be able to see a preview of the local documentation at http://localhost:8080/open in new window

Adding document translations

  1. Check the existing documentation optimizationopen in new window list. Select a task and reply to the specific line in the issue
  2. As we are using vuepress2open in new window you need to understand the basic configuration i.e. how to modify the navigation bar and sidebar as well as how to add new documents
  3. Add new documents to docs/ then modify docs/.vuepress/config.js to add them to the website

You will notice that the configuration for the navigation bar is basically a nested array, the sidebar configuration is set via a link within the navigation bar. For example, this is an existing configuration for the joplin-vscode-plugin documentation

{
  "navbar": [
    {
      "text": "joplin-vscode-plugin",
      "link": "joplin-vscode-plugin/"
    }
  ]
}
1
2
3
4
5
6
7
8

We can then configure "/joplin-vscode-plugin/" in the corresponding sidebar list

{
  "sidebar": {
    "/zh/joplin-vscode-plugin/": [
      {
        "text": "Guide",
        "children": [
          "/joplin-vscode-plugin/",
          "/joplin-vscode-plugin/guide/faq",
          "/joplin-vscode-plugin/guide/feature",
          "/joplin-vscode-plugin/guide/recommended-extension",
          "/joplin-vscode-plugin/guide/limitations"
        ]
      }
    ]
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Last Updated: 9/8/2021, 3:16:23 AM
Contributors: Daeraxa