forked from slonk/bingus-blog
Compare commits
2 commits
514d4e033d
...
b0bc2ea611
Author | SHA1 | Date | |
---|---|---|---|
b0bc2ea611 | |||
e44f4e48b9 |
2 changed files with 8 additions and 2 deletions
|
@ -139,8 +139,11 @@ impl Default for CacheConfig {
|
|||
}
|
||||
|
||||
pub async fn load() -> Result<Config> {
|
||||
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)
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
<h2>posts</h2>
|
||||
<!-- prettier-ignore -->
|
||||
<div>
|
||||
{% if posts.is_empty() %}
|
||||
there are no posts right now. check back later!
|
||||
{% endif %}<!-- prettier-br -->
|
||||
{% for post in posts %}
|
||||
<div class="post">
|
||||
<a href="/posts/{{ post.name }}"><b>{{ post.title }}</b></a>
|
||||
|
|
Loading…
Reference in a new issue