Skip to content

Commit

Permalink
Update build.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsjoberg committed Nov 29, 2023
1 parent 30fc738 commit b5991a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def syntax_highlight(html_content):
for file in paths[language][category]:
index.write(f"<div class='col-12 col-md-6 col-xl-4 box'>")
# write link to raw file
index.write(f"<p><a href='{language}/{category}/{file}' name='{file.replace('.', '-')}'>{file}</a></p>")
index.write(f"<p>[<a href='https://github.com/mxsjoberg/code/blob/master/{language}/{category}/{file}' name='{file.replace('.', '-')}'>{file}</a>]</p>")
# write content in file
file_content = open(f"{language}/{category}/{file}").read()
file_content_as_markdown = f"```{FORMAT_MAP[file.split('.')[1]]}\n{file_content}\n```\n" # escape special characters
Expand Down

0 comments on commit b5991a1

Please sign in to comment.