Skip to content

Commit 9a0ed43

Browse files
author
frickt
committed
Merge pull request #1 from angular/master
update
2 parents db7a1f1 + 3d6c44e commit 9a0ed43

21 files changed

Lines changed: 459 additions & 221 deletions

docs/angular.io-package/templates/class.template.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
{% include "lib/githubLinks.html" -%}
12
{% include "lib/paramList.html" -%}
23
{% extends 'layout/base.template.html' -%}
34

45
{% block body %}
56
p.location-badge.
67
exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }
7-
defined in <a href="https://github.com/angular/angular/tree/master/modules/{$ doc.fileInfo.relativePath $}#L{$ doc.location.start.line+1 $}-L{$ doc.location.end.line+1 $}">{$ doc.fileInfo.relativePath $} (line {$ doc.location.start.line+1 $})</a>
8+
defined in {$ githubViewLink(doc) $}
89

910
:markdown
1011
{$ doc.description | indent(2, true) $}

docs/angular.io-package/templates/function.template.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{% include "lib/githubLinks.html" -%}
12
{% include "lib/paramList.html" -%}
23
{% extends 'layout/base.template.html' -%}
34

@@ -13,7 +14,7 @@
1314

1415
p.location-badge.
1516
exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }
16-
defined in <a href="https://github.com/angular/angular/tree/master/modules/{$ doc.fileInfo.relativePath $}#L{$ doc.location.start.line+1 $}-L{$ doc.location.end.line+1 $}">{$ doc.fileInfo.relativePath $} (line {$ doc.location.start.line+1 $})</a>
17+
defined in {$ githubViewLink(doc) $}
1718

1819
:markdown
1920
{$ doc.description | indent(4, true) $}

docs/angular.io-package/templates/module.template.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
{% include "lib/githubLinks.html" -%}
12
{% extends 'layout/base.template.html' -%}
23
{% block body -%}
34
p.location-badge.
4-
defined in <a href="https://github.com/angular/angular/tree/master/modules/{$ doc.fileInfo.relativePath $}#L{$ doc.location.start.line+1 $}-L{$ doc.location.end.line+1 $}">{$ doc.fileInfo.relativePath $} (line {$ doc.location.start.line+1 $})</a>
5+
defined in {$ githubViewLink(doc) $}
56

67
ul
78
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data

docs/angular.io-package/templates/var.template.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
{% include "lib/githubLinks.html" -%}
12
{% extends 'layout/base.template.html' %}
23

34
{% block body %}
45
.l-main-section
56
h2 {$ doc.name $} <span class="type">variable</span>
67
p.location-badge.
78
exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }
9+
defined in {$ githubViewLink(doc) $}
810

911
:markdown
1012
{$ doc.description | indent(4, true) $}

docs/dgeni-package/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require('../../tools/transpiler/index.js').init();
22

3+
var versionInfo = require('./versionInfo');
34
var Package = require('dgeni').Package;
45
var jsdocPackage = require('dgeni-packages/jsdoc');
56
var nunjucksPackage = require('dgeni-packages/nunjucks');
@@ -47,6 +48,10 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage, linksPac
4748
})
4849

4950

51+
.config(function(renderDocsProcessor) {
52+
renderDocsProcessor.extraData.versionInfo = versionInfo;
53+
})
54+
5055
// Configure file reading
5156
.config(function(readFilesProcessor, ngdocFileReader, readTypeScriptModules) {
5257
readFilesProcessor.fileReaders = [ngdocFileReader];

docs/dgeni-package/templates/class.template.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{% include "lib/paramList.html" -%}
2+
{% include "lib/githubLinks.html" -%}
23
{% extends 'layout/base.template.html' -%}
34

45
{% block body %}
56
<h1 class="class export">{$ doc.name $} <span class="type">{$ doc.docType $}</span></h1>
67
<p class="module">exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }<br/>
7-
defined in <a href="https://github.com/angular/angular/tree/master/modules/{$ doc.fileInfo.relativePath $}#L{$ doc.location.start.line+1 $}-L{$ doc.location.end.line+1 $}">
8-
{$ doc.fileInfo.relativePath $} (line {$ doc.location.start.line+1 $})</a></p>
8+
defined in {$ githubViewLink(doc) $}
9+
</p>
910
<p>{$ doc.description | marked $}</p>
1011

1112
{%- if doc.constructorDoc or doc.members.length -%}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{% include "lib/paramList.html" -%}
2+
{% include "lib/githubLinks.html" -%}
23
{% extends 'layout/base.template.html' -%}
34

45
{% block body %}
56
<h1 class="function export">{$ doc.name $}{$ paramList(doc.parameters) $}</h1>
6-
<p class="module">exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }</p>
7+
<p class="module">exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }<br/>
8+
defined in {$ githubViewLink(doc) $}</p>
79
<p>{$ doc.description | marked $}</p>
810

911
{% endblock %}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% macro githubViewLink(doc) -%}
2+
<a href="https://github.com/{$ versionInfo.gitRepoInfo.owner $}/{$ versionInfo.gitRepoInfo.repo $}/tree/{$ versionInfo.currentVersion.isSnapshot and 'master' or versionInfo.currentVersion.raw $}/modules/{$ doc.fileInfo.relativePath $}#L{$ doc.location.start.line+1 $}-L{$ doc.location.end.line+1 $}">
3+
{%- endmacro -%}

docs/dgeni-package/templates/module.template.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
{% include "lib/githubLinks.html" -%}
12
{% extends 'layout/base.template.html' %}
23

34
{% block body %}
45
<h1 class="id">{$ doc.id $} <span class="type">module</span></h1>
5-
6+
<p>defined in {$ githubViewLink(doc) $}</p>
67
<p>{$ doc.description | marked $}</p>
78

89
{% if doc.exports.length %}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
{% include "lib/githubLinks.html" -%}
12
{% extends 'layout/base.template.html' %}
23

34
{% block body %}
45
<h1>{$ doc.name $} <span class="type">variable</span></h1>
5-
<p class="module">exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }</p>
6+
<p class="module">exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }<br/>
7+
defined in {$ githubViewLink(doc) $}</p>
68
<p>{$ doc.description | marked $}</p>
79

810
{% endblock %}

0 commit comments

Comments
 (0)