summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2025-10-17 10:52:15 +1300
committerBen Bridle <ben@derelict.engineering>2025-10-17 10:52:15 +1300
commit3d7d3bf5a54eed34bb09729defebf261cc7c3683 (patch)
tree95b6575117863dff5673eb4ae39154d34b127a5f /src/main.rs
parent1a51659875364217c60d68d694112c1c2ce1e2e1 (diff)
downloadtoaster-3d7d3bf5a54eed34bb09729defebf261cc7c3683.zip
Add a html.redirect.head key to insert text into HTML redirects
This is needed so that I can include the analytics script in all of my redirect pages.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index e52aa10..3ee0bc6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -130,12 +130,12 @@ fn main() {
if export_html {
if !path.contains("://") {
if let Some(path) = website.has_page(redirect, &path, "html") {
- write_file(&generate_html_redirect(&path), &destination, "html", redirect.last_modified);
+ write_file(&generate_html_redirect(&path, &website), &destination, "html", redirect.last_modified);
} else {
warn!("Redirect {:?} links to nonexistent page {path:?}", redirect.name);
}
} else {
- write_file(&generate_html_redirect(&path), &destination, "html", redirect.last_modified);
+ write_file(&generate_html_redirect(&path, &website), &destination, "html", redirect.last_modified);
}
}
}