From 006aeab2c14f8c99e064d748d7da66c0b91d506d Mon Sep 17 00:00:00 2001
From: Jim Shepich III
Date: Thu, 29 Jan 2026 10:09:32 -0500
Subject: [PATCH] Added blog archive
---
assets/css/theme.css | 28 +++++
.../partials/blog_article.html => config.yaml | 0
main.py | 34 +++++-
templates/{default.html => blog_post.html} | 5 +-
templates/components/blog_archive_li.html | 1 +
templates/components/blog_article.html | 11 ++
templates/components/blog_tag.html | 1 +
templates/partials/nav.html | 3 +-
templates/simple.html | 14 +++
testbench.ipynb | 107 ++++++++++++++----
10 files changed, 180 insertions(+), 24 deletions(-)
rename templates/partials/blog_article.html => config.yaml (100%)
rename templates/{default.html => blog_post.html} (96%)
create mode 100644 templates/components/blog_archive_li.html
create mode 100644 templates/components/blog_article.html
create mode 100644 templates/components/blog_tag.html
create mode 100644 templates/simple.html
diff --git a/assets/css/theme.css b/assets/css/theme.css
index cc1e447..c66247f 100644
--- a/assets/css/theme.css
+++ b/assets/css/theme.css
@@ -145,3 +145,31 @@ summary.heading{
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: transparent;
}
+
+span.blog-tag{
+ font-weight: bold;
+ border-radius: 3px 3px 3px 3px;
+ background-color: var(--azure);
+ color: white;
+ font-size: 0.6em;
+ padding: 0.1em;
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+ vertical-align: middle;
+}
+
+span.blog-tag:hover{
+ background-color: var(--azure-tint-20);
+}
+
+a:has(> span.blog-tag){
+ vertical-align: middle;
+ color: unset;
+ text-decoration: unset;
+ font-weight: unset;
+}
+
+article > hr{
+ border: 0.1rem solid var(--silver);
+ box-shadow: none;
+}
\ No newline at end of file
diff --git a/templates/partials/blog_article.html b/config.yaml
similarity index 100%
rename from templates/partials/blog_article.html
rename to config.yaml
diff --git a/main.py b/main.py
index cb46608..23ffae5 100644
--- a/main.py
+++ b/main.py
@@ -76,4 +76,36 @@ def load_partials() -> dict:
partial_template,
current_year = datetime.now().year
)
- return partials
\ No newline at end of file
+ return partials
+
+
+def import_resume():
+
+ # Use a sentinel value for the loop.
+ max_date = '0000-00-00'
+
+ # Loop through the folders in the resume repo to find the most recent one.
+ for resume_folder in os.listdir('build/resume'):
+
+ # Skip folders that are not in YYYY-MM-DD format.
+ try:
+ datetime.strptime(resume_folder,'%Y-%m-%d')
+ except Exception:
+ continue
+
+ # Keep track of the most recent date.
+ if resume_folder > max_date:
+ max_date = resume_folder
+
+ # Copy the resume into the /dist directory.
+ run(f'cp build/resume/{max_date}/shepich_resume.pdf dist/shepich_resume.pdf')
+
+
+def format_blog_tags(tags: list[str], template = 'templates/components/blog_tag.html') -> list[str]:
+ '''Generates HTML blog tag components from a list of tag names.'''
+ return [
+ format_html_template(template, tag_name = t) for t in tags
+ ]
+
+if __name__ == '__main__':
+ pass
\ No newline at end of file
diff --git a/templates/default.html b/templates/blog_post.html
similarity index 96%
rename from templates/default.html
rename to templates/blog_post.html
index 3cc4d24..227fdfd 100644
--- a/templates/default.html
+++ b/templates/blog_post.html
@@ -1,5 +1,4 @@
-
@@ -7,9 +6,8 @@
{partials__header}
{partials__nav}
-
-
+
{metadata__title}
@@ -19,5 +17,6 @@
{content}
+
{partials__footer}
\ No newline at end of file
diff --git a/templates/components/blog_archive_li.html b/templates/components/blog_archive_li.html
new file mode 100644
index 0000000..a06da53
--- /dev/null
+++ b/templates/components/blog_archive_li.html
@@ -0,0 +1 @@
+