Skip to content

Commit

Permalink
add markdown support
Browse files Browse the repository at this point in the history
  • Loading branch information
C2Coder committed Apr 21, 2024
1 parent 61c6ac7 commit 66b095a
Show file tree
Hide file tree
Showing 4 changed files with 1,198 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/generate_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def generate_repos_detail(self):
for repo in self.repos:
readme_md = self.readme.get(repo.full_name, "No readme found")
readme_fixed_images = fix_readme_relative_images(readme_md, repo.full_name, repo.default_branch)
readme_fixed_images = readme_fixed_images.replace(':\n- ', ':\n\n- ') # fix markdown lists
readme_fixed_images = readme_fixed_images.replace('- ', '- ● ') # add the dot before each element of the list
readme_html = markdown(readme_fixed_images, extensions=['fenced_code'])
path_repo = self.paths.get("Repo").get("path").format(repo.name)
self.render_page('repoDetail.html', path_repo, repo=repo, readme=readme_html)
Expand Down
Loading

0 comments on commit 66b095a

Please sign in to comment.