diff --git a/src/config.rs b/src/config.rs index 6f0ae6a..5afb005 100644 --- a/src/config.rs +++ b/src/config.rs @@ -139,8 +139,11 @@ impl Default for CacheConfig { } pub async fn load() -> Result { - let config_file = env::var(format!("{}_CONFIG", env!("CARGO_BIN_NAME"))) - .unwrap_or(String::from("config.toml")); + let config_file = env::var(format!( + "{}_CONFIG", + env!("CARGO_BIN_NAME").to_uppercase().replace("-", "_") + )) + .unwrap_or(String::from("config.toml")); match tokio::fs::OpenOptions::new() .read(true) .open(&config_file) diff --git a/templates/index.html b/templates/index.html index 4292de8..591c008 100644 --- a/templates/index.html +++ b/templates/index.html @@ -17,6 +17,9 @@

posts

+ {% if posts.is_empty() %} + there are no posts right now. check back later! + {% endif %} {% for post in posts %}
{{ post.title }}