Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom header/footer fails on topic pages? #79

Open
jmandel opened this issue Feb 15, 2022 · 0 comments
Open

Custom header/footer fails on topic pages? #79

jmandel opened this issue Feb 15, 2022 · 0 comments

Comments

@jmandel
Copy link

jmandel commented Feb 15, 2022

From

# We use a topic-specific title instead of `page_head_html` to improve
# search engine indexing.
outfile.write(
to_topic_page_head_html(
html.escape(topic_name) + " · " + html.escape(stream_name) + " · " + title
)
)
outfile.write(topic_links)
outfile.write(
f'\n<head><link href="{html.escape(site_url)}/style.css" rel="stylesheet"></head>\n'
)
for msg in messages:
msg_html = format_message_html(
site_url,
html_root,
zulip_url,
zulip_icon_url,
stream_name,
stream_id,
topic_name,
msg,
)
outfile.write(msg_html)
outfile.write("\n\n")
outfile.write(date_footer_html)
outfile.write(page_footer_html)

... it looks like on topic pages the custom header HTML isn't used, but custom footer HTML is used. This means

  1. Broken tags if the customer header opens things like a div and the custom footer closes them -- since the tag will be closed without having been opened on topic pages
  2. Custom styling is lost on topic pages

Would be good to support some basic string interpolation in the custom header to allow topics to appear (or if this is out of scope: only apply the hard-coded HTML if no custom HTML header has been passed in).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant