~glyph/website

49f358d97d2150cf04d9ce33be55aadb9bb27875 — glyph 7 months ago 5ffb1c0
Replace unwraps
1 files changed, 6 insertions(+), 3 deletions(-)

M src/bin/generate_rss.rs
M src/bin/generate_rss.rs => src/bin/generate_rss.rs +6 -3
@@ 16,8 16,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
        .description(
            "glyph's RSS feed. Biophilic musings on carbon-based and silicon-based technologies.",
        )
        .build()
        .unwrap();
        .build()?;

    // list template directories containing articles for syndication
    let bacteria = "./templates/bacteria";


@@ 46,7 45,11 @@ fn main() -> Result<(), Box<dyn error::Error>> {

            // populate item url vector from article filenames
            let re_url = Regex::new("./templates/(.*).html.tera")?;
            let caps_url = re_url.captures(&path.to_str().unwrap());
            let caps_url = re_url.captures(
                &path
                    .to_str()
                    .expect("Failed to convert file path to string slice for regex capture"),
            );
            if let Some(url) = caps_url {
                let article_url = url[1].replace("_", "-");
                let full_url = format!("https://mycelial.technology/{}", article_url);