Skip to content

Latest commit

 

History

History
181 lines (118 loc) · 3.53 KB

HOW_TO.md

File metadata and controls

181 lines (118 loc) · 3.53 KB

Thank you for considering to contribute to our seeed-studio files!

You can check these steps to set up your own files management platform:

  1. Fork this repository into your GitHub.
  2. Clone the repository you forked to your coding device.
  3. Make your modifications, changing existed files or add new files. ---- for detailed local deployment / installation please check below instruction.
  4. Commit your modifications and push to your Github repository.
  5. Create a PR from the branch in your forked to seeed-studio's wiki-documents main branch.

export PATH=$PATH:/home/w0x7ce/Desktop/node-v18.12.1-linux-x64/bin

Local Installation

INSTALL LATEST LTS NODE

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt remove cmdtest
sudo apt update && sudo apt install yarn

Auto Install

yarn

This command will help you install all the dependences in package.json

yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Signed-off-by: tianrking <[email protected]>

Custom Install & Plugin Install

Mermaid

yarn add @docusaurus/theme-mermaid

MDX

yarn add remark-math@3 rehype-katex@4

jq

curl -O https://get.0install.net/0install.sh && chmod +x 0install.sh
sudo ./0install.sh install local
0install add jq https://apps.0install.net/utils/jq.xml

algolia

yarn add @docusaurus/theme-search-algolia

Math

yarn add remark-math@3 rehype-katex@5 [email protected]

plugin-content-docs

yarn add @docusaurus/plugin-content-docs

plugin-pwa

yarn add @docusaurus/plugin-debug
yarn add @docusaurus/plugin-pwa

Git

Cache

git config --global http.postBuffer 524288000

Speed

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999

depth

git clone --depth=1 http://xxx.git
git fetch --unshallow

gitignore

git rm -r --cached .
git add .
git commit -m 'update .gitignore'

Develop

Offical Function

Using SSH:

USE_SSH=true yarn deploy

Not using SSH:

GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.

Custom Deployment (We Used)

SSH KEY

GENERATE SSH KEY

Add SSH KEY

Github Actions

Problems

  1. [ERROR] Error: ENOSPC: System limit for number of file watchers reached
  • insert the new value into the system config

    echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
    
  • check that the new value was applied

    cat /proc/sys/fs/inotify/max_user_watches
  • config variable name (not runnable)

    fs.inotify.max_user_watches=524288