4040
4141from .html import (
4242 format_message ,
43+ homepage_link ,
4344 last_updated_footer ,
4445 topic_page_links ,
4546 )
@@ -58,7 +59,7 @@ def build_website(json_root, md_root, site_url, html_root, title, zulip_url, zul
5859
5960 streams = stream_info ['streams' ]
6061 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 )
6263 write_css (md_root )
6364
6465 for stream_name in streams :
@@ -74,6 +75,7 @@ def build_website(json_root, md_root, site_url, html_root, title, zulip_url, zul
7475 stream_name ,
7576 stream_data ,
7677 date_footer ,
78+ zulip_icon_url
7779 )
7880
7981 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
9496
9597# writes the index page listing all streams.
9698# `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 ):
98100 '''
99101 The main page in our website lists streams:
100102
@@ -108,12 +110,12 @@ def write_main_page(md_root, site_url, html_root, title, streams, date_footer):
108110 write_main_page_header (outfile , html_root , title )
109111
110112 content = stream_list_page (streams )
111-
113+ outfile . write ( f' \n { homepage_link ( site_url , zulip_icon_url ) } \n ' )
112114 outfile .write (content )
113115 outfile .write (date_footer )
114116 outfile .close ()
115117
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 ):
117119 '''
118120 A stream page lists all topics for the stream:
119121
@@ -135,6 +137,7 @@ def write_stream_topics(md_root, site_url, html_root, title, stream_name, stream
135137
136138 content = topic_list_page (stream_name , stream_url , topic_data )
137139
140+ outfile .write (f'\n { homepage_link (site_url , zulip_icon_url )} \n ' )
138141 outfile .write (content )
139142 outfile .write (date_footer )
140143 outfile .close ()
@@ -203,6 +206,7 @@ def write_topic_messages(
203206 topic_name ,
204207 )
205208
209+ outfile .write (f'\n { homepage_link (site_url , zulip_icon_url )} \n ' )
206210 outfile .write (topic_links )
207211 outfile .write (f'\n <head><link href="{ site_url } /style.css" rel="stylesheet"></head>\n ' )
208212
0 commit comments