From c211c4395f4a86b3ba1ff71032895af2c1abbd2d Mon Sep 17 00:00:00 2001 From: Lee Olayvar Date: Thu, 27 Nov 2014 00:17:38 +0000 Subject: [PATCH] Fixed aboutName basename --- gulpfile.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index 9952520..f4e1901 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -49,8 +49,9 @@ format_json = (data, filepath) -> # load the first one aboutName = glob.sync("./Teams/#{teamPathName}/about.md", nocase: true)[0] # If we cannot find an about file, match any md file - if not aboutName? - aboutName = glob.sync("./Teams/#{teamPathName}/*.md")[0] + aboutName = glob.sync("./Teams/#{teamPathName}/*.md")[0] if not aboutName? + # Not get just the path from it. + aboutName = path.basename aboutName if aboutName? # Get the lead, ahead of time. teamLead = null @@ -90,7 +91,7 @@ format_json = (data, filepath) -> if aboutName? if data.teamName? then teamName = data.teamName else teamName = teamPathName - output += " [#{teamName}](./Teams/#{teamPathName}/ABOUT.md) |" + output += " [#{teamName}](./Teams/#{teamPathName}/#{aboutName}) |" # Add a newline to end this row. output += '\n'