Compare commits
5 Commits
0b8d552c6d
...
248cfb0aad
Author | SHA1 | Date |
---|---|---|
ktyl | 248cfb0aad | |
ktyl | 8223c0c6cf | |
ktyl | d91545c153 | |
ktyl | 6ca4883004 | |
ktyl | db33cd054b |
2
blog
2
blog
|
@ -1 +1 @@
|
|||
Subproject commit 1d2751246546adfe334786124a65e995eab65b81
|
||||
Subproject commit 12ceea71990c4dc255a964a809b65b1a3a2ae333
|
|
@ -26,6 +26,8 @@ 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)
|
||||
|
@ -45,5 +47,13 @@ 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)
|
||||
|
||||
print(f'<li><a href="{url}">{date}{title}</a></li>')
|
||||
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])
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
|
Loading…
Reference in New Issue