代码拉取完成,页面将自动刷新
<!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>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。