40
40
41
41
from .html import (
42
42
format_message ,
43
+ homepage_link ,
43
44
last_updated_footer ,
44
45
topic_page_links ,
45
46
)
@@ -58,7 +59,7 @@ def build_website(json_root, md_root, site_url, html_root, title, zulip_url, zul
58
59
59
60
streams = stream_info ['streams' ]
60
61
date_footer = last_updated_footer (stream_info )
61
- write_main_page (md_root , site_url , html_root , title , streams , date_footer )
62
+ write_main_page (md_root , site_url , html_root , title , streams , date_footer , zulip_icon_url )
62
63
write_css (md_root )
63
64
64
65
for stream_name in streams :
@@ -74,6 +75,7 @@ def build_website(json_root, md_root, site_url, html_root, title, zulip_url, zul
74
75
stream_name ,
75
76
stream_data ,
76
77
date_footer ,
78
+ zulip_icon_url
77
79
)
78
80
79
81
for topic_name in topic_data :
@@ -94,7 +96,7 @@ def build_website(json_root, md_root, site_url, html_root, title, zulip_url, zul
94
96
95
97
# writes the index page listing all streams.
96
98
# `streams`: a dict mapping stream names to stream json objects as described in the header.
97
- def write_main_page (md_root , site_url , html_root , title , streams , date_footer ):
99
+ def write_main_page (md_root , site_url , html_root , title , streams , date_footer , zulip_icon_url ):
98
100
'''
99
101
The main page in our website lists streams:
100
102
@@ -108,12 +110,12 @@ def write_main_page(md_root, site_url, html_root, title, streams, date_footer):
108
110
write_main_page_header (outfile , html_root , title )
109
111
110
112
content = stream_list_page (streams )
111
-
113
+ outfile . write ( f' \n { homepage_link ( site_url , zulip_icon_url ) } \n ' )
112
114
outfile .write (content )
113
115
outfile .write (date_footer )
114
116
outfile .close ()
115
117
116
- def write_stream_topics (md_root , site_url , html_root , title , stream_name , stream , date_footer ):
118
+ def write_stream_topics (md_root , site_url , html_root , title , stream_name , stream , date_footer , zulip_icon_url ):
117
119
'''
118
120
A stream page lists all topics for the stream:
119
121
@@ -135,6 +137,7 @@ def write_stream_topics(md_root, site_url, html_root, title, stream_name, stream
135
137
136
138
content = topic_list_page (stream_name , stream_url , topic_data )
137
139
140
+ outfile .write (f'\n { homepage_link (site_url , zulip_icon_url )} \n ' )
138
141
outfile .write (content )
139
142
outfile .write (date_footer )
140
143
outfile .close ()
@@ -203,6 +206,7 @@ def write_topic_messages(
203
206
topic_name ,
204
207
)
205
208
209
+ outfile .write (f'\n { homepage_link (site_url , zulip_icon_url )} \n ' )
206
210
outfile .write (topic_links )
207
211
outfile .write (f'\n <head><link href="{ site_url } /style.css" rel="stylesheet"></head>\n ' )
208
212
0 commit comments