Slugified.

This commit is contained in:
Hemanth.HM 2015-07-15 20:35:53 +05:30
parent 2bf7f0ea91
commit 6b5936ce57
3 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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)

View File

@ -33,5 +33,8 @@
"doxie.output": "^0.3.0",
"doxie.render": "^0.3.0",
"husky": "^0.8.1"
},
"dependencies": {
"slug": "^0.9.1"
}
}