diff options
| -rw-r--r-- | README.md | 11 | ||||
| -rw-r--r-- | src/response.rs | 5 |
2 files changed, 16 insertions, 0 deletions
@@ -143,6 +143,17 @@ Defaults to `false`. MATHJAX=true ``` +### `HEADER` + +Adds a large header to the top of a proxy page. Only available in styled +routes. + +Defaults to off. + +```dotenv +HEADER="This will show up at the top of my proxied capsule." +``` + ## Styling Want to give your website a shiny new look? Try using one of sources diff --git a/src/response.rs b/src/response.rs index d7142c4..f156603 100644 --- a/src/response.rs +++ b/src/response.rs @@ -184,6 +184,11 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< html_context.push_str(&format!("<title>{gemini_title}</title>")); html_context.push_str("</head><body>"); + if let Ok(header) = var("HEADER") { + html_context + .push_str(&format!("<big><blockquote>{header}</blockquote></big>")); + } + match response.status() { germ::request::Status::Success => { html_context.push_str(&gemini_html.1); |