diff options
| -rw-r--r-- | extras/estampa.sh | 3 | ||||
| -rw-r--r-- | src/render.rs | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/extras/estampa.sh b/extras/estampa.sh index 53a705a..46cca53 100644 --- a/extras/estampa.sh +++ b/extras/estampa.sh @@ -65,6 +65,9 @@ estampaste() { rm -f "$tmp" return 1 fi + # mktemp creates 600; scp preserves source mode, so without this + # the upload lands unreadable to the nginx user. + chmod 644 "$tmp" if ! scp -q "$tmp" "$host:./$name"; then rm -f "$tmp" diff --git a/src/render.rs b/src/render.rs index 8e366dd..878cefa 100644 --- a/src/render.rs +++ b/src/render.rs @@ -17,13 +17,13 @@ pub fn page(path: &Path, text: &str) -> String { let body = highlight(path, text); let mut out = String::with_capacity(body.len() + 256); - out.push_str("<!doctype html>\n<meta charset=\"utf-8\">\n<title>"); + out.push_str("<!doctype html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>"); push_escaped(&mut out, title); out.push_str("</title>\n<style>"); out.push_str(STYLE); - out.push_str("</style>\n"); + out.push_str("</style>\n</head>\n<body>\n"); out.push_str(&body); - out.push('\n'); + out.push_str("\n</body>\n</html>\n"); out } |