Skip to content

Commit

Permalink
添加 .editorconfig;改进 docs 的示例代码
Browse files Browse the repository at this point in the history
  • Loading branch information
caixw committed Jul 12, 2017
1 parent 1da07a2 commit dc094fd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8

# html
[*.{htm,html,js,css}]
indent_style = space
indent_size = 4
2 changes: 1 addition & 1 deletion docs/example/doc/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $(document).ready(function(){
$(elem).html(text);
});

// 隐藏不当前页面用不到的过滤器
// 隐藏当前页面用不到的过滤器
$('header .filter input').each(function(index, elem){
var val = $(elem).val();
if ($('.main .api .method.'+val).length == 0) {
Expand Down
6 changes: 3 additions & 3 deletions docs/example/doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="generator" content="http://apidoc.tools" />
<title>index&#160;&#8250;&#160;api 示例文档</title>
<link href="https://cdn.bootcss.com/prism/1.5.1/themes/prism.min.css" rel="stylesheet" />
<link rel="stylesheet" href="./style.css" />
<link href="https://cdn.bootcss.com/prism/1.5.1/themes/prism.min.css" rel="stylesheet" />

<script src="./jquery-3.0.0.min.js"></script>
<script src="https://cdn.bootcss.com/prism/1.5.1/prism.min.js" data-manual></script>
Expand Down Expand Up @@ -173,8 +173,8 @@ <h4><span class="error">ERROR:</span>401,&#160;账号密码验证错误</h4>
</div>
<footer>
<p>
内容由 <a href="http://apidoc.tools">apidoc</a> 编译于 <time>2016-07-12T02:14:31&#43;08:00</time>
用时2.275254ms
内容由 <a href="http://apidoc.tools">apidoc</a> 编译于 <time>2017-07-12T19:34:29&#43;08:00</time>
用时2.921738ms
</p>


Expand Down
2 changes: 1 addition & 1 deletion docs/example/doc/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ header .filter label{
}

.api h4 .error{
color:green;
color:red;
margin-right:1rem;
}

Expand Down
9 changes: 5 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
<title>apidoc - RESTful API 文档生成工具</title>
<meta property="og:title" content="apidoc - RESTful API 文档生成工具" />

<meta property="og:site_name" content="APIDOC"/>
<meta itemprop="name" content="APIDOC" />
<meta itemprop="name" property="og:site_name" content="APIDOC"/>

<meta name="keywords" itemprop="keywords" content="apidoc,API,doc,REST,RESTful API,HTML,C#,C/C++,D,Erlang,Go,Groovy,Java,Javascript,Pascal,Delphi,Perl,PHP,Python,Ruby,Rust,Scala,Swift,文档生成" />
<meta name="keywords"
itemprop="keywords"
content="apidoc,API,doc,REST,RESTful API,HTML,C#,C/C++,D,Erlang,Go,Groovy,Java,Javascript,Pascal,Delphi,Perl,PHP,Python,Ruby,Rust,Scala,Swift,文档生成" />
<meta name="description"
property="og:description"
itemprop="description"
Expand Down Expand Up @@ -111,7 +112,7 @@ <h3>配置文件</h3>
<p>apidoc 通过工作目录下的配置文件来控制其行为。文件名称固定为 .apidoc.json。以下为 .apidoc.json 的一个示例。</p>
<pre data-indent="5" data-language="json">
{
"version": "2.0.52.160529",
"version": "3.0.52.160529",
"inputs": [
{
"lang": "go",
Expand Down

0 comments on commit dc094fd

Please sign in to comment.