brewlog/src/lib.rs
Jon Seager 9e5dff7f5f
feat(web): add Open Graph and Twitter Card meta tags
- Add og:title, og:description, og:image, og:type, og:site_name and
  twitter:card meta tags to base template with Askama block overrides
- Create static 1200x630 OG image served at /og-image.png
- Override OG blocks with entity-specific content on brew, cup, and
  stats detail pages
- Reuse BREWLOG_RP_ORIGIN as base URL for absolute og:image URLs via
  OnceLock initialized at server startup
2026-02-08 16:19:34 +00:00

26 lines
545 B
Rust

use std::sync::OnceLock;
pub mod application;
pub mod domain;
pub mod infrastructure;
pub mod presentation;
pub struct VersionInfo {
pub version: &'static str,
pub commit: &'static str,
}
pub const VERSION_INFO: VersionInfo = VersionInfo {
version: env!("CARGO_PKG_VERSION"),
commit: env!("GIT_HASH"),
};
static BASE_URL: OnceLock<String> = OnceLock::new();
pub fn set_base_url(url: String) {
let _ = BASE_URL.set(url);
}
pub fn base_url() -> &'static str {
BASE_URL.get().map_or("", std::string::String::as_str)
}