use std::fs; use std::path::PathBuf; use blog_tools::high::{get_high_blog, HighBlog, HighBlogEntry}; use blog_tools::sitemap::SitemapOptions; use blog_tools::Blog; use lazy_static::lazy_static; use rocket::{ fs::{relative, FileServer}, response::{content::RawXml, Redirect}, Request, Route, }; use rocket_dyn_templates::Template; #[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