diff --git a/.doxie.render.toc.js b/.doxie.render.toc.js index 356c332..ea4df5e 100644 --- a/.doxie.render.toc.js +++ b/.doxie.render.toc.js @@ -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; diff --git a/README.md b/README.md index bd67027..b56b16d 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/package.json b/package.json index 158ea8a..64d7229 100644 --- a/package.json +++ b/package.json @@ -33,5 +33,8 @@ "doxie.output": "^0.3.0", "doxie.render": "^0.3.0", "husky": "^0.8.1" + }, + "dependencies": { + "slug": "^0.9.1" } }