diff options
| author | Ben Bridle <ben@derelict.engineering> | 2026-11-10 10:59:48 +1300 |
|---|---|---|
| committer | Ben Bridle <ben@derelict.engineering> | 2026-11-10 10:59:48 +1300 |
| commit | 9f8ab76c64bc9b29e994e63d5e24498d1da14bc2 (patch) | |
| tree | 647dd93fdd492759f98340275e968b35910e2dee /src/generate_html.rs | |
| parent | ed852f6600b78b2ef0827c90f5d2e0df2c69ab53 (diff) | |
| download | toaster-9f8ab76c64bc9b29e994e63d5e24498d1da14bc2.zip | |
Fix default HTML template
The default HTML template was missing the opening <html> tag.
Diffstat (limited to 'src/generate_html.rs')
| -rw-r--r-- | src/generate_html.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/generate_html.rs b/src/generate_html.rs index 3b6ee62..b19d8b7 100644 --- a/src/generate_html.rs +++ b/src/generate_html.rs @@ -6,6 +6,7 @@ use recipe::*; const DEFAULT_TEMPLATE: &str = "\ <!DOCTYPE html> +<html> <head> <title>{page_name} — {site_name}</title> <meta charset='UTF-8'> @@ -90,11 +91,12 @@ pub fn generate_html_redirect(path: &str, website: &Website) -> String { let path = sanitize_text(path, false); format!("\ <!DOCTYPE html> -<head> -<title>Redirecting...</title> -<meta http-equiv='refresh' content='0; url={path}'> -{head} -</head> +<html> + <head> + <title>Redirecting...</title> + <meta http-equiv='refresh' content='0; url={path}'> + {head} + </head> </html>") } |
