Skip to content

Commit

Permalink
feat(doc): Link to the github source
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Apr 7, 2019
1 parent e4c8a4f commit da75875
Show file tree
Hide file tree
Showing 5 changed files with 252 additions and 87 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions doc/Cargo.toml
Expand Up @@ -32,6 +32,7 @@ serde_derive = "1.0.0"
serde_json = "1.0.0"

gluon = { version = "0.11.2", path = ".." } # GLUON
completion = { package = "gluon_completion", version = "0.11.2", path = "../completion" } # GLUON


[dev-dependencies]
Expand Down
55 changes: 43 additions & 12 deletions doc/src/doc/module.html
Expand Up @@ -27,7 +27,14 @@
</nav>

<main class="col-md-9 ml-sm-auto cl-lg-10 pt-3 px-4" role="main">
<h1 class="pb-3 mb-4 border-bottom">{{name}}</h1>
<div class="row pb-3 mb-4 border-bottom">
<h1 class="col-md-10">{{name}}</h1>
{{#if @root.github_source}}
<div class="col-md-2">
<a class="float-right" href="{{@root.github_source}}/tree/master/{{symbol_to_path name}}.glu">[src]</a>
</div>
{{/if}}
</div>

{{#if sub_modules}}
<h2>Modules</h2>
Expand All @@ -53,10 +60,22 @@ <h2>Modules</h2>
<h2 class="pb-3 mb-4 border-bottom"><a class="anchor field" id="Types" href="#Types">Types</a></h2>
{{#each record.types}}

<h4>
<pre>type <a id="type.{{name}}" href="#type.{{name}}">{{name}}</a>{{#each args}} {{name}}{{/each}} = {{{type~}}}
</pre>
</h4>
<div class="row">
<div class="col-md-10">
<h4>
<pre>type <a id="type.{{name}}" href="#type.{{name}}">{{name}}</a>{{#each args}} {{name}}{{/each}} = {{{type~}}}
</pre>
</h4>
</div>

{{#if @root.github_source}}
{{#if definition_line}}
<div class="col-md-2">
<a class="float-right" href="{{@root.github_source}}/tree/master/{{symbol_to_path @root.name}}.glu#L{{definition_line}}">[src]</a>
</div>
{{/if}}
{{/if}}
</div>
<div class="docblock">{{markdown comment}}</div>

{{/each}}
Expand All @@ -66,13 +85,25 @@ <h4>
<h2 class="pb-3 mb-4 border-bottom"><a class="anchor field" id="Values" href="#Values">Values</a></h2>
{{#each record.values}}

<h4>
<pre>let <a class="anchor field" id="value.{{name}}" href="#value.{{name}}">{{name}}</a>
{{~#each args~}}
{{~#if implicit}} ?{{name}}{{else}} {{name}}{{~/if~}}
{{~/each}} : {{{type~}}}
</pre>
</h4>
<div class="row">
<div class="col-md-10">
<h4>
<pre>let <a class="anchor field" id="value.{{name}}" href="#value.{{name}}">{{name}}</a>
{{~#each args~}}
{{~#if implicit}} ?{{name}}{{else}} {{name}}{{~/if~}}
{{~/each}} : {{{type~}}}
</pre>
</h4>
</div>

{{#if @root.github_source}}
{{#if definition_line}}
<div class="col-md-2">
<a class="float-right" href="{{@root.github_source}}/tree/master/{{symbol_to_path @root.name}}.glu#L{{definition_line}}">[src]</a>
</div>
{{/if}}
{{/if}}
</div>
<div class="docblock">{{markdown comment}}</div>

{{/each}}
Expand Down

0 comments on commit da75875

Please sign in to comment.