chore: add prettier config

pull/141/head
Yang Libin 2 years ago
parent edeb8ad824
commit 5667341851

@ -0,0 +1,3 @@
.idea/
.github/
node_modules/

@ -0,0 +1,9 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "avoid"
}

@ -391,7 +391,6 @@ GitHub 技术社区 [Doocs](https://github.com/doocs),致力于打造一个内
</tr>
</table>
关注「**Doocs**」公众号,回复 **PDF**,即可获取 [互联网 Java 工程师进阶知识完全扫盲](https://github.com/doocs/advanced-java) 项目离线 PDF 文档283 页精华),学习更加方便!
![](./images/pdf.png)

@ -131,9 +131,9 @@ feign:
# FeignClient 执行HTTP请求时Content-Type 、Content-Length 满足这两个条件,就设置请求头 Content-Encoding=gzip,deflate。
# 设置了请求头后 在发送前会对请求体进行压缩
mimeTypes:
- "text/xml"
- "application/xml"
- "application/json"
- 'text/xml'
- 'application/xml'
- 'application/json'
minRequestSize: 100
```

@ -1,26 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="UTF-8" />
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="doc,docs,doocs,documentation,github,gitee,source-code-hunter,AmyliaY" />
<meta
name="keywords"
content="doc,docs,doocs,documentation,github,gitee,source-code-hunter,AmyliaY"
/>
<meta name="description" content="读尽天下源码,心中自然无码——源码猎人" />
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<link rel="stylesheet" href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify/lib/themes/vue.css" />
<link rel="stylesheet" href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-darklight-theme@latest/dist/style.min.css">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<link
rel="stylesheet"
href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify/lib/themes/vue.css"
/>
<link
rel="stylesheet"
href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-darklight-theme@latest/dist/style.min.css"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="images/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="images/favicon-16x16.png"
/>
<style>
.markdown-section code {
font-weight: 400;
}
</style>
</head>
</head>
<body>
<body>
<nav>
<ul>
<li>
@ -51,10 +71,10 @@
<div id="app"> Doocs </div>
<script>
window.$docsify = {
name: "source-code-hunter",
name: 'source-code-hunter',
maxLevel: 3,
auto2top: true,
search: ["/"],
search: ['/'],
darklightTheme: {
defaultTheme: 'light',
siteFont: 'Source Sans Pro,Helvetica Neue,Arial,sans-serif',
@ -68,38 +88,38 @@
},
light: {
highlightColor: '#e96900',
}
},
},
contributors: {
repo: 'doocs/source-code-hunter',
ignores: ['/README.md'],
image: {
margin: '0.2em',
isRound: true
}
isRound: true,
},
},
plugins: [
function (hook, vm) {
hook.beforeEach(function (content) {
const en = vm.route.file.indexOf("README_EN") > -1;
const en = vm.route.file.indexOf('README_EN') > -1;
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace("raw.githubusercontent.com", "github.com")
.replace(/\/main/, "/blob/main");
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/main/, '/blob/main');
} else {
url =
"https://github.com/doocs/source-code-hunter/blob/main/" +
'https://github.com/doocs/source-code-hunter/blob/main/' +
vm.route.file;
}
const github = `[GitHub](${url})`;
const gitee = `[Gitee](${url.replace("github", "gitee")})`;
const gitee = `[Gitee](${url.replace('github', 'gitee')})`;
const editHtml = en
? `:memo: Edit on ${github} / ${gitee}\n`
: `:memo: ${github} / ${gitee} \n`;
if (vm.route.path == "/") {
if (vm.route.path == '/') {
return editHtml + content;
}
const subscription = `
@ -130,8 +150,8 @@
});
hook.afterEach(function (html) {
const currentYear = new Date().getFullYear()
const footer = `<footer><span>Copyright © 2018-${currentYear} <a href="https://github.com/doocs" target="_blank">Doocs</a>. All Rights Reserved.</footer>`
const currentYear = new Date().getFullYear();
const footer = `<footer><span>Copyright © 2018-${currentYear} <a href="https://github.com/doocs" target="_blank">Doocs</a>. All Rights Reserved.</footer>`;
return html + footer;
});
},
@ -150,14 +170,13 @@
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify/lib/plugins/zoom-image.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-darklight-theme@latest/dist/index.min.js"></script>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/docsify-contributors@latest/dist/index.min.js"></script>
</body>
</body>
<!--
<!--
cdn.jsdelivr.net
test1.jsdelivr.net
testingcf.jsdelivr.net
fastly.jsdelivr.net
gcore.jsdelivr.net
-->
</html>
Loading…
Cancel
Save