Skip to content

Commit

Permalink
fix blog gitLink gerneration
Browse files Browse the repository at this point in the history
fixes #68. Using path.parse().name instead of splitting the filename based on the word blog.  

This will prevent posts with the word "blog" in the title from having the incorrect gitLink generated.
  • Loading branch information
Doug Miller committed Dec 11, 2016
1 parent ae60d05 commit 8e02625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/blog/update-blog-yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = function updateFileContents(filePath, callBack) {
// item.authorsData = authorsData
// }

item.gitLink = filename.split('blog')[1]
item.gitLink = `/${path.parse(filename).base}`
if (item.date) {
item.date = formatDate(item.date)
} else {
Expand Down

0 comments on commit 8e02625

Please sign in to comment.