Quellcode durchsuchen

add 'all changes' page.

Thomas Buck vor 2 Jahren
Ursprung
Commit
5c134ddfd2
3 geänderte Dateien mit 15 neuen und 2 gelöschten Zeilen
  1. 2
    0
      input/index.md
  2. 9
    0
      input/updates.md
  3. 4
    2
      macros.py

+ 2
- 0
input/index.md Datei anzeigen

@@ -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 Datei anzeigen

@@ -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 Datei anzeigen

@@ -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():

Laden…
Abbrechen
Speichern