Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit f197e39

Browse files
shyamseshadrimhevery
authored andcommitted
feat(docs): Add Improve this doc link in each doc page, which links to the edit mode of that file in github
1 parent 1c1cd4f commit f197e39

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

docs/src/gen-docs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ writer.makeDir('build/docs/', true).then(function() {
3232
});
3333
}).then(function printStats() {
3434
console.log('DONE. Generated ' + docs.length + ' pages in ' + (now()-start) + 'ms.' );
35-
}).done();
35+
});
3636

3737

3838
function writeTheRest(writesFuture) {

docs/src/ngdoc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,9 @@ Doc.prototype = {
272272
self = this;
273273

274274
dom.h(title(this.name), function() {
275-
notice('deprecated', 'Deprecated API', self.deprecated);
276275

276+
notice('deprecated', 'Deprecated API', self.deprecated);
277+
dom.tag('a', {href: 'http://github.com/angular/angular.js/edit/master/' + self.file, class: 'improve-docs btn btn-primary'}, 'Improve this doc');
277278
if (self.ngdoc != 'overview') {
278279
dom.h('Description', self.description, dom.html);
279280
}

docs/src/templates/css/docs.css

+4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ img.AngularJS-small {
8686
/* Content */
8787
/* =============================== */
8888

89+
.improve-docs {
90+
float: right;
91+
}
92+
8993
.hint {
9094
font-size: .7em;
9195
color: #c0c0c0;

0 commit comments

Comments
 (0)