1 Star 1 Fork 0

江夏尧/docsify-prettier

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.html 2.69 KB
一键复制 编辑 原始数据 按行查看 历史
KonghaYao 提交于 2021-07-05 22:41 . fix: 修复 config 问题
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>docsify-prettier</title>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prism-themes/themes/prism-material-light.css">
</head>
<body>
<div id="app"></div>
</body>
<script src="https://cdn.jsdelivr.net/npm/docsify@4.12.1/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-typescript.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-less.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-scss.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-markdown.min.js"></script>
<script>
window.app = document.getElementById("app");
window.$docsify = {
name: "docsify-prettier",
repo: "https://github.com/Konghayao",
homepage: "./README.md",
// 在这里写入你的 prettier 设置,如果你不会设置,那么就不写好了
prettier: {
config: {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"endOfLine": "auto",
"singleQuote": false,
"semi": true,
"trailingComma": "all",
"bracketSpacing": true
}
},
// 在这里需要写一个格式化的逻辑
markdown: {
renderer: {
code: function (code, lang, ...args) {
return this.origin.code.call(this, window.codeFormatter(code, lang), lang, ...args);
}
}
}
};
</script>
<!-- 在这里写入你需要的 prettier 代码解析插件-->
<script src="https://cdn.jsdelivr.net/npm/prettier/standalone.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prettier/parser-graphql.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prettier@2.3.2/parser-flow.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prettier@2.3.2/parser-postcss.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prettier@2.3.2/parser-typescript.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prettier@2.3.2/parser-babel.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prettier@2.3.2/parser-html.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prettier@2.3.2/parser-markdown.js"></script>
<script src="./prettier.js"></script>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dongzhongzhidong/docsify-prettier.git
git@gitee.com:dongzhongzhidong/docsify-prettier.git
dongzhongzhidong
docsify-prettier
docsify-prettier
master

搜索帮助