poet 0.7.0

Static site generator with optional MCP server and LLM SEO optimizations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub fn is_image_path(path: &str) -> bool {
    mime_guess::from_path(path).first_or_octet_stream().type_() == mime::IMAGE
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn detects_image_extension() {
        assert!(is_image_path("favicon_MWST2DE3.svg"));
    }

    #[test]
    fn rejects_non_image_extension() {
        assert!(!is_image_path("chunk-Q4UAENVW.js"));
    }
}