Skip to content

Commit

Permalink
Revert getting the date with chrono
Browse files Browse the repository at this point in the history
  • Loading branch information
grego committed May 23, 2021
1 parent 0181dd7 commit be76f5b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 11 deletions.
44 changes: 37 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ readme = "README.md"
homepage = "https://www.getblades.org"

[dependencies]
toml = "0.5.7"
toml = "0.5.8"
ramhorns = "0.10.2"
beef = { version = "0.5", features = ["impl_serde"]}
serde = { version = "1.0.126", features = ["derive"] }
derive_more = { version = "0.99.4", features = ["display", "error"], default_features = false }
chrono = { version = "0.4.19", features = ["std", "serde"], default_features = false }
ahash = { version = "0.5.10", default_features = false }
chrono = { version = "0.4.19", features = ["clock", "serde"], default_features = false }
ahash = "0.7.3"
parking_lot = "0.11.1"
rayon = "1.5.1"
structopt = "0.3.21"
Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use sources::Sources;
use taxonomies::Taxonomy;
use types::{MutSet, Templates};

use chrono::offset::Local;
use ramhorns::{Content, Template};
use rayon::prelude::*;
use std::env::var;
Expand Down Expand Up @@ -110,7 +111,7 @@ fn new_page(config: &Config) -> Result<(), Error> {
"Path (relative to the content directory):",
)?);
create_dir_all(&path)?;
let date = next_line(&mut lines, "Date (format YYYY-MM-DD):")?;
let date = Local::now().format("%Y-%m-%d").to_string();
path.push(format!("{}-{}.toml", &date, &slug));

if path.exists() {
Expand Down

0 comments on commit be76f5b

Please sign in to comment.