Skip to content

Commit 662c8ea

Browse files
committed
tweak post ordering on homepage
1 parent 47a1748 commit 662c8ea

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

Diff for: generate-html.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def main():
5959

6060
all_posts.append(post) # TODO rfc2822_date=format_datetime(post_date),
6161

62+
# Order blog posts by date published
63+
all_posts.sort(key=lambda p: p.date, reverse=True)
64+
6265
# index
6366
# print("rendering index.html")
6467
index_html = env.get_template('pages/index.html').render(
@@ -68,8 +71,6 @@ def main():
6871
print("writing", index_html_path)
6972
index_html_path.write_text(index_html)
7073

71-
# Order blog posts by date published
72-
all_posts.sort(key=lambda p: p.date, reverse=True)
7374

7475
# Make the RSS feed
7576
rss_path = OUTPUT_DIR / "rss.xml"

Diff for: index.html

+22-22
Original file line numberDiff line numberDiff line change
@@ -89,27 +89,27 @@ <h3>Recent posts</h3>
8989
<ul>
9090

9191

92-
92+
<li>
93+
<a href="/blog/2020-05-12-ddia-review.html">2020-05-12 Book review: Designing Data-Intensive Applications, by Martin Kleppmann</a>
94+
</li>
9395

9496

9597

96-
98+
<li>
99+
<a href="/blog/2020-01-25-testing_external_api_calls.html">2020-01-25 Writing tests for external API calls</a>
100+
</li>
97101

98102

99103

100104

101105

102106

103107

104-
<li>
105-
<a href="/blog/2020-01-25-testing_external_api_calls.html">2020-01-25 Writing tests for external API calls</a>
106-
</li>
108+
107109

108110

109111

110-
<li>
111-
<a href="/blog/2020-05-12-ddia-review.html">2020-05-12 Book review: Designing Data-Intensive Applications, by Martin Kleppmann</a>
112-
</li>
112+
113113

114114

115115
</ul>
@@ -123,7 +123,9 @@ <h3>Guest Posts By David</h3>
123123

124124

125125

126-
126+
<li>
127+
<a href="/blog/2019-08-03-ioc-techniques.html">2019-08-03 Three Techniques for Inverting Control, in Python</a>
128+
</li>
127129

128130

129131

@@ -133,9 +135,7 @@ <h3>Guest Posts By David</h3>
133135

134136

135137

136-
<li>
137-
<a href="/blog/2019-08-03-ioc-techniques.html">2019-08-03 Three Techniques for Inverting Control, in Python</a>
138-
</li>
138+
139139

140140

141141

@@ -150,35 +150,35 @@ <h3>Classic 2017 Episodes on Ports & Adapters, by Bob</h3>
150150
<ul>
151151

152152

153-
<li>
154-
<a href="/blog/2017-09-07-introducing-command-handler.html">2017-09-07 Introducing Command Handler</a>
155-
</li>
153+
156154

157155

158156

159-
<li>
160-
<a href="/blog/2017-09-08-repository-and-unit-of-work-pattern-in-python.html">2017-09-08 Repository and Unit of Work Pattern</a>
161-
</li>
157+
162158

163159

164160

165161
<li>
166-
<a href="/blog/2017-09-13-commands-and-queries-handlers-and-views.html">2017-09-13 Commands, Handlers, Queries and Views</a>
162+
<a href="/blog/2017-09-19-why-use-domain-events.html">2017-09-19 Why use domain events?</a>
167163
</li>
168164

169165

170166

171167
<li>
172-
<a href="/blog/2017-09-19-why-use-domain-events.html">2017-09-19 Why use domain events?</a>
168+
<a href="/blog/2017-09-13-commands-and-queries-handlers-and-views.html">2017-09-13 Commands, Handlers, Queries and Views</a>
173169
</li>
174170

175171

176172

177-
173+
<li>
174+
<a href="/blog/2017-09-08-repository-and-unit-of-work-pattern-in-python.html">2017-09-08 Repository and Unit of Work Pattern</a>
175+
</li>
178176

179177

180178

181-
179+
<li>
180+
<a href="/blog/2017-09-07-introducing-command-handler.html">2017-09-07 Introducing Command Handler</a>
181+
</li>
182182

183183

184184
</ul>

Diff for: rss.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Simple patterns for building complex apps
88
</description>
99
<link>https://cosmicpython.com</link>
10-
<lastBuildDate>Tue, 12 May 2020 19:23:37 -0000</lastBuildDate>
10+
<lastBuildDate>Tue, 12 May 2020 19:29:59 -0000</lastBuildDate>
1111
<pubDate>Sat, 4 Jan 2020 19:15:54 -0500</pubDate>
1212
<atom:link href="https://cosmicpython.com/rss.xml" rel="self" type="application/rss+xml" />
1313

0 commit comments

Comments
 (0)