use blog_tools::{ low::{ get_blog_tag_list, preview_blogs, preview_blogs_tagged, render_blog_post, PreviewBlogEntry, }, sitemap::{create_sitemap, SitemapOptions}, }; use rocket::{ fs::{relative, FileServer}, response::{content::RawXml, Redirect}, Request, Route, }; use rocket_dyn_templates::Template; use serde::{Deserialize, Serialize}; use std::{fs, path::PathBuf, str::FromStr}; pub static BLOG_ROOT: &str = "examples/blog"; #[macro_use] extern crate rocket; #[rocket::main] async fn main() { let port = 8080_u16; let figment = rocket::Config::figment() .merge(("port", port)) .merge(("address", "0.0.0.0")); if let Err(e) = rocket::custom(figment) .mount("/", FileServer::from(relative!("examples/assets/"))) .register("/", catchers![not_found, error]) .attach(Template::fairing()) // .attach(config) .mount("/", get_all_routes()) // .manage(bucket_info) .launch() .await { println!("Did not run. Error: {:?}", e) } } #[get("/blog")] fn blog_index() -> Option