Rust library to generate static websites

chore: make footer copyright year dynamic (#88)

authored by

Maruf Hossain and committed by
GitHub
f8db6596 e8725343

+3 -1
+3 -1
website/src/layout.rs
··· 1 1 use maud::{DOCTYPE, Markup, PreEscaped, html}; 2 + use chrono::{Datelike, Utc}; 2 3 mod docs_sidebars; 3 4 mod header; 4 5 ··· 141 142 .include_style_with_options("assets/prin.css", StyleOptions { tailwind: true })?; 142 143 143 144 let seo_data = seo.unwrap_or_default(); 145 + let current_year = Utc::now().year(); 144 146 145 147 Ok(html! { 146 148 (DOCTYPE) ··· 160 162 div.container.mx-auto.px-8.py-8.flex.justify-between.items-center.flex-col-reverse."sm:flex-row".gap-y-12 { 161 163 div.grow."basis-[0]" { 162 164 a.text-md.font-bold href="https://bruits.org" { 163 - "Copyright © 2025 Bruits." 165 + "Copyright © " (current_year) " Bruits." 164 166 } 165 167 @if licenses { 166 168 br;