Cybrkyd's git repositories

GitGen • commit: b550d49

commit b550d49903db2cbfefcf363cb700b928f5792158236b195ad748515c931ee495
author cybrkyd <noreply@cybrkyd.com> 2026-01-14 11:08:48 +0000
committer cybrkyd <noreply@cybrkyd.com> 2026-01-14 11:08:48 +0000

Commit Message

Added "sane_lists" and "fenced_code" extensions for Markdown
<code> and <pre> styling

📊 Diffstat

gitgen.py 2
main.css 38
2 files changed, 7 insertions(+), 33 deletions(-)

Diff

diff --git a/gitgen.py b/gitgen.py
index 0b9e605..25c12d4 100644
--- a/gitgen.py
+++ b/gitgen.py
@@ -112,7 +112,7 @@ class GitRepoScanner:
for enc in ('utf-8', 'latin-1'):
try:
content = path.read_text(encoding=enc)
- return markdown.markdown(content, extensions=["tables"]) if name.endswith('.md') else f"<pre>{html.escape(content)}</pre>"
+ return markdown.markdown(content, extensions=["tables", "sane_lists", "fenced_code"]) if name.endswith('.md') else f"<pre>{html.escape(content)}</pre>"
except Exception:
pass
return None
diff --git a/main.css b/main.css
index f74e914..6268623 100644
--- a/main.css
+++ b/main.css
@@ -170,9 +170,11 @@ body {
white-space: nowrap;
}
- code {
- font-family: monospace;
- }
+ code{padding:2px 4px;font-size:1rem;color:#000;background-color:#d9edef;border-radius:4px}
+ kbd{padding:2px 4px;font-size:90%;color:#000;background-color:#eee;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.25)}
+ kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}
+ pre{display:block;padding:9.5px;margin-top:20px;margin-bottom:3rem;font-size:1rem;line-height:1.42857143;white-space:pre-wrap;overflow-wrap:normal;background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px}
+ pre code{padding:0;font-size:inherit;color:#000;white-space:inherit;background-color:transparent;border-radius:0}
.directory {
color: #2d3748;
@@ -342,35 +344,6 @@ code {
color: #4a5568;
}
- pre,
- .readme-content pre,
- .repo-description pre {
- white-space: pre-wrap;
- word-wrap: break-word;
- background: #f8f9fa;
- padding: 1rem;
- border-radius: 5px;
- font-family: monospace;
- font-size: 0.9rem;
- }
-
- .repo-description pre {
- max-height: 200px;
- overflow-y: auto;
- }
-
- .readme-content pre {
- overflow-x: auto;
- }
-
- .readme-content code {
- background: #f8f9fa;
- padding: 0.2rem 0.4rem;
- border-radius: 3px;
- font-family: monospace;
- font-size: 0.9rem;
- }
-
.nav-btn.active,
.page-btn.active {
background: #2c5282;
@@ -520,3 +493,4 @@ pre,
gap: 0.5rem;
}
}
+