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
use esbuild_metafile::renders_path::RendersPath;

use crate::is_external_link::is_external_link;

#[derive(Clone)]
pub struct AssetPathRenderer {
    pub base_path: String,
}

impl RendersPath for AssetPathRenderer {
    fn render_path(&self, path: &str) -> String {
        if is_external_link(path) {
            path.to_string()
        } else {
            format!("{}{path}", self.base_path)
        }
    }
}