Browse Source

add 'all changes' page.

Thomas Buck 1 year ago
parent
commit
5c134ddfd2
3 changed files with 15 additions and 2 deletions
  1. 2
    0
      input/index.md
  2. 9
    0
      input/updates.md
  3. 4
    2
      macros.py

+ 2
- 0
input/index.md View File

@@ -42,3 +42,5 @@ If you'd like, you can [support my open-source work on GitHub Sponsors](https://
42 42
 <!--%
43 43
 printRecentMenu(10)
44 44
 %-->
45
+
46
+[Show all updates](updates.html).

+ 9
- 0
input/updates.md View File

@@ -0,0 +1,9 @@
1
+title: Updates
2
+---
3
+
4
+This is a list of all pages with an associated date, ordered from newest to oldest.
5
+You can use it to keep track of what I've been doing here.
6
+
7
+<!--%
8
+printRecentMenu(0)
9
+%-->

+ 4
- 2
macros.py View File

@@ -134,9 +134,11 @@ def printMenuItem(p, yearsAsHeading = False, showDateSpan = False, showOnlyStart
134 134
     return lastyear
135 135
 
136 136
 def printRecentMenu(count = 5):
137
-    posts = [p for p in pages if "date" in p]
137
+    posts = [p for p in pages if "date" in p and p.lang == "en"]
138 138
     posts.sort(key=lambda p: p.get("update", p.get("date")), reverse=True)
139
-    for p in posts[0:count]:
139
+    if count > 0:
140
+        posts = posts[0:count]
141
+    for p in posts:
140 142
         printMenuItem(p, False, False, False, True, "0", "", False)
141 143
 
142 144
 def printBlogMenu():

Loading…
Cancel
Save