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

2
Cargo.lock generated
View File

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

View File

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

View File

@ -1,7 +1,6 @@
use std::collections::HashMap; use std::collections::HashMap;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use chrono::Utc;
use globset::{Glob, GlobSet, GlobSetBuilder}; use globset::{Glob, GlobSet, GlobSetBuilder};
use serde_derive::{Deserialize, Serialize}; use serde_derive::{Deserialize, Serialize};
use syntect::parsing::{SyntaxSet, SyntaxSetBuilder}; use syntect::parsing::{SyntaxSet, SyntaxSetBuilder};
@ -196,9 +195,6 @@ pub struct Config {
/// All user params set in [extra] in the config /// All user params set in [extra] in the config
pub extra: HashMap<String, Toml>, pub extra: HashMap<String, Toml>,
/// Set automatically when instantiating the config. Used for cachebusting
pub build_timestamp: Option<i64>,
} }
impl Config { 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) 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() { if !config.ignored_content.is_empty() {
// Convert the file glob strings into a compiled glob set matcher. We want to do this once, // 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 // 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(), link_checker: LinkChecker::default(),
slugify: Slugify::default(), slugify: Slugify::default(),
extra: HashMap::new(), extra: HashMap::new(),
build_timestamp: Some(1),
} }
} }
} }