瀏覽代碼

use menu helper for blog

Thomas Buck 3 年之前
父節點
當前提交
e05a8b87d8
共有 1 個檔案被更改,包括 1 行新增15 行删除
  1. 1
    15
      input/blog.md

+ 1
- 15
input/blog.md 查看文件

@@ -12,19 +12,5 @@ noheader: true
12 12
 To receive my latest updates, you can subscribe to the <a href="rss.xml"><img src="img/rss.png">RSS Feed</a>.
13 13
 
14 14
 <!--%
15
-from datetime import datetime
16
-posts = [p for p in pages if "post" in p] # get all blog post pages
17
-posts.sort(key=lambda p: p.get("date", "9999-01-01"), reverse=True) # sort post pages by date
18
-lastyear = "0"
19
-for p in posts:
20
-    year = p.get("date", "")[0:4]
21
-    if year != lastyear:
22
-        lastyear = year
23
-        print "\n\n#### %s\n" % (year)
24
-
25
-    date = datetime.strptime(p.date, "%Y-%m-%d").strftime("%B %d, %Y")
26
-    print "  * **[%s](%s)** - %s" % (p.post, p.url, date)
27
-
28
-    if p.get("description", "") != "":
29
-        print "<br><span class=\"listdesc\">" + p.get("description", "") + "</span>"
15
+printBlogMenu()
30 16
 %-->

Loading…
取消
儲存