Use github issue to store mermaid charts with organized structure.
Fork this repo so that you can setup your own online-mermaid tool.
Create a repo to store the mermaid charts as issues, then provide the owner
and repo name
in /src/config.json
{
"owner": "you",
"repo": "your mermaid repo"
}
you can make it private if you want.
- Go to the repo's
settings->pages
: enable theBuild and deployment
source fromGithub Actions
. - Go to the repo's
settings->Secrets and variables->Actions
: addMY_API_TOKEN
andMY_PASSWORD
assecret keys
MY_API_TOKEN
: your personal github api access tokenMY_PASSWORD
: the password to verify
To protect the github token at the pure front-end, we firstly symmetricly encrypt the token using the password
After you setup the github ci and run the action, you can visit it at https://<owner>.github.io/online-mermaid/
before start this project, you need to generate the encrypted key to auth.
$ pnpm encrypt [token] [password]
$ pnpm dev
$ pnpm build