Fixed aboutName basename
This commit is contained in:
+4
-3
@@ -49,8 +49,9 @@ format_json = (data, filepath) ->
|
|||||||
# load the first one
|
# load the first one
|
||||||
aboutName = glob.sync("./Teams/#{teamPathName}/about.md", nocase: true)[0]
|
aboutName = glob.sync("./Teams/#{teamPathName}/about.md", nocase: true)[0]
|
||||||
# If we cannot find an about file, match any md file
|
# If we cannot find an about file, match any md file
|
||||||
if not aboutName?
|
aboutName = glob.sync("./Teams/#{teamPathName}/*.md")[0] if not aboutName?
|
||||||
aboutName = glob.sync("./Teams/#{teamPathName}/*.md")[0]
|
# Not get just the path from it.
|
||||||
|
aboutName = path.basename aboutName if aboutName?
|
||||||
|
|
||||||
# Get the lead, ahead of time.
|
# Get the lead, ahead of time.
|
||||||
teamLead = null
|
teamLead = null
|
||||||
@@ -90,7 +91,7 @@ format_json = (data, filepath) ->
|
|||||||
if aboutName?
|
if aboutName?
|
||||||
if data.teamName? then teamName = data.teamName
|
if data.teamName? then teamName = data.teamName
|
||||||
else teamName = teamPathName
|
else teamName = teamPathName
|
||||||
output += " [#{teamName}](./Teams/#{teamPathName}/ABOUT.md) |"
|
output += " [#{teamName}](./Teams/#{teamPathName}/#{aboutName}) |"
|
||||||
|
|
||||||
# Add a newline to end this row.
|
# Add a newline to end this row.
|
||||||
output += '\n'
|
output += '\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user