mirror of https://github.com/namibia/tips.git
Slugified.
This commit is contained in:
parent
2bf7f0ea91
commit
6b5936ce57
|
@ -1,9 +1,10 @@
|
|||
var tips = require('./tips.json');
|
||||
var slug = require('slug');
|
||||
|
||||
var render = function(data) {
|
||||
var data = data.data;
|
||||
|
||||
var out = '* [' + data.title + '](https://github.com/git-tips/tips#' + data.title.split(' ').join('-') + ')\n';
|
||||
var out = '* [' + data.title + '](https://github.com/git-tips/tips#' + slug(data.title) + ')\n';
|
||||
|
||||
if (tips[tips.length -1].title === data.title) out = out + '\n';
|
||||
return out;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* [List all branches that are already merged into master](https://github.com/git-tips/tips#List-all-branches-that-are-already-merged-into-master)
|
||||
* [Quickly switch to the previous branch](https://github.com/git-tips/tips#Quickly-switch-to-the-previous-branch)
|
||||
* [Remove branches that have already been merged with master](https://github.com/git-tips/tips#Remove-branches-that-have-already-been-merged-with-master)
|
||||
* [List all branches and their upstreams, as well as last commit on branch](https://github.com/git-tips/tips#List-all-branches-and-their-upstreams,-as-well-as-last-commit-on-branch)
|
||||
* [List all branches and their upstreams, as well as last commit on branch](https://github.com/git-tips/tips#List-all-branches-and-their-upstreams-as-well-as-last-commit-on-branch)
|
||||
* [Track upstream branch](https://github.com/git-tips/tips#Track-upstream-branch)
|
||||
* [Delete local branch](https://github.com/git-tips/tips#Delete-local-branch)
|
||||
* [Delete remote branch](https://github.com/git-tips/tips#Delete-remote-branch)
|
||||
|
|
|
@ -33,5 +33,8 @@
|
|||
"doxie.output": "^0.3.0",
|
||||
"doxie.render": "^0.3.0",
|
||||
"husky": "^0.8.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"slug": "^0.9.1"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue