Compare commits

..

No commits in common. "248cfb0aadb8609772a39ae45ec657350e0b52fb" and "0b8d552c6d8553d63d0bfd7c33c8843e232430d2" have entirely different histories.

3 changed files with 3 additions and 13 deletions

2
blog

@ -1 +1 @@
Subproject commit 12ceea71990c4dc255a964a809b65b1a3a2ae333
Subproject commit 1d2751246546adfe334786124a65e995eab65b81

View File

@ -26,8 +26,6 @@ title_pattern = re.compile("<h1>(.+)</h1>")
posts = [p for p in posts if path_pattern.match(p)]
posts.reverse()
links = []
# for each file we want to output an <a> tag with a relative href to the site root
for path in posts:
m = re.match(path_pattern, path)
@ -47,13 +45,5 @@ for path in posts:
# clean leading directories to get the relative path we'll use for the link
url = re.sub(dir_pattern, r"\2", path)
item = (date, f'<li><a href="{url}">{date}{title}</a></li>')
links.append(item)
# make sure we're properly ordered in reverse date order lol
links = sorted(links, key=lambda x: x[0])
links.reverse()
for l in links:
print(l[1])
print(f'<li><a href="{url}">{date}{title}</a></li>')

View File

@ -17,7 +17,7 @@
<div class="page portfolio">
<h1><span class="glass">Ray Tracing</span></h1>
<h1><span class="glass">Ray Tracing<span></h1>
<p><span class="glass">Optics are beautiful, fascinating and fun to code!</span></p>
<div class="wrapper">