Replace hard-coded feed name with configured name

Signed-off-by: Jacob Kiers <>
Jacob Kiers 6 months ago
parent 6d3527d3e4
commit 4599ce47fb

@ -2,11 +2,11 @@
<link rel="alternate" type="application/atom+xml" title="ATOM feed" href="./feed.xml" />
<link rel="alternate" type="application/atom+xml" title="ATOM feed" href="./{FEED}" />
<h1>Newsletters 2 Web</h1>
<p>The real feed can be found at <a href="./feed.xml">feed.xml</a></p>
<p>The real feed can be found at <a href="./{FEED}">{FEED}</a></p>
<p>Nothing to see here.</p>
<p>This is a public landing page for an instance of the
<a href="">Newsletters 2 Web</a>

@ -101,7 +101,9 @@ fn build_feed(filename: &PathBuf, hostname: String, include_html: bool) -> Resul
write_file(&path, processed_html.as_bytes())?;
write_file(dir.join("index.html"), INDEX_HTML)?;
// Ugly hack, but I don't know how to do this better...
let file_name = format!("{:?}", filename.file_name().unwrap()).replace('"', "");
write_file(dir.join("index.html"), INDEX_HTML.replace("{FEED}", file_name.as_str()))?;
feed::add_entry_to_feed(&mut feed, &msg, &processed_html, &hostname, include_html);