Skip to content

Commit

Permalink
chore: make docs package and add Mermaid plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nozomuikuta committed May 2, 2024
1 parent 062a0de commit e1a1e7c
Show file tree
Hide file tree
Showing 5 changed files with 926 additions and 161 deletions.
6 changes: 4 additions & 2 deletions docs/.vitepress/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { defineConfig } from 'vitepress'
import { withMermaid } from 'vitepress-plugin-mermaid'
import { enConfig } from './en'
import { jaConfig, jaSearchConfig } from './ja'

export default defineConfig({
export default withMermaid({
srcDir: 'content',
base: '/chibivite/',
title: 'chibivite',
Expand All @@ -26,4 +26,6 @@ export default defineConfig({
root: { label: 'English', ...enConfig },
ja: { label: '日本語', ...jaConfig },
},
mermaid: {},
mermaidPlugin: {},
})
22 changes: 22 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "docs",
"private": true,
"version": "0.0.0",
"type": "module",
"sideEffects": false,
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
},
"devDependencies": {
"@braintree/sanitize-url": "^7.0.1",
"cytoscape": "^3.29.2",
"cytoscape-cose-bilkent": "^4.1.0",
"dayjs": "^1.11.11",
"debug": "^4.3.4",
"mermaid": "^10.9.0",
"vitepress": "^1.1.4",
"vitepress-plugin-mermaid": "^2.0.16"
}
}
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"packageManager": "[email protected]",
"scripts": {
"prepare": "husky",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs",
"docs:dev": "pnpm run --filter docs dev",
"docs:build": "pnpm run --filter docs build",
"docs:preview": "pnpm run --filter docs preview",
"format": "prettier --config .config/prettier.mjs --write --cache .",
"format:lint-staged": "prettier --config .config/prettier.mjs --write --cache",
"format:check": "prettier --config .config/prettier.mjs --check --cache .",
Expand All @@ -35,7 +35,6 @@
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.0",
"vitepress": "^1.1.4"
"typescript-eslint": "^7.7.0"
}
}
Loading

0 comments on commit e1a1e7c

Please sign in to comment.