Remove unneeded build_timestamp on config

This commit is contained in:
Vincent Prouillet 2020-05-28 09:21:42 +02:00
parent b935dc6273
commit b87f17570f
4 changed files with 4 additions and 10 deletions

View file

@ -1,5 +1,7 @@
# Changelog
## 0.12.0 (unreleased)
## 0.11.0 (2020-05-25)
### Breaking
@ -23,7 +25,6 @@
- Pass missing `lang` template parameter to taxonomy list template
- Fix default index section not having its path set to '/'
- Change cachebust strategy to use SHA256 instead of timestamp
- Fix
## 0.10.1 (2020-03-12)

2
Cargo.lock generated
View file

@ -2944,7 +2944,7 @@ dependencies = [
[[package]]
name = "zola"
version = "0.11.1"
version = "0.12.0"
dependencies = [
"atty",
"chrono",

View file

@ -1,6 +1,6 @@
[package]
name = "zola"
version = "0.11.1"
version = "0.12.0"
authors = ["Vincent Prouillet <hello@vincentprouillet.com>"]
edition = "2018"
license = "MIT"

View file

@ -1,7 +1,6 @@
use std::collections::HashMap;
use std::path::{Path, PathBuf};
use chrono::Utc;
use globset::{Glob, GlobSet, GlobSetBuilder};
use serde_derive::{Deserialize, Serialize};
use syntect::parsing::{SyntaxSet, SyntaxSetBuilder};
@ -196,9 +195,6 @@ pub struct Config {
/// All user params set in [extra] in the config
pub extra: HashMap<String, Toml>,
/// Set automatically when instantiating the config. Used for cachebusting
pub build_timestamp: Option<i64>,
}
impl Config {
@ -222,8 +218,6 @@ impl Config {
bail!("Default language `{}` should not appear both in `config.default_language` and `config.languages`", config.default_language)
}
config.build_timestamp = Some(Utc::now().timestamp());
if !config.ignored_content.is_empty() {
// Convert the file glob strings into a compiled glob set matcher. We want to do this once,
// at program initialization, rather than for every page, for example. We arrange for the
@ -404,7 +398,6 @@ impl Default for Config {
link_checker: LinkChecker::default(),
slugify: Slugify::default(),
extra: HashMap::new(),
build_timestamp: Some(1),
}
}
}