diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-10-27 23:50:35 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-10-27 23:50:35 (GMT) |
commit | c6a045730ca0cf1ee484110a0dcc34173ce97690 (patch) | |
tree | 9ad3c8bd6c3e1b62b2bb925296e044b6c6a76712 /web | |
parent | 652f7196b0b71554151d2c9b1ba5597222c80aa7 (diff) | |
download | site-c6a045730ca0cf1ee484110a0dcc34173ce97690.tar.gz |
Mention news article authors
Mention the names of news articles authors, as we did on the old web
site.
Diffstat (limited to 'web')
-rw-r--r-- | web/input/news/domain-transfer.md | 1 | ||||
-rw-r--r-- | web/input/news/release-1-4-15.md | 1 | ||||
-rw-r--r-- | web/input/news/release-1-4-16.md | 1 | ||||
-rw-r--r-- | web/input/news/release-1-5.md | 1 | ||||
-rw-r--r-- | web/input/news/ton-voon-resigns.md | 1 | ||||
-rw-r--r-- | web/macros.py | 7 |
6 files changed, 9 insertions, 3 deletions
diff --git a/web/input/news/domain-transfer.md b/web/input/news/domain-transfer.md index d206040..b30f817 100644 --- a/web/input/news/domain-transfer.md +++ b/web/input/news/domain-transfer.md | |||
@@ -1,4 +1,5 @@ | |||
1 | title: Domain Name Transfer | 1 | title: Domain Name Transfer |
2 | author: Ton Voon | ||
2 | date: 2011-09-25 | 3 | date: 2011-09-25 |
3 | --- | 4 | --- |
4 | 5 | ||
diff --git a/web/input/news/release-1-4-15.md b/web/input/news/release-1-4-15.md index 16ba4e3..e0af748 100644 --- a/web/input/news/release-1-4-15.md +++ b/web/input/news/release-1-4-15.md | |||
@@ -1,4 +1,5 @@ | |||
1 | title: Version 1.4.15 Released | 1 | title: Version 1.4.15 Released |
2 | author: Ton Voon | ||
2 | date: 2010-07-27 | 3 | date: 2010-07-27 |
3 | --- | 4 | --- |
4 | 5 | ||
diff --git a/web/input/news/release-1-4-16.md b/web/input/news/release-1-4-16.md index 65cda74..988786a 100644 --- a/web/input/news/release-1-4-16.md +++ b/web/input/news/release-1-4-16.md | |||
@@ -1,4 +1,5 @@ | |||
1 | title: Version 1.4.16 Released | 1 | title: Version 1.4.16 Released |
2 | author: Holger Weiß | ||
2 | date: 2013-06-27 | 3 | date: 2013-06-27 |
3 | --- | 4 | --- |
4 | 5 | ||
diff --git a/web/input/news/release-1-5.md b/web/input/news/release-1-5.md index ed70d8c..6eef24e 100644 --- a/web/input/news/release-1-5.md +++ b/web/input/news/release-1-5.md | |||
@@ -1,4 +1,5 @@ | |||
1 | title: Version 1.5 Released | 1 | title: Version 1.5 Released |
2 | author: Holger Weiß | ||
2 | date: 2013-10-02 | 3 | date: 2013-10-02 |
3 | --- | 4 | --- |
4 | 5 | ||
diff --git a/web/input/news/ton-voon-resigns.md b/web/input/news/ton-voon-resigns.md index 32351df..7130c55 100644 --- a/web/input/news/ton-voon-resigns.md +++ b/web/input/news/ton-voon-resigns.md | |||
@@ -1,4 +1,5 @@ | |||
1 | title: Ton Voon Resigns as Team Leader | 1 | title: Ton Voon Resigns as Team Leader |
2 | author: Ton Voon | ||
2 | date: 2011-11-04 | 3 | date: 2011-11-04 |
3 | --- | 4 | --- |
4 | 5 | ||
diff --git a/web/macros.py b/web/macros.py index 309e0b4..05dcf5a 100644 --- a/web/macros.py +++ b/web/macros.py | |||
@@ -107,14 +107,15 @@ def make_news_page(posts, current_index): | |||
107 | teaser = ['# ' + title] | 107 | teaser = ['# ' + title] |
108 | for p in posts: | 108 | for p in posts: |
109 | source = list() | 109 | source = list() |
110 | author = p.author.encode('ascii', 'xmlcharrefreplace') | ||
110 | timestamp = time.strptime(p.date, '%Y-%m-%d') | 111 | timestamp = time.strptime(p.date, '%Y-%m-%d') |
111 | date = time.strftime('%A, %B %-e, %Y', timestamp) | 112 | author_date = author + ', ' + time.strftime('%B %-e, %Y', timestamp) |
112 | teaser.append('## %s' % p.title) | 113 | teaser.append('## %s' % p.title) |
113 | teaser.append('*%s*' % date) | 114 | teaser.append('*%s*' % author_date) |
114 | teaser.append('%s' % p.source.split(marker, 1)[0].rstrip()) | 115 | teaser.append('%s' % p.source.split(marker, 1)[0].rstrip()) |
115 | teaser.append('<a href="%s">Read more »</a>' % p.url) | 116 | teaser.append('<a href="%s">Read more »</a>' % p.url) |
116 | source.append('# %s' % p.title) | 117 | source.append('# %s' % p.title) |
117 | source.append('*%s*' % date) | 118 | source.append('*%s*' % author_date) |
118 | source.append(p.source.replace(marker, '', 1)) | 119 | source.append(p.source.replace(marker, '', 1)) |
119 | p.source = '\n'.join(source) | 120 | p.source = '\n'.join(source) |
120 | p['parent'] = title | 121 | p['parent'] = title |