Skip to content

Commit e5f64df

Browse files
author
Christoph Hermann
committed
use doxie.append
1 parent 85df570 commit e5f64df

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.doxie.render.toc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var tips = require('./tips.json');
21
// from https://gist.github.com/mathewbyrne/1280286
32
slugify = function(text){
43
return text.toString().toLowerCase()
@@ -14,7 +13,6 @@ var render = function(data) {
1413

1514
var out = '* [' + data.title + '](https://github.com/git-tips/tips#' + slugify(data.title) + ')\n';
1615

17-
if (tips[tips.length -1].title === data.title) out = out + '\n';
1816
return out;
1917
};
2018

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test": "echo \"Error: no test specified\" && exit 1",
99
"precommit": "npm run generate && git add README.md",
1010
"update-readme": "echo 'Updating the readme…'; doxie --render < ./tips.json --inject into README.md && echo '…done!'",
11-
"update-toc": "echo 'Updating the table of contents…'; doxie --render .doxie.render.toc.js < ./tips.json --inject into README.md as toc && echo '…done!'",
11+
"update-toc": "echo 'Updating the table of contents…'; doxie --render .doxie.render.toc.js < ./tips.json --append '\n' --inject into README.md as toc && echo '…done!'",
1212
"generate": "npm run update-readme; npm run update-toc"
1313
},
1414
"repository": {
@@ -29,6 +29,7 @@
2929
"homepage": "https://github.com/git-tips/tips#readme",
3030
"devDependencies": {
3131
"doxie": "^0.2.2",
32+
"doxie.append": "^0.1.0",
3233
"doxie.inject": "^0.1.1",
3334
"doxie.output": "^0.3.0",
3435
"doxie.render": "^0.3.0",

0 commit comments

Comments
 (0)