docs: add how to custom markdown style, close #109

This commit is contained in:
YunYouJun 2022-09-18 02:36:08 +08:00
parent 54747dfb0a
commit f282d8937c
11 changed files with 1956 additions and 1528 deletions

View File

@ -17,8 +17,8 @@
"valaxy-theme-yun": "link:../../packages/valaxy-theme-yun"
},
"devDependencies": {
"nodemon": "^2.0.19",
"vite-plugin-inspect": "^0.6.0",
"vite-plugin-pwa": "^0.12.3"
"nodemon": "^2.0.20",
"vite-plugin-inspect": "^0.7.1",
"vite-plugin-pwa": "^0.12.7"
}
}

View File

@ -59,6 +59,17 @@ export interface ValaxyConfig {
你可以从 `ValaxyMain``props` 中获取 `frontmatter``pageData`
## 样式
### Markdown 样式
Markdown 样式是主题呈现文章样式的部分,需要由主题自定义。
你可以参考 [valaxy-theme-press](https://github.com/YunYouJun/valaxy/blob/main/packages/valaxy-theme-press/) 自定义 Markdown 主题的方式,见 [styles/markdown.scss](https://github.com/YunYouJun/valaxy/blob/main/packages/valaxy-theme-press/styles/markdown.scss)。
> 如果你想先使用常见的默认样式(后续再进行定制),你可以直接使用 [star-markdown-css](https://github.com/YunYouJun/star-markdown-css)。
> 使用方式可参见 [valaxy-theme-yun/styles](https://github.com/YunYouJun/valaxy/blob/main/packages/valaxy-theme-yun/styles/index.scss)
## Third Plugin
### 实现评论

View File

@ -40,27 +40,27 @@
"prepare": "husky install"
},
"devDependencies": {
"@antfu/eslint-config": "^0.25.2",
"@antfu/eslint-config": "^0.26.3",
"@types/debug": "^4.1.7",
"@types/prompts": "^2.0.14",
"@types/resolve": "^1.20.2",
"@types/semver": "^7.3.10",
"@types/semver": "^7.3.12",
"cross-env": "^7.0.3",
"eslint": "^8.20.0",
"eslint": "^8.23.1",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prompts": "^2.4.2",
"rimraf": "^3.0.2",
"tsup": "^6.2.0",
"tsx": "^3.8.0",
"typescript": "^4.7.4",
"tsup": "^6.2.3",
"tsx": "^3.9.0",
"typescript": "^4.8.3",
"valaxy": "workspace:*",
"valaxy-addon-waline": "workspace:*",
"valaxy-theme-press": "workspace:*",
"valaxy-theme-yun": "workspace:*",
"vitest": "^0.19.1",
"vue-tsc": "0.39.0",
"zx": "^7.0.7"
"vitest": "^0.23.2",
"vue-tsc": "0.40.13",
"zx": "^7.0.8"
},
"pnpm": {
"peerDependencyRules": {

View File

@ -23,7 +23,7 @@
},
"dependencies": {
"execa": "5",
"kolorist": "^1.5.1",
"kolorist": "^1.6.0",
"minimist": "^1.2.6",
"prompts": "^2.4.2"
}

View File

@ -22,7 +22,7 @@
},
"dependencies": {
"execa": "5",
"kolorist": "^1.5.1",
"kolorist": "^1.6.0",
"minimist": "^1.2.6",
"prompts": "^2.4.2"
}

View File

@ -10,6 +10,6 @@
"main": "client/index.ts",
"types": "index.d.ts",
"dependencies": {
"@waline/client": "^2.6.2"
"@waline/client": "^2.9.1"
}
}

View File

@ -19,8 +19,8 @@
"main": "node/index.ts",
"types": "types/index.d.ts",
"dependencies": {
"@docsearch/css": "^3.1.1",
"@docsearch/js": "^3.1.1"
"@docsearch/css": "^3.2.1",
"@docsearch/js": "^3.2.1"
},
"devDependencies": {
"valaxy": "workspace:*"

View File

@ -17,10 +17,10 @@
"main": "node/index.ts",
"types": "types/index.d.ts",
"dependencies": {
"@docsearch/css": "^3.1.1",
"@docsearch/js": "^3.1.1",
"@docsearch/css": "^3.2.1",
"@docsearch/js": "^3.2.1",
"@iconify-json/ant-design": "^1.1.3",
"@iconify-json/simple-icons": "^1.1.20",
"@iconify-json/simple-icons": "^1.1.26",
"valaxy-addon-waline": "workspace:*"
},
"devDependencies": {

View File

@ -62,48 +62,48 @@
"@iconify-json/ri": "^1.1.3",
"@intlify/vite-plugin-vue-i18n": "^5.0.1",
"@vitejs/plugin-vue": "^2.3.3",
"@vueuse/core": "^8.9.4",
"@vueuse/head": "^0.7.7",
"@vueuse/core": "^9.2.0",
"@vueuse/head": "^0.7.11",
"consola": "^2.15.3",
"critters": "^0.0.16",
"cross-spawn": "^7.0.3",
"dayjs": "^1.11.4",
"dayjs": "^1.11.5",
"ejs": "^3.1.8",
"escape-html": "^1.0.3",
"feed": "^4.2.2",
"global-dirs": "^3.0.0",
"gray-matter": "^4.0.3",
"is-installed-globally": "^0.4.0",
"jiti": "^1.14.0",
"katex": "^0.16.0",
"kolorist": "^1.5.1",
"lru-cache": "^7.13.1",
"jiti": "^1.15.0",
"katex": "^0.16.2",
"kolorist": "^1.6.0",
"lru-cache": "^7.14.0",
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^8.6.4",
"markdown-it-anchor": "^8.6.5",
"markdown-it-attrs": "^4.1.4",
"markdown-it-container": "^3.0.0",
"markdown-it-emoji": "^2.0.2",
"markdown-it-link-attributes": "^4.0.0",
"markdown-it-link-attributes": "^4.0.1",
"markdown-it-table-of-contents": "^0.6.0",
"markdown-it-task-lists": "^2.1.1",
"nprogress": "^0.2.0",
"open": "^8.4.0",
"pascal-case": "^3.1.2",
"pinia": "^2.0.17",
"sass": "^1.54.0",
"shiki": "^0.10.1",
"star-markdown-css": "^0.4.0",
"unconfig": "^0.3.5",
"unocss": "^0.44.7",
"unplugin-vue-components": "^0.21.1",
"pinia": "^2.0.22",
"sass": "^1.54.9",
"shiki": "^0.11.1",
"star-markdown-css": "^0.4.1",
"unconfig": "^0.3.6",
"unocss": "^0.45.21",
"unplugin-vue-components": "^0.22.7",
"vite": "^2.9.14",
"vite-plugin-pages": "^0.25.0",
"vite-plugin-pages": "^0.26.0",
"vite-plugin-vue-layouts": "^0.7.0",
"vite-ssg": "0.19.2",
"vite-ssg-sitemap": "0.3.1",
"vue": "^3.2.37",
"vue-i18n": "^9.1.10",
"vue-router": "^4.1.2",
"vite-ssg": "0.20.2",
"vite-ssg-sitemap": "0.4.1",
"vue": "^3.2.39",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.5",
"yargs": "^17.5.1"
},
"devDependencies": {
@ -113,7 +113,7 @@
"@types/markdown-it": "^12.2.3",
"@types/markdown-it-link-attributes": "^3.0.1",
"@types/nprogress": "^0.2.0",
"@types/yargs": "^17.0.10",
"@types/yargs": "^17.0.12",
"debug": "^4.3.4",
"diacritics": "^1.3.0",
"https-localhost": "^4.7.1"

File diff suppressed because it is too large Load Diff

7
test/fixtures/markdown/cases.md vendored Normal file
View File

@ -0,0 +1,7 @@
---
title: Test Cases
---
## Test Special Text
- process.env.NODE_ENV