diff --git a/.gitignore b/.gitignore index 423dde2..b60977c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ stage # nixos dependencies snippet shell.nix +# vim temporary files +**/.*.sw* diff --git a/CHANGELOG.md b/CHANGELOG.md index 01611aa..c37abc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 0.10.0 (unreleased) + +### Breaking +- Remove `toc` variable in section/page context and pass it to `page.toc` and `section.toc` instead so they are +accessible everywhere +- [Slugification](https://en.wikipedia.org/wiki/Slug_(web_publishing)#Slug) of paths, taxonomies and anchors is now configurable. By default, everything will still be slugified like in previous versions. +See documentation for information on how to disable it. + +### Other +- Add zenburn syntax highlighting theme +- Fix `zola init .` +- Add `total_pages` to paginator +- Do not prepend URL prefix to links that start with a scheme +- Allow skipping anchor checking in `zola check` for some URL prefixes +- Allow skipping prefixes in `zola check` +- Check for path collisions when building the site +- Fix bug in template extension with themes +- Use Rustls instead of openssl +- The continue reading HTML element is now a instead of a

+- Update livereload.js +- Add --root global argument + ## 0.9.0 (2019-09-28) ### Breaking diff --git a/Cargo.lock b/Cargo.lock index df5fef3..dbc6ec4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,235 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -[[package]] -name = "actix-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-connect" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-rt 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-utils 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-files" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "actix-http 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "v_htmlescape 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-http" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-connect 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-utils 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-router" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-rt" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-server" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "actix-rt 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-server-config" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-service" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-threadpool" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-utils" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-web" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-http 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-router 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-rt 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-utils 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web-codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-web-codegen" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "adler32" version = "1.0.4" @@ -237,10 +7,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "aho-corasick" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -253,7 +23,7 @@ dependencies = [ "maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -265,73 +35,64 @@ dependencies = [ ] [[package]] -name = "arc-swap" -version = "0.4.3" +name = "anyhow" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "arrayvec" -version = "0.4.11" +name = "assert-json-diff" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "atty" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "autocfg" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "backtrace" -version = "0.3.38" +name = "autocfg" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "backtrace-sys" -version = "0.1.31" +name = "base64" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base64" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "bincode" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bitflags" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -339,15 +100,15 @@ name = "block-buffer" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "block-padding" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -355,23 +116,33 @@ dependencies = [ [[package]] name = "bstr" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bumpalo" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byte-tools" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bytemuck" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" -version = "1.3.2" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -379,23 +150,26 @@ name = "bytes" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bytes" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "c2-chacha" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.45" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -405,13 +179,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "chrono" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -420,8 +193,8 @@ name = "chrono-tz" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "parse-zoneinfo 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "parse-zoneinfo 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -430,11 +203,11 @@ version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -443,7 +216,7 @@ name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -451,59 +224,38 @@ name = "color_quant" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "colored" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "config" version = "0.1.0" dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "syntect 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] -[[package]] -name = "cookie" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie_store" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "publicsuffix 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "copyless" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "core-foundation" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -521,69 +273,79 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-deque" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-queue" -version = "0.1.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-utils" -version = "0.6.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "csv" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "csv-core" -version = "0.1.6" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ct-logs" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -601,25 +363,17 @@ version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "derive_more" -version = "0.15.0" +name = "deunicode" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "deunicode" -version = "0.4.3" +name = "difference" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -632,7 +386,7 @@ dependencies = [ [[package]] name = "dtoa" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -646,70 +400,31 @@ version = "2.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-stemmers 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rust-stemmers 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "encoding_rs" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "enum-as-inner" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "error-chain" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "errors" version = "0.1.0" dependencies = [ - "image 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", "syntect 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 1.0.0-beta.16 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "failure" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "failure_derive" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -719,24 +434,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "filetime" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "flate2" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -761,14 +476,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "front_matter" version = "0.1.0" dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 1.0.0-beta.16 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -782,7 +497,7 @@ name = "fsevent" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -791,7 +506,7 @@ name = "fsevent-sys" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -804,7 +519,7 @@ name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -819,21 +534,62 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "futures" -version = "0.1.29" +name = "futures-channel" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "futures-cpupool" -version = "0.1.8" +name = "futures-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-io" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-sink" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-task" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-util" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -849,17 +605,17 @@ name = "getopts" version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "getrandom" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -881,11 +637,11 @@ name = "globset" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -893,47 +649,42 @@ name = "globwalk" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ignore 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "ignore 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" -version = "0.1.26" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "hashbrown" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "heck" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "hostname" -version = "0.1.5" +name = "hermit-abi" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -944,30 +695,28 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "markup5ever 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http" -version = "0.1.18" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http-body" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -985,58 +734,74 @@ name = "humantime" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper" -version = "0.12.35" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "hyper-tls" -version = "0.3.2" +name = "hyper-rustls" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "idna" -version = "0.1.5" +name = "hyper-staticfile" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hyper-tls" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1046,40 +811,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ignore" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "image" -version = "0.22.2" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytemuck 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "gif 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jpeg-decoder 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "png 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jpeg-decoder 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "png 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", "scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tiff 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tiff 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1087,18 +853,21 @@ name = "imageproc" version = "0.1.0" dependencies = [ "errors 0.1.0", - "image 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 1.0.0-beta.16 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] [[package]] name = "indexmap" -version = "1.2.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "inflate" @@ -1110,12 +879,12 @@ dependencies = [ [[package]] name = "inotify" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1123,56 +892,47 @@ name = "inotify-sys" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "iovec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "ipconfig" -version = "0.2.1" +name = "iovec" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", - "widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itoa" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jpeg-decoder" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "kernel32-sys" -version = "0.2.2" +name = "js-sys" +version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "language-tags" +name = "kernel32-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "lazy_static" @@ -1186,29 +946,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.62" +version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "library" version = "0.1.0" dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "config 0.1.0", "errors 0.1.0", "front_matter 0.1.0", "globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "rendering 0.1.0", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "slotmap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 1.0.0-beta.16 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -1217,16 +976,18 @@ name = "line-wrap" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "safemem 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "link_checker" version = "0.1.0" dependencies = [ + "config 0.1.0", "errors 0.1.0", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)", + "mockito 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1234,23 +995,6 @@ name = "linked-hash-map" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lock_api" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "lock_api" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "log" version = "0.4.8" @@ -1259,14 +1003,6 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "lzw" version = "0.10.0" @@ -1290,10 +1026,10 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_codegen 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1305,15 +1041,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.2.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "memoffset" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1321,7 +1054,7 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.14" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1329,22 +1062,13 @@ name = "mime_guess" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz-sys" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miniz_oxide" -version = "0.3.2" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1352,14 +1076,15 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.19" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1369,25 +1094,15 @@ dependencies = [ [[package]] name = "mio-extras" -version = "2.0.5" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "mio-uds" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "miow" version = "0.2.1" @@ -1399,20 +1114,37 @@ dependencies = [ "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mockito" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "assert-json-diff 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "colored 1.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "native-tls" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1422,13 +1154,13 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "new_debug_unreachable" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1436,98 +1168,83 @@ name = "nix" version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "nodrop" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "nom" version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "notify" -version = "4.0.13" +version = "4.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "fsevent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "inotify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "num-derive" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "num-integer" -version = "0.1.41" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-iter" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-rational" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num_cpus" -version = "1.10.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1535,9 +1252,9 @@ name = "onig" version = "4.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "onig_sys 69.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1546,8 +1263,8 @@ name = "onig_sys" version = "69.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1557,7 +1274,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "open" -version = "1.3.2" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1565,15 +1282,15 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.24" +version = "0.10.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1583,82 +1300,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "owning_ref" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot_core" -version = "0.4.0" +version = "0.9.54" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parse-zoneinfo" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "percent-encoding" version = "2.1.0" @@ -1688,9 +1347,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "pest_meta 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1700,7 +1359,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1737,9 +1396,37 @@ dependencies = [ "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pin-project" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pin-utils" +version = "0.1.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pkg-config" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1748,19 +1435,19 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "line-wrap 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "png" -version = "0.15.0" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "deflate 0.7.20 (registry+https://github.com/rust-lang/crates.io-index)", "inflate 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1768,7 +1455,7 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1777,47 +1464,50 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "proc-macro2" -version = "0.4.30" +name = "proc-macro-hack" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro-nested" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "proc-macro2" -version = "1.0.4" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "publicsuffix" -version = "1.5.3" +name = "proc-macro2" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pulldown-cmark" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quick-error" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1833,7 +1523,7 @@ name = "quote" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1841,8 +1531,8 @@ name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1856,11 +1546,11 @@ dependencies = [ [[package]] name = "rand" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1871,7 +1561,7 @@ name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1880,7 +1570,7 @@ name = "rand_chacha" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1902,7 +1592,7 @@ name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1934,7 +1624,7 @@ name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1946,7 +1636,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1957,7 +1647,7 @@ name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1971,24 +1661,24 @@ dependencies = [ [[package]] name = "rayon" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rayon-core" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2018,13 +1708,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.3.1" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2032,12 +1722,12 @@ name = "regex-automata" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.12" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2059,73 +1749,77 @@ dependencies = [ "link_checker 0.1.0", "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "syntect 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", - "tera 1.0.0-beta.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] [[package]] name = "reqwest" -version = "0.9.20" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-rustls 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki-roots 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "resolv-conf" -version = "0.6.2" +name = "ring" +version = "0.16.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rust-stemmers" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "rustc_version" version = "0.2.3" @@ -2134,22 +1828,45 @@ dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustls" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustls-native-certs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "safemem" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "same-file" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2157,24 +1874,24 @@ name = "sass-rs" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "sass-sys 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "sass-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sass-sys" -version = "0.4.13" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schannel" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2188,13 +1905,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "scopeguard" -version = "0.3.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "scopeguard" -version = "1.0.0" +name = "sct" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "search" @@ -2209,18 +1930,18 @@ dependencies = [ [[package]] name = "security-framework" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2241,87 +1962,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.101" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "serde_derive" -version = "1.0.101" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_urlencoded" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_urlencoded" -version = "0.6.1" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "sha-1" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "signal-hook" -version = "0.1.10" +name = "serde_urlencoded" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook-registry 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "signal-hook-registry" -version = "1.1.1" +name = "sha-1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arc-swap 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2340,14 +2024,14 @@ dependencies = [ "imageproc 0.1.0", "library 0.1.0", "link_checker 0.1.0", - "rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "sass-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "search 0.1.0", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", - "tera 1.0.0-beta.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -2371,43 +2055,29 @@ dependencies = [ [[package]] name = "smallvec" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "socket2" -version = "0.3.11" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "stable_deref_trait" -version = "1.1.1" +name = "sourcefile" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "string" -version = "0.2.1" +name = "spin" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "string_cache" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_codegen 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2419,7 +2089,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2462,43 +2132,32 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.5" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "synstructure" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "syntect" version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "onig 4.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "plist 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2508,8 +2167,8 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2519,20 +2178,21 @@ dependencies = [ name = "templates" version = "0.1.0" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "config 0.1.0", - "csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", - "image 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", "imageproc 0.1.0", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "library 0.1.0", - "pulldown-cmark 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 1.0.0-beta.16 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mockito 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -2548,10 +2208,10 @@ dependencies = [ [[package]] name = "tera" -version = "1.0.0-beta.16" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "chrono-tz 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "globwalk 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2559,19 +2219,20 @@ dependencies = [ "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "unic-segment 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "termcolor" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2579,34 +2240,25 @@ name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thread_local" -version = "0.3.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "threadpool" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "tiff" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-derive 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2614,237 +2266,89 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-buf" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-codec" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-executor" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-io" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-signal" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-sync" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.3" +name = "tokio-macros" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-threadpool" -version = "0.1.15" +name = "tokio-rustls" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-timer" -version = "0.2.11" +name = "tokio-tls" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-udp" -version = "0.1.5" +name = "tokio-util" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "trust-dns-proto" -version = "0.7.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "trust-dns-resolver" -version = "0.11.1" +name = "tower-service" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "ipconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "trust-dns-proto 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "try_from" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "typenum" version = "1.11.2" @@ -2901,10 +2405,10 @@ dependencies = [ [[package]] name = "unicase" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2917,20 +2421,20 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.8" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicode-segmentation" -version = "1.3.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicode-width" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2944,18 +2448,13 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "url" -version = "1.7.2" +name = "untrusted" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "url" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2973,99 +2472,179 @@ name = "utils" version = "0.1.0" dependencies = [ "errors 0.1.0", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 1.0.0-beta.16 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "uuid" -version = "0.7.4" +name = "vcpkg" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "vec_map" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "version_check" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "walkdir" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "v_escape" -version = "0.7.4" +name = "want" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "v_escape_derive 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "v_escape_derive" -version = "0.5.5" +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "v_htmlescape" -version = "0.4.5" +name = "wasm-bindgen-backend" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "v_escape 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "vcpkg" -version = "0.2.7" +name = "wasm-bindgen-macro" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "vec_map" -version = "0.8.1" +name = "wasm-bindgen-macro-support" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "version_check" -version = "0.1.5" +name = "wasm-bindgen-shared" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "void" -version = "1.0.2" +name = "wasm-bindgen-webidl" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "walkdir" -version = "2.2.9" +name = "web-sys" +version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "want" -version = "0.2.0" +name = "webpki" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "wasi" -version = "0.7.0" +name = "webpki-roots" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "widestring" -version = "0.4.0" +name = "weedle" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "winapi" @@ -3093,7 +2672,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3104,15 +2683,6 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "wincolor" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "winreg" version = "0.6.2" @@ -3121,29 +2691,21 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "winutil" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "ws" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3170,98 +2732,84 @@ dependencies = [ [[package]] name = "zola" -version = "0.9.0" +version = "0.10.0" dependencies = [ - "actix-files 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "front_matter 0.1.0", "globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-staticfile 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "notify 4.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "open 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "notify 4.0.15 (registry+https://github.com/rust-lang/crates.io-index)", + "open 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "rebuild 0.1.0", "site 0.1.0", - "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", - "ws 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ws 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] -"checksum actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9f2c11af4b06dc935d8e1b1491dad56bfb32febc49096a91e773f8535c176453" -"checksum actix-connect 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9fade9bd4bb46bacde89f1e726c7a3dd230536092712f5d94d77ca57c087fca0" -"checksum actix-files 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f1e4640b28cd96059541c932f6f350c63c76688e43d68305cdb88e0004da12b5" -"checksum actix-http 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf758ebbc4abfecbdc1ce7408601b2d7e0cd7e4766ef61183cd8ce16c194d64" -"checksum actix-router 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "23224bb527e204261d0291102cb9b52713084def67d94f7874923baefe04ccf7" -"checksum actix-rt 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "168620aaf00fcd2a16e621790abaf180ef7377c2f8355b4ca5775d6afc778ed8" -"checksum actix-server 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb3038e9e457e0a498ea682723e0f4e6cc2c4f362a1868d749808355275ad959" -"checksum actix-server-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "483a34989c682d93142bacad6300375bb6ad8002d2e0bb249dbad86128b9ff30" -"checksum actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bca5b48e928841ff7e7dce1fdb5b0d4582f6b1b976e08f4bac3f640643e0773f" -"checksum actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b5ae85d13da7e6fb86b1b7bc83185e0e3bd4cc5f421c887e1803796c034d35d" -"checksum actix-utils 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6ea501068a0173533704be321f149853f702d9e3c3ce9d57e7a96d94b1ab5aca" -"checksum actix-web 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ced216f53d465f9d6478454b2b994d1fe91ec203ac9d056837cbe07e823cb83" -"checksum actix-web-codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe9e3cdec1e645b675f354766e0688c5705021c85ab3cf739be1c8999b91c76" "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" -"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" +"checksum aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811" "checksum ammonia 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9e266e1f4be5ffa05309f650e2586fe1d3ae6034eb24025a7ae1dfecc330823a" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum arc-swap 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f1a1eca3195b729bbd64e292ef2f5fff6b1c28504fed762ce2b1013dde4d8e92" -"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" -"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" -"checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" -"checksum backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)" = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5" -"checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" +"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" +"checksum assert-json-diff 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9881d306dee755eccf052d652b774a6b2861e86b4772f555262130e58e4f81d2" +"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ab639324e3ee8774d296864fbc0dbbb256cf1a41c490b94cba90c082915f92" -"checksum bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a606a02debe2813760609f57a64a2ffd27d9fdf5b2f133eaca0b248dd92cdd2" +"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +"checksum bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -"checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09" -"checksum bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245" +"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +"checksum bstr 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "502ae1441a0a5adb8fbd38a5955a6416b9493e92b465de5e4a9bde6a539c2c48" +"checksum bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" -"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" +"checksum bytemuck 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37fa13df2292ecb479ec23aa06f4507928bef07839be9ef15281411076629431" +"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be" +"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" +"checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" +"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e8493056968583b0193c1bb04d6f7684586f3726992d6c573261941a895dbd68" +"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" "checksum chrono-tz 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e0e430fad0384e4defc3dc6b1223d1b886087a8bf9b7080e5ae027f73851ea15" "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" -"checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" -"checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" -"checksum copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ff9c56c9fb2a49c05ef0e431485a22400af20d33226dc0764d891d09e724127" +"checksum colored 1.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8815e2ab78f3a59928fc32e141fbeece88320a240e43f47b2fd64ea3a88a5b3d" "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" -"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" -"checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" -"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" -"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" -"checksum csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37519ccdfd73a75821cac9319d4fce15a81b9fcf75f951df5b9988aa3a0af87d" -"checksum csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" +"checksum crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c" +"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" +"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" +"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" +"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" +"checksum csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" +"checksum csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +"checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" "checksum ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c7dfd2d8b4c82121dfdff120f818e09fc4380b0b7e17a742081a89b94853e87f" "checksum deflate 0.7.20 (registry+https://github.com/rust-lang/crates.io-index)" = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4" -"checksum derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a141330240c921ec6d074a3e188a7c7ef95668bb95e7d44fa0e5778ec2a7afe" "checksum deunicode 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" +"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" +"checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum elasticlunr-rs 2.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f66a620976c38dbbbcd6355910432cef8b0911b3af86332029752379f0ff7924" -"checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" -"checksum enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3d58266c97445680766be408285e798d3401c6d4c378ec5552e78737e681e37d" -"checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" -"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" -"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" +"checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum filetime 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd7380b54ced79dda72ecc35cc4fbbd1da6bba54afaa37e96fd1c2a308cd469" -"checksum flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "2adaffba6388640136149e18ed080b77a78611c1e1d6de75aedcdf78df5d4682" +"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d" +"checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" @@ -3272,92 +2820,84 @@ dependencies = [ "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futf 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b" -"checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" -"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" +"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" +"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" +"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" +"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" +"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" -"checksum getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571" +"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum gif 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "471d90201b3b223f3451cd4ad53e34295f16a1df17b1edf3736d47761c3981af" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" "checksum globwalk 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "53cbcf0368596897b0a3b8ff2110acf2400e80ffad4ca9238b52ff282a9b267b" -"checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -"checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" +"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" +"checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" "checksum html5ever 0.24.1 (registry+https://github.com/rust-lang/crates.io-index)" = "025483b0a1e4577bb28578318c886ee5f817dda6eb62473269349044406644cb" -"checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" -"checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" +"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" +"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -"checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" -"checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" -"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +"checksum hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e" +"checksum hyper-rustls 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf" +"checksum hyper-staticfile 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "241e2c25e6221c5bfaea5034cbf09879e30a443ad7ec674116091bab47207a5b" +"checksum hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum ignore 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0ec16832258409d571aaef8273f3c3cc5b060d784e159d1a0f3b0017308f84a7" -"checksum image 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ee0665404aa0f2ad154021777b785878b0e5b1c1da030455abc3d9ed257c2c67" -"checksum indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a61202fbe46c4a951e9404a720a0180bcf3212c750d735cb5c4ba4dc551299f3" +"checksum ignore 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "522daefc3b69036f80c7d2990b28ff9e0471c683bad05ca258e0a01dd22c5a1e" +"checksum image 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef4e336ec01a678e7ab692914c641181528e8656451e6252f8f9e33728882eaf" +"checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" "checksum inflate 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" -"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" +"checksum inotify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24e40d6fd5d64e2082e0c796495c8ef5ad667a96d03e5aaa0becfd9d47bcbfb8" "checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" -"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum ipconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa79fa216fbe60834a9c0737d7fcd30425b32d1c58854663e24d4c4b328ed83f" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum jpeg-decoder 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "c1aae18ffeeae409c6622c3b6a7ee49792a7e5a062eea1b135fbb74e301792ba" +"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum jpeg-decoder 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0256f0aec7352539102a9efbcb75543227b7ab1117e0f95450023af730128451" +"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" +"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" "checksum line-wrap 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" -"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -"checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" "checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" "checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" "checksum maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" "checksum markup5ever 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "65381d9d47506b8592b97c4efd936afcf673b09b059f2bef39c7211ee78b9d03" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" -"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" -"checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" +"checksum memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53445de381a1f436797497c61d851644d0e8e88e6140f22872ad33a704933978" +"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" +"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" -"checksum miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" -"checksum miniz_oxide 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7108aff85b876d06f22503dcce091e29f76733b2bfdd91eebce81f5e68203a10" -"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" -"checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" -"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" +"checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" +"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" +"checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum mockito 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27017c915d98e7e2ffdae9a77e33d568d98b1235f68161d47013cc9e0345d853" "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f40f005c60db6e03bae699e414c58bf9aa7ea02a2d0b9bfbcf19286cc4c82b30" +"checksum new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" "checksum nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" -"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -"checksum notify 4.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1191efa2b8fe041decb55c238a125b7a1aeb6fad7a525133a02be5ec949ff3cb" -"checksum num-derive 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "eafd0b45c5537c3ba526f79d3e75120036502bebacbb3f3220914067ce39dbf2" -"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" -"checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e" -"checksum num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2885278d5fe2adc2f75ced642d52d879bffaceb5a2e0b1d4309ffdfb239b454" -"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" -"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" +"checksum notify 4.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "80ae4a7688d1fab81c5bf19c64fc8db920be8d519ce6336ed4e7efe024724dbd" +"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +"checksum num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" +"checksum num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" "checksum onig 4.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8518fcb2b1b8c2f45f0ad499df4fda6087fc3475ca69a185c173b8315d2fb383" "checksum onig_sys 69.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388410bf5fa341f10e58e6db3975f4bea1ac30247dd79d37a9e5ced3cb4cc3b0" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" -"checksum open 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "94b424e1086328b0df10235c6ff47be63708071881bead9e76997d9291c0134b" -"checksum openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)" = "8152bb5a9b5b721538462336e3bef9a539f892715e5037fda0f984577311af15" +"checksum open 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e02989ecc31ed50c00e2b0edc25ab1f5e7bd81e8baa52b7c4a89180580b4ed08" +"checksum openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)" = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)" = "f4fad9e54bd23bd4cbbe48fdc08a1b8091707ac869ef8508edea2fec77dcc884" -"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" -"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" -"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -"checksum parse-zoneinfo 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "089a398ccdcdd77b8c38909d5a1e4b67da1bc4c9dbfe6d5b536c828eddb779e5" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +"checksum openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)" = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" +"checksum parse-zoneinfo 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "feece9d0113b400182a7d00adcff81ccf29158c49c5abd11e2eed8589bf6ff07" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" "checksum pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e4fb201c5c22a55d8b24fef95f78be52738e5e1361129be1b5e862ecdb6894a" "checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" @@ -3367,20 +2907,25 @@ dependencies = [ "checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" "checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" "checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" -"checksum pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "72d5370d90f49f70bd033c3d75e87fc529fbfff9d6f7cccef07d6170079d91ea" +"checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" +"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" +"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" +"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" +"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum plist 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a9f075f6394100e7c105ed1af73fb1859d6fd14e49d4290d578120beb167f" -"checksum png 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8422b27bb2c013dd97b9aef69e161ce262236f49aaf46a0489011c8ff0264602" -"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" +"checksum png 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef859a23054bbfee7811284275ae522f0434a3c8e7f4b74bd4a35ae7e1c4a283" +"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" +"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afdc77cc74ec70ed262262942ebb7dac3d479e9e5cfa2da1841c0806f6cdabcc" -"checksum publicsuffix 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9bf259a81de2b2eb9850ec990ec78e6a25319715584fd7652b9b26f96fcb1510" -"checksum pulldown-cmark 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85b0ad0d4c1702965ee6bb5b4ff5e71f83850b497d497e9444302987bf9e26a4" -"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" +"checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" +"checksum pulldown-cmark 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c2d7fd131800e0d63df52aff46201acaab70b431a4a1ec6f0343fe8e64f35a4" +"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" +"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" @@ -3393,86 +2938,70 @@ dependencies = [ "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "83a27732a533a1be0a0035a111fe76db89ad312f6f0347004c220c57f209a123" -"checksum rayon-core 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "98dcf634205083b17d0861252431eb2acbfb698ab7478a2d20de07954f47ec7b" +"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" +"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" +"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" "checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" -"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" +"checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum reqwest 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)" = "0f6d896143a583047512e59ac54a215cb203c29cc941917343edea3be8df9c78" -"checksum resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b263b4aa1b5de9ffc0054a2386f96992058bb6870aab516f8cdeb8a667d56dcb" -"checksum rust-stemmers 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05928c187b85b38f6b98db43057a24f0245163635a5ce6325a4f77a833d646aa" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +"checksum reqwest 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c0e798e19e258bf6c30a304622e3e9ac820e483b06a1857a026e1f109b113fe4" +"checksum ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)" = "741ba1704ae21999c00942f9f5944f801e977f54302af346b596287599ad1862" +"checksum rust-stemmers 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" -"checksum safemem 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b08423011dae9a5ca23f07cf57dac3857f5c885d352b76f6d95f4aea9434d0" -"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" +"checksum rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" +"checksum rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" +"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" +"checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" "checksum sass-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cabcf7c6e55053f359911187ac401409aad2dc14338cae972dec266fee486abd" -"checksum sass-sys 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6e16ac97c2335bc367e2d675f54c1823558f1b19a6c67671d48b70e30ae22972" -"checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" +"checksum sass-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)" = "36fdf4ec7f28949c660cca573d7bdfda683cf7eef2b59670e6650607bc3108e9" +"checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" -"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" -"checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" -"checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" +"checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +"checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" +"checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd" -"checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e" -"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" -"checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" +"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" +"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +"checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" "checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" -"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" -"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" -"checksum signal-hook 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4f61c4d59f3aaa9f61bba6450a9b80ba48362fd7d651689e7a10c453b1f6dc68" -"checksum signal-hook-registry 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1797d48f38f91643908bb14e35e79928f9f4b3cefb2420a564dde0991b4358dc" +"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum slotmap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c46a3482db8f247956e464d783693ece164ca056e6e67563ee5505bdb86452cd" "checksum slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" -"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" -"checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" -"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -"checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423" +"checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" +"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" +"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +"checksum string_cache 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "89c058a82f9fd69b1becf8c274f412281038877c553182f1d02eb027045a2d67" "checksum string_cache_codegen 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6" "checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum strum 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e5d1c33039533f051704951680f1adfd468fd37ac46816ded0d9ee068e60f05f" "checksum strum_macros 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47cd23f5c7dee395a00fa20135e2ec0fffcdfa151c56182966d7a3261343432e" "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" -"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" +"checksum syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" "checksum syntect 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e80b8831c5a543192ffc3727f01cf0e57579c6ac15558e3048bfb5708892167b" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum tendril 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "707feda9f2582d5d680d733e38755547a3e8fb471e7ba11452ecfd9ce93a5d3b" -"checksum tera 1.0.0-beta.16 (registry+https://github.com/rust-lang/crates.io-index)" = "e0fa13465ab85540a4d069fbe9c76af96e78ef83046af4ed54e7be33ef98c3eb" -"checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" +"checksum tera 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8501ae034d1c2d2e8c29f3c259d919c11489220d8ee8a268e7e1fe3eff94c86a" +"checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" -"checksum tiff 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d7b7c2cfc4742bd8a32f2e614339dd8ce30dbcf676bb262bd63a2327bc5df57d" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +"checksum tiff 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "002351e428db1eb1d8656d4ca61947c3519ac3191e1c804d4600cd32093b77ad" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -"checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" -"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" -"checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" -"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" -"checksum tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6dc5276ea05ce379a16de90083ec80836440d5ef8a6a39545a3207373b8296" -"checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7" -"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "90ca01319dea1e376a001e8dc192d42ebde6dd532532a5bad988ac37db365b19" -"checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" -"checksum tokio-udp 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f02298505547f73e60f568359ef0d016d5acd6e830ab9bc7c4a5b3403440121b" -"checksum toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c7aabe75941d914b72bf3e5d3932ed92ce0664d49d8432305a8b547c37227724" -"checksum trust-dns-proto 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5559ebdf6c2368ddd11e20b11d6bbaf9e46deb803acd7815e93f5a7b4a6d2901" -"checksum trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c9992e58dba365798803c0b91018ff6c8d3fc77e06977c4539af2a6bfe0a039" +"checksum tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" +"checksum tokio-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c" +"checksum tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc" +"checksum tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7bde02a3a5291395f59b06ec6945a3077602fac2b07eeeaf0dee2122f3619828" +"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" +"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" "checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" "checksum ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f00ed7be0c1ff1e24f46c3d2af4859f7e863672ba3a6e92e7cff702bf9f06c2" "checksum unic-char-property 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" @@ -3481,38 +3010,43 @@ dependencies = [ "checksum unic-segment 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" "checksum unic-ucd-segment 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" "checksum unic-ucd-version 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" -"checksum unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2e2e6bd1e59e56598518beb94fd6db628ded570326f0a98c679a304bd9f00150" +"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" -"checksum unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1967f4cdfc355b37fd76d2a954fb2ed3871034eb4f26d60537d88795cfc332a9" -"checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20" +"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" +"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" +"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" +"checksum untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" +"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" "checksum utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" -"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -"checksum v_escape 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "660b101c07b5d0863deb9e7fb3138777e858d6d2a79f9e6049a27d1cc77c6da6" -"checksum v_escape_derive 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "75b2dc50d1c14d7b4488bf34263140a3827d8ca4f4265411e4784ac262382276" -"checksum v_htmlescape 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e33e939c0d8cf047514fb6ba7d5aac78bc56677a6938b2ee67000b91f2e97e41" -"checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" +"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" -"checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" -"checksum widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effc0e4ff8085673ea7b9b2e3c73f6bd4d118810c9009ed8f1e16bd96c331db6" +"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" +"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" +"checksum wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" +"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" +"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" +"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" +"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" +"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" +"checksum webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" +"checksum webpki-roots 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a262ae37dd9d60f60dd473d1158f9fbebf110ba7b6a5051c8160460f6043718b" +"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" +"checksum winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" "checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -"checksum winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e" -"checksum ws 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a6f5bb86663ff4d1639408410f50bf6050367a8525d644d49a6894cd618a631" +"checksum ws 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a2c47b5798ccc774ffb93ff536aec7c4275d722fd9c740c83cdd1af1f2d94" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "541b12c998c5b56aa2b4e6f18f03664eef9a4fd0a246a55594efae6cc2d964b5" "checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" diff --git a/Cargo.toml b/Cargo.toml index 065a70b..cd164f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "zola" -version = "0.9.0" +version = "0.10.0" authors = ["Vincent Prouillet "] +edition = "2018" license = "MIT" readme = "README.md" description = "A fast static site generator with everything built-in" @@ -25,8 +26,9 @@ termcolor = "1.0.4" # Used in init to ensure the url given as base_url is a valid one url = "2" # Below is for the serve cmd -actix-files = "0.1" -actix-web = { version = "1.0", default-features = false, features = [] } +hyper = { version = "0.13", default-features = false, features = ["runtime"] } +hyper-staticfile = "0.5" +tokio = { version = "0.2", default-features = false, features = [] } notify = "4" ws = "0.9" ctrlc = "3" diff --git a/EXAMPLES.md b/EXAMPLES.md index 5341144..609c1a4 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -34,4 +34,3 @@ | [peterlyons.com](https://peterlyons.com) | https://github.com/focusaurus/peterlyons.com-zola | | [blog.turbo.fish](https://blog.turbo.fish) | https://git.sr.ht/~jplatte/blog.turbo.fish | | [guerinpe.com](https://guerinpe.com) | https://github.com/Grelot/blog | - diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 093ce82..7227338 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,9 +19,9 @@ stages: linux-stable: imageName: 'ubuntu-16.04' rustup_toolchain: stable - linux-1.35: + linux-1.39: imageName: 'ubuntu-16.04' - rustup_toolchain: 1.35.0 + rustup_toolchain: 1.39.0 pool: vmImage: $(imageName) steps: @@ -32,7 +32,7 @@ stages: condition: ne( variables['Agent.OS'], 'Windows_NT' ) - script: | curl -sSf -o rustup-init.exe https://win.rustup.rs - rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% + rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% --default-host x86_64-pc-windows-msvc echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" displayName: Windows install rust condition: eq( variables['Agent.OS'], 'Windows_NT' ) @@ -70,8 +70,10 @@ stages: displayName: Install rust condition: ne( variables['Agent.OS'], 'Windows_NT' ) - script: | + set CARGO_HOME=%USERPROFILE%\.cargo curl -sSf -o rustup-init.exe https://win.rustup.rs - rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% + rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% --default-host x86_64-pc-windows-msvc + set PATH=%PATH%;%USERPROFILE%\.cargo\bin echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" displayName: Windows install rust condition: eq( variables['Agent.OS'], 'Windows_NT' ) diff --git a/build.rs b/build.rs index 91d124f..f6e8977 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,3 @@ -#[macro_use] -extern crate clap; - // use clap::Shell; include!("src/cli.rs"); diff --git a/components/config/Cargo.toml b/components/config/Cargo.toml index 643f3d1..588996f 100644 --- a/components/config/Cargo.toml +++ b/components/config/Cargo.toml @@ -2,6 +2,7 @@ name = "config" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] toml = "0.5" diff --git a/components/config/examples/generate_sublime.rs b/components/config/examples/generate_sublime.rs index 981e399..9bce452 100644 --- a/components/config/examples/generate_sublime.rs +++ b/components/config/examples/generate_sublime.rs @@ -2,8 +2,11 @@ //! syntect, not as a helpful example for beginners. //! Although it is a valid example for serializing syntaxes, you probably won't need //! to do this yourself unless you want to cache your own compiled grammars. -extern crate syntect; + +use std::collections::HashMap; +use std::collections::HashSet; use std::env; +use std::iter::FromIterator; use syntect::dumps::*; use syntect::highlighting::ThemeSet; use syntect::parsing::SyntaxSetBuilder; @@ -26,10 +29,25 @@ fn main() { builder.add_from_folder(package_dir, true).unwrap(); let ss = builder.build(); dump_to_file(&ss, packpath_newlines).unwrap(); + let mut syntaxes: HashMap> = HashMap::new(); - for s in ss.syntaxes() { - if !s.file_extensions.is_empty() { - println!("- {} -> {:?}", s.name, s.file_extensions); + for s in ss.syntaxes().iter() { + syntaxes + .entry(s.name.clone()) + .and_modify(|e| { + for ext in &s.file_extensions { + e.insert(ext.clone()); + } + }) + .or_insert_with(|| HashSet::from_iter(s.file_extensions.iter().cloned())); + } + let mut keys = syntaxes.keys().collect::>(); + keys.sort_by(|a, b| a.to_lowercase().cmp(&b.to_lowercase())); + for k in keys { + if !syntaxes[k].is_empty() { + let mut extensions_sorted = syntaxes[k].iter().cloned().collect::>(); + extensions_sorted.sort(); + println!("- {} -> {:?}", k, extensions_sorted); } } } diff --git a/components/config/src/config.rs b/components/config/src/config.rs index 7a38760..210f60e 100644 --- a/components/config/src/config.rs +++ b/components/config/src/config.rs @@ -3,15 +3,16 @@ use std::path::{Path, PathBuf}; use chrono::Utc; use globset::{Glob, GlobSet, GlobSetBuilder}; +use serde_derive::{Deserialize, Serialize}; use syntect::parsing::{SyntaxSet, SyntaxSetBuilder}; use toml; use toml::Value as Toml; -use errors::Result; -use errors::Error; -use highlighting::THEME_SET; -use theme::Theme; +use crate::highlighting::THEME_SET; +use crate::theme::Theme; +use errors::{bail, Error, Result}; use utils::fs::read_file_with_error; +use utils::slugs::SlugifyStrategy; // We want a default base url for tests static DEFAULT_BASE_URL: &str = "http://a-website.com"; @@ -23,6 +24,24 @@ pub enum Mode { Check, } +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct Slugify { + pub paths: SlugifyStrategy, + pub taxonomies: SlugifyStrategy, + pub anchors: SlugifyStrategy, +} + +impl Default for Slugify { + fn default() -> Self { + Slugify { + paths: SlugifyStrategy::On, + taxonomies: SlugifyStrategy::On, + anchors: SlugifyStrategy::On, + } + } +} + #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] pub struct Language { @@ -35,7 +54,7 @@ pub struct Language { } impl Default for Language { - fn default() -> Language { + fn default() -> Self { Language { code: String::new(), rss: false, search: false } } } @@ -75,7 +94,7 @@ impl Taxonomy { } impl Default for Taxonomy { - fn default() -> Taxonomy { + fn default() -> Self { Taxonomy { name: String::new(), paginate_by: None, @@ -86,7 +105,22 @@ impl Default for Taxonomy { } } -type TranslateTerm = HashMap; +type TranslateTerm = HashMap; + +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct LinkChecker { + /// Skip link checking for these URL prefixes + pub skip_prefixes: Vec, + /// Skip anchor checking for these URL prefixes + pub skip_anchor_prefixes: Vec, +} + +impl Default for LinkChecker { + fn default() -> LinkChecker { + LinkChecker { skip_prefixes: Vec::new(), skip_anchor_prefixes: Vec::new() } + } +} #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(default)] @@ -152,6 +186,11 @@ pub struct Config { #[serde(skip_serializing, skip_deserializing)] // not a typo, 2 are need pub extra_syntax_set: Option, + pub link_checker: LinkChecker, + + /// The setup for which slugification strategies to use for paths, taxonomies and anchors + pub slugify: Slugify, + /// All user params set in [extra] in the config pub extra: HashMap, @@ -317,9 +356,16 @@ impl Config { Error::msg(format!("Translation for language '{}' is missing", lang.as_ref())) })?; - terms.get(key.as_ref()).ok_or_else(|| { - Error::msg(format!("Translation key '{}' for language '{}' is missing", key.as_ref(), lang.as_ref())) - }).map(|term| term.to_string()) + terms + .get(key.as_ref()) + .ok_or_else(|| { + Error::msg(format!( + "Translation key '{}' for language '{}' is missing", + key.as_ref(), + lang.as_ref() + )) + }) + .map(|term| term.to_string()) } } @@ -346,6 +392,8 @@ impl Default for Config { translations: HashMap::new(), extra_syntaxes: Vec::new(), extra_syntax_set: None, + link_checker: LinkChecker::default(), + slugify: Slugify::default(), extra: HashMap::new(), build_timestamp: Some(1), } @@ -354,7 +402,7 @@ impl Default for Config { #[cfg(test)] mod tests { - use super::{Config, Theme}; + use super::{Config, SlugifyStrategy, Theme}; #[test] fn can_import_valid_config() { @@ -551,4 +599,62 @@ ignored_content = ["*.{graphml,iso}", "*.py?"] assert!(g.is_match("foo.py3")); assert!(!g.is_match("foo.py")); } + + #[test] + fn link_checker_skip_anchor_prefixes() { + let config_str = r#" +title = "My site" +base_url = "example.com" + +[link_checker] +skip_anchor_prefixes = [ + "https://caniuse.com/#feat=", + "https://github.com/rust-lang/rust/blob/", +] + "#; + + let config = Config::parse(config_str).unwrap(); + assert_eq!( + config.link_checker.skip_anchor_prefixes, + vec!["https://caniuse.com/#feat=", "https://github.com/rust-lang/rust/blob/"] + ); + } + + #[test] + fn link_checker_skip_prefixes() { + let config_str = r#" +title = "My site" +base_url = "example.com" + +[link_checker] +skip_prefixes = [ + "http://[2001:db8::]/", + "https://www.example.com/path", +] + "#; + + let config = Config::parse(config_str).unwrap(); + assert_eq!( + config.link_checker.skip_prefixes, + vec!["http://[2001:db8::]/", "https://www.example.com/path",] + ); + } + + #[test] + fn slugify_strategies() { + let config_str = r#" +title = "My site" +base_url = "example.com" + +[slugify] +paths = "on" +taxonomies = "safe" +anchors = "off" + "#; + + let config = Config::parse(config_str).unwrap(); + assert_eq!(config.slugify.paths, SlugifyStrategy::On); + assert_eq!(config.slugify.taxonomies, SlugifyStrategy::Safe); + assert_eq!(config.slugify.anchors, SlugifyStrategy::Off); + } } diff --git a/components/config/src/highlighting.rs b/components/config/src/highlighting.rs index 413a700..33ccc16 100644 --- a/components/config/src/highlighting.rs +++ b/components/config/src/highlighting.rs @@ -1,9 +1,10 @@ +use lazy_static::lazy_static; use syntect::dumps::from_binary; use syntect::easy::HighlightLines; use syntect::highlighting::ThemeSet; use syntect::parsing::SyntaxSet; -use Config; +use crate::config::Config; lazy_static! { pub static ref SYNTAX_SET: SyntaxSet = { diff --git a/components/config/src/lib.rs b/components/config/src/lib.rs index 3c7443a..07fa104 100644 --- a/components/config/src/lib.rs +++ b/components/config/src/lib.rs @@ -1,20 +1,7 @@ -#[macro_use] -extern crate serde_derive; -extern crate chrono; -extern crate globset; -extern crate toml; -#[macro_use] -extern crate lazy_static; -extern crate syntect; - -#[macro_use] -extern crate errors; -extern crate utils; - mod config; pub mod highlighting; mod theme; -pub use config::{Config, Language, Taxonomy}; +pub use crate::config::{Config, Language, LinkChecker, Taxonomy}; use std::path::Path; diff --git a/components/config/src/theme.rs b/components/config/src/theme.rs index d6bd40c..c25b2c4 100644 --- a/components/config/src/theme.rs +++ b/components/config/src/theme.rs @@ -1,9 +1,10 @@ use std::collections::HashMap; use std::path::PathBuf; +use serde_derive::{Deserialize, Serialize}; use toml::Value as Toml; -use errors::Result; +use errors::{bail, Result}; use utils::fs::read_file_with_error; /// Holds the data from a `theme.toml` file. diff --git a/components/errors/Cargo.toml b/components/errors/Cargo.toml index 21d957d..46d7d25 100644 --- a/components/errors/Cargo.toml +++ b/components/errors/Cargo.toml @@ -2,9 +2,10 @@ name = "errors" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] -tera = "1.0.0-beta.10" +tera = "1" toml = "0.5" -image = "0.22" +image = "0.23" syntect = "=3.2.0" diff --git a/components/errors/src/lib.rs b/components/errors/src/lib.rs index 3d806cb..989fe56 100755 --- a/components/errors/src/lib.rs +++ b/components/errors/src/lib.rs @@ -1,8 +1,3 @@ -extern crate image; -extern crate syntect; -extern crate tera; -extern crate toml; - use std::convert::Into; use std::error::Error as StdError; use std::fmt; @@ -63,6 +58,18 @@ impl Error { pub fn chain(value: impl ToString, source: impl Into>) -> Self { Self { kind: ErrorKind::Msg(value.to_string()), source: Some(source.into()) } } + + /// Create an error from a list of path collisions, formatting the output + pub fn from_collisions(collisions: Vec<(&str, Vec)>) -> Self { + let mut msg = String::from("Found path collisions:\n"); + + for (path, filepaths) in collisions { + let row = format!("- `{}` from files {:?}\n", path, filepaths); + msg.push_str(&row); + } + + Self { kind: ErrorKind::Msg(msg), source: None } + } } impl From<&str> for Error { diff --git a/components/front_matter/Cargo.toml b/components/front_matter/Cargo.toml index ab53ad4..eb3f8a6 100644 --- a/components/front_matter/Cargo.toml +++ b/components/front_matter/Cargo.toml @@ -2,9 +2,10 @@ name = "front_matter" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] -tera = "1.0.0-beta.10" +tera = "1" chrono = "0.4" serde = "1" serde_derive = "1" diff --git a/components/front_matter/src/lib.rs b/components/front_matter/src/lib.rs index 204582c..83f2447 100644 --- a/components/front_matter/src/lib.rs +++ b/components/front_matter/src/lib.rs @@ -1,18 +1,7 @@ -#[macro_use] -extern crate lazy_static; -#[macro_use] -extern crate serde_derive; -extern crate chrono; -extern crate regex; -extern crate serde; -extern crate tera; -extern crate toml; - -#[macro_use] -extern crate errors; -extern crate utils; - -use errors::{Error, Result}; +use lazy_static::lazy_static; +use serde_derive::{Deserialize, Serialize}; + +use errors::{bail, Error, Result}; use regex::Regex; use std::path::Path; diff --git a/components/front_matter/src/page.rs b/components/front_matter/src/page.rs index 3d70ff1..dba7351 100644 --- a/components/front_matter/src/page.rs +++ b/components/front_matter/src/page.rs @@ -1,10 +1,11 @@ use std::collections::HashMap; use chrono::prelude::*; +use serde_derive::Deserialize; use tera::{Map, Value}; use toml; -use errors::Result; +use errors::{bail, Result}; use utils::de::{fix_toml_dates, from_toml_datetime}; /// The front matter of every page @@ -87,11 +88,9 @@ impl PageFrontMatter { pub fn date_to_datetime(&mut self) { self.datetime = if let Some(ref d) = self.date { if d.contains('T') { - DateTime::parse_from_rfc3339(&d).ok().and_then(|s| Some(s.naive_local())) + DateTime::parse_from_rfc3339(&d).ok().map(|s| s.naive_local()) } else { - NaiveDate::parse_from_str(&d, "%Y-%m-%d") - .ok() - .and_then(|s| Some(s.and_hms(0, 0, 0))) + NaiveDate::parse_from_str(&d, "%Y-%m-%d").ok().map(|s| s.and_hms(0, 0, 0)) } } else { None diff --git a/components/front_matter/src/section.rs b/components/front_matter/src/section.rs index ffbcaf2..5bcfef5 100644 --- a/components/front_matter/src/section.rs +++ b/components/front_matter/src/section.rs @@ -1,11 +1,10 @@ -use std::collections::HashMap; - -use tera::Value; +use serde_derive::{Deserialize, Serialize}; +use tera::{Map, Value}; use toml; -use errors::Result; - use super::{InsertAnchor, SortBy}; +use errors::{bail, Result}; +use utils::de::fix_toml_dates; static DEFAULT_PAGINATE_PATH: &str = "page"; @@ -63,16 +62,21 @@ pub struct SectionFrontMatter { #[serde(skip_serializing)] pub aliases: Vec, /// Any extra parameter present in the front matter - pub extra: HashMap, + pub extra: Map, } impl SectionFrontMatter { pub fn parse(toml: &str) -> Result { - let f: SectionFrontMatter = match toml::from_str(toml) { + let mut f: SectionFrontMatter = match toml::from_str(toml) { Ok(d) => d, Err(e) => bail!(e), }; + f.extra = match fix_toml_dates(f.extra) { + Value::Object(o) => o, + _ => unreachable!("Got something other than a table in section extra"), + }; + Ok(f) } @@ -102,7 +106,7 @@ impl Default for SectionFrontMatter { transparent: false, page_template: None, aliases: Vec::new(), - extra: HashMap::new(), + extra: Map::new(), } } } diff --git a/components/imageproc/Cargo.toml b/components/imageproc/Cargo.toml index df9b4b1..b454797 100644 --- a/components/imageproc/Cargo.toml +++ b/components/imageproc/Cargo.toml @@ -2,12 +2,13 @@ name = "imageproc" version = "0.1.0" authors = ["VojtÄ›ch Král "] +edition = "2018" [dependencies] lazy_static = "1" regex = "1.0" -tera = "1.0.0-beta.10" -image = "0.22" +tera = "1" +image = "0.23" rayon = "1" errors = { path = "../errors" } diff --git a/components/imageproc/src/lib.rs b/components/imageproc/src/lib.rs index 7c754b5..0b0a8b4 100644 --- a/components/imageproc/src/lib.rs +++ b/components/imageproc/src/lib.rs @@ -1,12 +1,3 @@ -#[macro_use] -extern crate lazy_static; -extern crate image; -extern crate rayon; -extern crate regex; - -extern crate errors; -extern crate utils; - use std::collections::hash_map::DefaultHasher; use std::collections::hash_map::Entry as HEntry; use std::collections::HashMap; @@ -14,9 +5,9 @@ use std::fs::{self, File}; use std::hash::{Hash, Hasher}; use std::path::{Path, PathBuf}; -use image::jpeg::JPEGEncoder; -use image::png::PNGEncoder; -use image::{FilterType, GenericImageView}; +use image::imageops::FilterType; +use image::{GenericImageView, ImageOutputFormat}; +use lazy_static::lazy_static; use rayon::prelude::*; use regex::Regex; @@ -272,7 +263,7 @@ impl ImageOp { } else { img } - }, + } Fill(w, h) => { let factor_w = img_w as f32 / w as f32; let factor_h = img_h as f32 / h as f32; @@ -304,16 +295,13 @@ impl ImageOp { }; let mut f = File::create(target_path)?; - let (img_w, img_h) = img.dimensions(); match self.format { Format::Png => { - let enc = PNGEncoder::new(&mut f); - enc.encode(&img.raw_pixels(), img_w, img_h, img.color())?; + img.write_to(&mut f, ImageOutputFormat::Png)?; } Format::Jpeg(q) => { - let mut enc = JPEGEncoder::new_with_quality(&mut f, q); - enc.encode(&img.raw_pixels(), img_w, img_h, img.color())?; + img.write_to(&mut f, ImageOutputFormat::Jpeg(q))?; } } diff --git a/components/library/Cargo.toml b/components/library/Cargo.toml index b2923bf..bfc421f 100644 --- a/components/library/Cargo.toml +++ b/components/library/Cargo.toml @@ -2,15 +2,15 @@ name = "library" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] slotmap = "0.4" rayon = "1" chrono = { version = "0.4", features = ["serde"] } -tera = "1.0.0-beta.10" +tera = "1" serde = "1" serde_derive = "1" -slug = "0.1" regex = "1" lazy_static = "1" diff --git a/components/library/src/content/file_info.rs b/components/library/src/content/file_info.rs index 0fe0686..517e1b3 100644 --- a/components/library/src/content/file_info.rs +++ b/components/library/src/content/file_info.rs @@ -1,7 +1,7 @@ use std::path::{Path, PathBuf}; use config::Config; -use errors::Result; +use errors::{bail, Result}; /// Takes a full path to a file and returns only the components after the first `content` directory /// Will not return the filename as last component @@ -56,6 +56,7 @@ impl FileInfo { let file_path = path.to_path_buf(); let mut parent = file_path.parent().expect("Get parent of page").to_path_buf(); let name = path.file_stem().unwrap().to_string_lossy().to_string(); + let canonical = parent.join(&name); let mut components = find_content_components(&file_path.strip_prefix(base_path).unwrap_or(&file_path)); let relative = if !components.is_empty() { @@ -78,7 +79,7 @@ impl FileInfo { path: file_path, // We don't care about grand parent for pages grand_parent: None, - canonical: parent.join(&name), + canonical, parent, name, components, @@ -135,7 +136,7 @@ impl FileInfo { } self.name = parts.swap_remove(0); - self.canonical = self.parent.join(&self.name); + self.canonical = self.path.parent().expect("Get parent of page path").join(&self.name); let lang = parts.swap_remove(0); Ok(lang) @@ -254,4 +255,34 @@ mod tests { assert!(res.is_ok()); assert_eq!(res.unwrap(), "fr"); } + + /// Regression test for https://github.com/getzola/zola/issues/854 + #[test] + fn correct_canonical_for_index() { + let file = FileInfo::new_page( + &Path::new("/home/vincent/code/site/content/posts/tutorials/python/index.md"), + &PathBuf::new(), + ); + assert_eq!( + file.canonical, + Path::new("/home/vincent/code/site/content/posts/tutorials/python/index") + ); + } + + /// Regression test for https://github.com/getzola/zola/issues/854 + #[test] + fn correct_canonical_after_find_language() { + let mut config = Config::default(); + config.languages.push(Language { code: String::from("fr"), rss: false, search: false }); + let mut file = FileInfo::new_page( + &Path::new("/home/vincent/code/site/content/posts/tutorials/python/index.fr.md"), + &PathBuf::new(), + ); + let res = file.find_language(&config); + assert!(res.is_ok()); + assert_eq!( + file.canonical, + Path::new("/home/vincent/code/site/content/posts/tutorials/python/index") + ); + } } diff --git a/components/library/src/content/page.rs b/components/library/src/content/page.rs index b3ca3cd..0c65335 100644 --- a/components/library/src/content/page.rs +++ b/components/library/src/content/page.rs @@ -2,23 +2,24 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; +use lazy_static::lazy_static; use regex::Regex; use slotmap::DefaultKey; -use slug::slugify; use tera::{Context as TeraContext, Tera}; +use crate::library::Library; use config::Config; use errors::{Error, Result}; use front_matter::{split_page_content, InsertAnchor, PageFrontMatter}; -use library::Library; use rendering::{render_content, Heading, RenderContext}; use utils::fs::{find_related_assets, read_file}; use utils::site::get_reading_analytics; use utils::templates::render_template; -use content::file_info::FileInfo; -use content::has_anchor; -use content::ser::SerializingPage; +use crate::content::file_info::FileInfo; +use crate::content::has_anchor; +use crate::content::ser::SerializingPage; +use utils::slugs::slugify_paths; lazy_static! { // Based on https://regex101.com/r/H2n38Z/1/tests @@ -160,21 +161,24 @@ impl Page { page.slug = { if let Some(ref slug) = page.meta.slug { - slugify(&slug.trim()) + slugify_paths(slug, config.slugify.paths) } else if page.file.name == "index" { if let Some(parent) = page.file.path.parent() { if let Some(slug) = slug_from_dated_filename { - slugify(&slug) + slugify_paths(&slug, config.slugify.paths) } else { - slugify(parent.file_name().unwrap().to_str().unwrap()) + slugify_paths( + parent.file_name().unwrap().to_str().unwrap(), + config.slugify.paths, + ) } } else { - slugify(&page.file.name) + slugify_paths(&page.file.name, config.slugify.paths) } } else if let Some(slug) = slug_from_dated_filename { - slugify(&slug) + slugify_paths(&slug, config.slugify.paths) } else { - slugify(&page.file.name) + slugify_paths(&page.file.name, config.slugify.paths) } }; @@ -290,7 +294,6 @@ impl Page { context.insert("current_path", &self.path); context.insert("page", &self.to_serialized(library)); context.insert("lang", &self.lang); - context.insert("toc", &self.toc); render_template(&tpl_name, tera, context, &config.theme).map_err(|e| { Error::chain(format!("Failed to render page '{}'", self.file.path.display()), e) @@ -376,6 +379,7 @@ mod tests { use super::Page; use config::{Config, Language}; use front_matter::InsertAnchor; + use utils::slugs::SlugifyStrategy; #[test] fn test_can_parse_a_valid_page() { @@ -444,7 +448,8 @@ Hello world"#; slug = "hello-&-world" +++ Hello world"#; - let config = Config::default(); + let mut config = Config::default(); + config.slugify.paths = SlugifyStrategy::On; let res = Page::parse(Path::new("start.md"), content, &config, &PathBuf::new()); assert!(res.is_ok()); let page = res.unwrap(); @@ -453,6 +458,23 @@ Hello world"#; assert_eq!(page.permalink, config.make_permalink("hello-world")); } + #[test] + fn can_make_url_from_utf8_slug_frontmatter() { + let content = r#" + +++ + slug = "日本" + +++ + Hello world"#; + let mut config = Config::default(); + config.slugify.paths = SlugifyStrategy::Safe; + let res = Page::parse(Path::new("start.md"), content, &config, &PathBuf::new()); + assert!(res.is_ok()); + let page = res.unwrap(); + assert_eq!(page.path, "日本/"); + assert_eq!(page.components, vec!["日本"]); + assert_eq!(page.permalink, config.make_permalink("日本")); + } + #[test] fn can_make_url_from_path() { let content = r#" @@ -509,7 +531,8 @@ Hello world"#; #[test] fn can_make_slug_from_non_slug_filename() { - let config = Config::default(); + let mut config = Config::default(); + config.slugify.paths = SlugifyStrategy::On; let res = Page::parse(Path::new(" file with space.md"), "+++\n+++", &config, &PathBuf::new()); assert!(res.is_ok()); @@ -518,6 +541,17 @@ Hello world"#; assert_eq!(page.permalink, config.make_permalink(&page.slug)); } + #[test] + fn can_make_path_from_utf8_filename() { + let mut config = Config::default(); + config.slugify.paths = SlugifyStrategy::Safe; + let res = Page::parse(Path::new("日本.md"), "+++\n++++", &config, &PathBuf::new()); + assert!(res.is_ok()); + let page = res.unwrap(); + assert_eq!(page.slug, "日本"); + assert_eq!(page.permalink, config.make_permalink(&page.slug)); + } + #[test] fn can_specify_summary() { let config = Config::default(); diff --git a/components/library/src/content/section.rs b/components/library/src/content/section.rs index b8b12ad..a3aff39 100644 --- a/components/library/src/content/section.rs +++ b/components/library/src/content/section.rs @@ -12,10 +12,10 @@ use utils::fs::{find_related_assets, read_file}; use utils::site::get_reading_analytics; use utils::templates::render_template; -use content::file_info::FileInfo; -use content::has_anchor; -use content::ser::SerializingSection; -use library::Library; +use crate::content::file_info::FileInfo; +use crate::content::has_anchor; +use crate::content::ser::SerializingSection; +use crate::library::Library; #[derive(Clone, Debug, PartialEq)] pub struct Section { @@ -121,6 +121,7 @@ impl Section { } else { section.path = format!("{}/", path); } + section.components = section .path .split('/') @@ -131,7 +132,7 @@ impl Section { Ok(section) } - /// Read and parse a .md file into a Page struct + /// Read and parse a .md file into a Section struct pub fn from_file>( path: P, config: &Config, @@ -219,7 +220,6 @@ impl Section { context.insert("current_path", &self.path); context.insert("section", &self.to_serialized(library)); context.insert("lang", &self.lang); - context.insert("toc", &self.toc); render_template(tpl_name, tera, context, &config.theme).map_err(|e| { Error::chain(format!("Failed to render section '{}'", self.file.path.display()), e) diff --git a/components/library/src/content/ser.rs b/components/library/src/content/ser.rs index f28ccc0..ca79448 100644 --- a/components/library/src/content/ser.rs +++ b/components/library/src/content/ser.rs @@ -1,16 +1,22 @@ //! What we are sending to the templates when rendering them use std::collections::HashMap; +use std::path::Path; +use serde_derive::Serialize; use tera::{Map, Value}; -use content::{Page, Section}; -use library::Library; +use crate::content::{Page, Section}; +use crate::library::Library; +use rendering::Heading; #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TranslatedContent<'a> { lang: &'a str, permalink: &'a str, title: &'a Option, + /// The path to the markdown file; useful for retrieving the full page through + /// the `get_page` function. + path: &'a Path, } impl<'a> TranslatedContent<'a> { @@ -24,6 +30,7 @@ impl<'a> TranslatedContent<'a> { lang: &other.lang, permalink: &other.permalink, title: &other.meta.title, + path: &other.file.path, }); } @@ -39,6 +46,7 @@ impl<'a> TranslatedContent<'a> { lang: &other.lang, permalink: &other.permalink, title: &other.meta.title, + path: &other.file.path, }); } @@ -64,6 +72,7 @@ pub struct SerializingPage<'a> { path: &'a str, components: &'a [String], summary: &'a Option, + toc: &'a [Heading], word_count: Option, reading_time: Option, assets: &'a [String], @@ -125,6 +134,7 @@ impl<'a> SerializingPage<'a> { path: &page.path, components: &page.components, summary: &page.summary, + toc: &page.toc, word_count: page.word_count, reading_time: page.reading_time, assets: &page.serialized_assets, @@ -180,6 +190,7 @@ impl<'a> SerializingPage<'a> { path: &page.path, components: &page.components, summary: &page.summary, + toc: &page.toc, word_count: page.word_count, reading_time: page.reading_time, assets: &page.serialized_assets, @@ -202,9 +213,10 @@ pub struct SerializingSection<'a> { ancestors: Vec, title: &'a Option, description: &'a Option, - extra: &'a HashMap, + extra: &'a Map, path: &'a str, components: &'a [String], + toc: &'a [Heading], word_count: Option, reading_time: Option, lang: &'a str, @@ -244,6 +256,7 @@ impl<'a> SerializingSection<'a> { extra: §ion.meta.extra, path: §ion.path, components: §ion.components, + toc: §ion.toc, word_count: section.word_count, reading_time: section.reading_time, assets: §ion.serialized_assets, @@ -280,6 +293,7 @@ impl<'a> SerializingSection<'a> { extra: §ion.meta.extra, path: §ion.path, components: §ion.components, + toc: §ion.toc, word_count: section.word_count, reading_time: section.reading_time, assets: §ion.serialized_assets, diff --git a/components/library/src/lib.rs b/components/library/src/lib.rs index 9f851e0..71c4b41 100644 --- a/components/library/src/lib.rs +++ b/components/library/src/lib.rs @@ -1,29 +1,3 @@ -extern crate serde; -extern crate slug; -extern crate tera; -#[macro_use] -extern crate serde_derive; -extern crate chrono; -extern crate rayon; -extern crate slotmap; -#[macro_use] -extern crate lazy_static; -extern crate regex; - -#[cfg(test)] -extern crate globset; -#[cfg(test)] -extern crate tempfile; -#[cfg(test)] -extern crate toml; - -extern crate config; -extern crate front_matter; -extern crate rendering; -extern crate utils; -#[macro_use] -extern crate errors; - mod content; mod library; mod pagination; @@ -32,8 +6,8 @@ mod taxonomies; pub use slotmap::{DenseSlotMap, Key}; +pub use crate::library::Library; pub use content::{Page, Section, SerializingPage, SerializingSection}; -pub use library::Library; pub use pagination::Paginator; pub use sorting::sort_actual_pages_by_date; pub use taxonomies::{find_taxonomies, Taxonomy, TaxonomyItem}; diff --git a/components/library/src/library.rs b/components/library/src/library.rs index e4d16e2..3aa7748 100644 --- a/components/library/src/library.rs +++ b/components/library/src/library.rs @@ -1,13 +1,26 @@ use std::collections::{HashMap, HashSet}; use std::path::{Path, PathBuf}; -use slotmap::{DenseSlotMap, DefaultKey}; +use slotmap::{DefaultKey, DenseSlotMap}; use front_matter::SortBy; +use crate::content::{Page, Section}; +use crate::sorting::{find_siblings, sort_pages_by_date, sort_pages_by_weight}; use config::Config; -use content::{Page, Section}; -use sorting::{find_siblings, sort_pages_by_date, sort_pages_by_weight}; + +// Like vec! but for HashSet +macro_rules! set { + ( $( $x:expr ),* ) => { + { + let mut s = HashSet::new(); + $( + s.insert($x); + )* + s + } + }; +} /// Houses everything about pages and sections /// Think of it as a database where each page and section has an id (Key here) @@ -398,4 +411,128 @@ impl Library { pub fn contains_page>(&self, path: P) -> bool { self.paths_to_pages.contains_key(path.as_ref()) } + + /// This will check every section/page paths + the aliases and ensure none of them + /// are colliding. + /// Returns (path colliding, [list of files causing that collision]) + pub fn check_for_path_collisions(&self) -> Vec<(&str, Vec)> { + let mut paths: HashMap<&str, HashSet> = HashMap::new(); + + for (key, page) in &self.pages { + paths + .entry(&page.path) + .and_modify(|s| { + s.insert(key); + }) + .or_insert_with(|| set!(key)); + + for alias in &page.meta.aliases { + paths + .entry(&alias) + .and_modify(|s| { + s.insert(key); + }) + .or_insert_with(|| set!(key)); + } + } + + for (key, section) in &self.sections { + if !section.meta.render { + continue; + } + paths + .entry(§ion.path) + .and_modify(|s| { + s.insert(key); + }) + .or_insert_with(|| set!(key)); + } + + let mut collisions = vec![]; + for (p, keys) in paths { + if keys.len() > 1 { + let file_paths: Vec = keys + .iter() + .map(|k| { + self.pages.get(*k).map(|p| p.file.relative.clone()).unwrap_or_else(|| { + self.sections.get(*k).map(|s| s.file.relative.clone()).unwrap() + }) + }) + .collect(); + + collisions.push((p, file_paths)); + } + } + + collisions + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn can_find_no_collisions() { + let mut library = Library::new(10, 10, false); + let mut page = Page::default(); + page.path = "hello".to_string(); + let mut page2 = Page::default(); + page2.path = "hello-world".to_string(); + let mut section = Section::default(); + section.path = "blog".to_string(); + library.insert_page(page); + library.insert_page(page2); + library.insert_section(section); + + let collisions = library.check_for_path_collisions(); + assert_eq!(collisions.len(), 0); + } + + #[test] + fn can_find_collisions_between_pages() { + let mut library = Library::new(10, 10, false); + let mut page = Page::default(); + page.path = "hello".to_string(); + page.file.relative = "hello".to_string(); + let mut page2 = Page::default(); + page2.path = "hello".to_string(); + page2.file.relative = "hello-world".to_string(); + let mut section = Section::default(); + section.path = "blog".to_string(); + section.file.relative = "hello-world".to_string(); + library.insert_page(page.clone()); + library.insert_page(page2.clone()); + library.insert_section(section); + + let collisions = library.check_for_path_collisions(); + assert_eq!(collisions.len(), 1); + assert_eq!(collisions[0].0, page.path); + assert!(collisions[0].1.contains(&page.file.relative)); + assert!(collisions[0].1.contains(&page2.file.relative)); + } + + #[test] + fn can_find_collisions_with_an_alias() { + let mut library = Library::new(10, 10, false); + let mut page = Page::default(); + page.path = "hello".to_string(); + page.file.relative = "hello".to_string(); + let mut page2 = Page::default(); + page2.path = "hello-world".to_string(); + page2.file.relative = "hello-world".to_string(); + page2.meta.aliases = vec!["hello".to_string()]; + let mut section = Section::default(); + section.path = "blog".to_string(); + section.file.relative = "hello-world".to_string(); + library.insert_page(page.clone()); + library.insert_page(page2.clone()); + library.insert_section(section); + + let collisions = library.check_for_path_collisions(); + assert_eq!(collisions.len(), 1); + assert_eq!(collisions[0].0, page.path); + assert!(collisions[0].1.contains(&page.file.relative)); + assert!(collisions[0].1.contains(&page2.file.relative)); + } } diff --git a/components/library/src/pagination/mod.rs b/components/library/src/pagination/mod.rs index 6a848f8..c186406 100644 --- a/components/library/src/pagination/mod.rs +++ b/components/library/src/pagination/mod.rs @@ -1,5 +1,6 @@ use std::collections::HashMap; +use serde_derive::Serialize; use slotmap::DefaultKey; use tera::{to_value, Context, Tera, Value}; @@ -7,9 +8,9 @@ use config::Config; use errors::{Error, Result}; use utils::templates::render_template; -use content::{Section, SerializingPage, SerializingSection}; -use library::Library; -use taxonomies::{Taxonomy, TaxonomyItem}; +use crate::content::{Section, SerializingPage, SerializingSection}; +use crate::library::Library; +use crate::taxonomies::{Taxonomy, TaxonomyItem}; #[derive(Clone, Debug, PartialEq)] enum PaginationRoot<'a> { @@ -137,7 +138,11 @@ impl<'a> Paginator<'a> { continue; } - let page_path = format!("{}/{}/", self.paginate_path, index + 1); + let page_path = if self.paginate_path.is_empty() { + format!("{}/", index + 1) + } else { + format!("{}/{}/", self.paginate_path, index + 1) + }; let permalink = format!("{}{}", self.permalink, page_path); let pager_path = if self.is_index { @@ -185,12 +190,15 @@ impl<'a> Paginator<'a> { paginator.insert("next", Value::Null); } paginator.insert("number_pagers", to_value(&self.pagers.len()).unwrap()); - paginator.insert( - "base_url", - to_value(&format!("{}{}/", self.permalink, self.paginate_path)).unwrap(), - ); + let base_url = if self.paginate_path.is_empty() { + self.permalink.to_string() + } else { + format!("{}{}/", self.permalink, self.paginate_path) + }; + paginator.insert("base_url", to_value(&base_url).unwrap()); paginator.insert("pages", to_value(¤t_pager.pages).unwrap()); paginator.insert("current_index", to_value(current_pager.index).unwrap()); + paginator.insert("total_pages", to_value(self.all_pages.len()).unwrap()); paginator } @@ -230,11 +238,11 @@ mod tests { use std::path::PathBuf; use tera::to_value; + use crate::content::{Page, Section}; + use crate::library::Library; + use crate::taxonomies::{Taxonomy, TaxonomyItem}; use config::Taxonomy as TaxonomyConfig; - use content::{Page, Section}; use front_matter::SectionFrontMatter; - use library::Library; - use taxonomies::{Taxonomy, TaxonomyItem}; use super::Paginator; @@ -323,6 +331,7 @@ mod tests { assert_eq!(context["next"], to_value::>(None).unwrap()); assert_eq!(context["previous"], to_value("https://vincent.is/posts/").unwrap()); assert_eq!(context["current_index"], to_value(2).unwrap()); + assert_eq!(context["total_pages"], to_value(4).unwrap()); } #[test] @@ -353,4 +362,26 @@ mod tests { assert_eq!(paginator.pagers[1].permalink, "https://vincent.is/tags/something/page/2/"); assert_eq!(paginator.pagers[1].path, "tags/something/page/2/"); } + + // https://github.com/getzola/zola/issues/866 + #[test] + fn works_with_empty_paginate_path() { + let (mut section, library) = create_library(false); + section.meta.paginate_path = String::new(); + let paginator = Paginator::from_section(§ion, &library); + assert_eq!(paginator.pagers.len(), 2); + + assert_eq!(paginator.pagers[0].index, 1); + assert_eq!(paginator.pagers[0].pages.len(), 2); + assert_eq!(paginator.pagers[0].permalink, "https://vincent.is/posts/"); + assert_eq!(paginator.pagers[0].path, "posts/"); + + assert_eq!(paginator.pagers[1].index, 2); + assert_eq!(paginator.pagers[1].pages.len(), 2); + assert_eq!(paginator.pagers[1].permalink, "https://vincent.is/posts/2/"); + assert_eq!(paginator.pagers[1].path, "posts/2/"); + + let context = paginator.build_paginator_context(&paginator.pagers[0]); + assert_eq!(context["base_url"], to_value("https://vincent.is/posts/").unwrap()); + } } diff --git a/components/library/src/sorting.rs b/components/library/src/sorting.rs index a666a91..b790b11 100644 --- a/components/library/src/sorting.rs +++ b/components/library/src/sorting.rs @@ -4,7 +4,7 @@ use chrono::NaiveDateTime; use rayon::prelude::*; use slotmap::DefaultKey; -use content::Page; +use crate::content::Page; /// Used by the RSS feed /// There to not have to import sorting stuff in the site crate @@ -21,7 +21,9 @@ pub fn sort_actual_pages_by_date(a: &&Page, b: &&Page) -> Ordering { /// Takes a list of (page key, date, permalink) and sort them by dates if possible /// Pages without date will be put in the unsortable bucket /// The permalink is used to break ties -pub fn sort_pages_by_date(pages: Vec<(&DefaultKey, Option, &str)>) -> (Vec, Vec) { +pub fn sort_pages_by_date( + pages: Vec<(&DefaultKey, Option, &str)>, +) -> (Vec, Vec) { let (mut can_be_sorted, cannot_be_sorted): (Vec<_>, Vec<_>) = pages.into_par_iter().partition(|page| page.1.is_some()); @@ -40,7 +42,9 @@ pub fn sort_pages_by_date(pages: Vec<(&DefaultKey, Option, &str)> /// Takes a list of (page key, weight, permalink) and sort them by weight if possible /// Pages without weight will be put in the unsortable bucket /// The permalink is used to break ties -pub fn sort_pages_by_weight(pages: Vec<(&DefaultKey, Option, &str)>) -> (Vec, Vec) { +pub fn sort_pages_by_weight( + pages: Vec<(&DefaultKey, Option, &str)>, +) -> (Vec, Vec) { let (mut can_be_sorted, cannot_be_sorted): (Vec<_>, Vec<_>) = pages.into_par_iter().partition(|page| page.1.is_some()); @@ -57,7 +61,9 @@ pub fn sort_pages_by_weight(pages: Vec<(&DefaultKey, Option, &str)>) -> ( } /// Find the lighter/heavier and earlier/later pages for all pages having a date/weight -pub fn find_siblings(sorted: &[DefaultKey]) -> Vec<(DefaultKey, Option, Option)> { +pub fn find_siblings( + sorted: &[DefaultKey], +) -> Vec<(DefaultKey, Option, Option)> { let mut res = Vec::with_capacity(sorted.len()); let length = sorted.len(); @@ -85,7 +91,7 @@ mod tests { use std::path::PathBuf; use super::{find_siblings, sort_pages_by_date, sort_pages_by_weight}; - use content::Page; + use crate::content::Page; use front_matter::PageFrontMatter; fn create_page_with_date(date: &str) -> Page { diff --git a/components/library/src/taxonomies/mod.rs b/components/library/src/taxonomies/mod.rs index 8805af4..036f4b9 100644 --- a/components/library/src/taxonomies/mod.rs +++ b/components/library/src/taxonomies/mod.rs @@ -1,16 +1,17 @@ use std::collections::HashMap; +use serde_derive::Serialize; use slotmap::DefaultKey; -use slug::slugify; use tera::{Context, Tera}; use config::{Config, Taxonomy as TaxonomyConfig}; -use errors::{Error, Result}; +use errors::{bail, Error, Result}; use utils::templates::render_template; -use content::SerializingPage; -use library::Library; -use sorting::sort_pages_by_date; +use crate::content::SerializingPage; +use crate::library::Library; +use crate::sorting::sort_pages_by_date; +use utils::slugs::slugify_paths; #[derive(Debug, Clone, PartialEq, Serialize)] pub struct SerializedTaxonomyItem<'a> { @@ -69,7 +70,7 @@ impl TaxonomyItem { }) .collect(); let (mut pages, ignored_pages) = sort_pages_by_date(data); - let slug = slugify(name); + let slug = slugify_paths(name, config.slugify.taxonomies); let permalink = if taxonomy.lang != config.default_language { config.make_permalink(&format!("/{}/{}/{}", taxonomy.lang, taxonomy.name, slug)) } else { @@ -169,7 +170,6 @@ impl Taxonomy { self.items.iter().map(|i| SerializedTaxonomyItem::from_item(i, library)).collect(); context.insert("terms", &terms); context.insert("taxonomy", &self.kind); - context.insert("lang", &self.kind.lang); context.insert("current_url", &config.make_permalink(&self.kind.name)); context.insert("current_path", &self.kind.name); @@ -232,9 +232,10 @@ mod tests { use super::*; use std::collections::HashMap; + use crate::content::Page; + use crate::library::Library; use config::{Config, Language, Taxonomy as TaxonomyConfig}; - use content::Page; - use library::Library; + use utils::slugs::SlugifyStrategy; #[test] fn can_make_taxonomies() { @@ -331,6 +332,101 @@ mod tests { assert_eq!(categories.items[1].pages.len(), 1); } + #[test] + fn can_make_slugified_taxonomies() { + let mut config = Config::default(); + let mut library = Library::new(2, 0, false); + + config.taxonomies = vec![ + TaxonomyConfig { + name: "categories".to_string(), + lang: config.default_language.clone(), + ..TaxonomyConfig::default() + }, + TaxonomyConfig { + name: "tags".to_string(), + lang: config.default_language.clone(), + ..TaxonomyConfig::default() + }, + TaxonomyConfig { + name: "authors".to_string(), + lang: config.default_language.clone(), + ..TaxonomyConfig::default() + }, + ]; + + let mut page1 = Page::default(); + let mut taxo_page1 = HashMap::new(); + taxo_page1.insert("tags".to_string(), vec!["rust".to_string(), "db".to_string()]); + taxo_page1.insert("categories".to_string(), vec!["Programming tutorials".to_string()]); + page1.meta.taxonomies = taxo_page1; + page1.lang = config.default_language.clone(); + library.insert_page(page1); + + let mut page2 = Page::default(); + let mut taxo_page2 = HashMap::new(); + taxo_page2.insert("tags".to_string(), vec!["rust".to_string(), "js".to_string()]); + taxo_page2.insert("categories".to_string(), vec!["Other".to_string()]); + page2.meta.taxonomies = taxo_page2; + page2.lang = config.default_language.clone(); + library.insert_page(page2); + + let mut page3 = Page::default(); + let mut taxo_page3 = HashMap::new(); + taxo_page3.insert("tags".to_string(), vec!["js".to_string()]); + taxo_page3.insert("authors".to_string(), vec!["Vincent Prouillet".to_string()]); + page3.meta.taxonomies = taxo_page3; + page3.lang = config.default_language.clone(); + library.insert_page(page3); + + let taxonomies = find_taxonomies(&config, &library).unwrap(); + let (tags, categories, authors) = { + let mut t = None; + let mut c = None; + let mut a = None; + for x in taxonomies { + match x.kind.name.as_ref() { + "tags" => t = Some(x), + "categories" => c = Some(x), + "authors" => a = Some(x), + _ => unreachable!(), + } + } + (t.unwrap(), c.unwrap(), a.unwrap()) + }; + assert_eq!(tags.items.len(), 3); + assert_eq!(categories.items.len(), 2); + assert_eq!(authors.items.len(), 1); + + assert_eq!(tags.items[0].name, "db"); + assert_eq!(tags.items[0].slug, "db"); + assert_eq!(tags.items[0].permalink, "http://a-website.com/tags/db/"); + assert_eq!(tags.items[0].pages.len(), 1); + + assert_eq!(tags.items[1].name, "js"); + assert_eq!(tags.items[1].slug, "js"); + assert_eq!(tags.items[1].permalink, "http://a-website.com/tags/js/"); + assert_eq!(tags.items[1].pages.len(), 2); + + assert_eq!(tags.items[2].name, "rust"); + assert_eq!(tags.items[2].slug, "rust"); + assert_eq!(tags.items[2].permalink, "http://a-website.com/tags/rust/"); + assert_eq!(tags.items[2].pages.len(), 2); + + assert_eq!(categories.items[0].name, "Other"); + assert_eq!(categories.items[0].slug, "other"); + assert_eq!(categories.items[0].permalink, "http://a-website.com/categories/other/"); + assert_eq!(categories.items[0].pages.len(), 1); + + assert_eq!(categories.items[1].name, "Programming tutorials"); + assert_eq!(categories.items[1].slug, "programming-tutorials"); + assert_eq!( + categories.items[1].permalink, + "http://a-website.com/categories/programming-tutorials/" + ); + assert_eq!(categories.items[1].pages.len(), 1); + } + #[test] fn errors_on_unknown_taxonomy() { let mut config = Config::default(); @@ -466,4 +562,151 @@ mod tests { ); assert_eq!(categories.items[1].pages.len(), 1); } + + #[test] + fn can_make_utf8_taxonomies() { + let mut config = Config::default(); + config.slugify.taxonomies = SlugifyStrategy::Safe; + config.languages.push(Language { + rss: false, + code: "fr".to_string(), + ..Language::default() + }); + let mut library = Library::new(2, 0, true); + + config.taxonomies = vec![TaxonomyConfig { + name: "catégories".to_string(), + lang: "fr".to_string(), + ..TaxonomyConfig::default() + }]; + + let mut page = Page::default(); + page.lang = "fr".to_string(); + let mut taxo_page = HashMap::new(); + taxo_page.insert("catégories".to_string(), vec!["Écologie".to_string()]); + page.meta.taxonomies = taxo_page; + library.insert_page(page); + + let taxonomies = find_taxonomies(&config, &library).unwrap(); + let categories = &taxonomies[0]; + + assert_eq!(categories.items.len(), 1); + assert_eq!(categories.items[0].name, "Écologie"); + assert_eq!(categories.items[0].permalink, "http://a-website.com/fr/catégories/Écologie/"); + assert_eq!(categories.items[0].pages.len(), 1); + } + + #[test] + fn can_make_slugified_taxonomies_in_multiple_languages() { + let mut config = Config::default(); + config.slugify.taxonomies = SlugifyStrategy::On; + config.languages.push(Language { + rss: false, + code: "fr".to_string(), + ..Language::default() + }); + let mut library = Library::new(2, 0, true); + + config.taxonomies = vec![ + TaxonomyConfig { + name: "categories".to_string(), + lang: config.default_language.clone(), + ..TaxonomyConfig::default() + }, + TaxonomyConfig { + name: "tags".to_string(), + lang: config.default_language.clone(), + ..TaxonomyConfig::default() + }, + TaxonomyConfig { + name: "auteurs".to_string(), + lang: "fr".to_string(), + ..TaxonomyConfig::default() + }, + TaxonomyConfig { + name: "tags".to_string(), + lang: "fr".to_string(), + ..TaxonomyConfig::default() + }, + ]; + + let mut page1 = Page::default(); + let mut taxo_page1 = HashMap::new(); + taxo_page1.insert("tags".to_string(), vec!["rust".to_string(), "db".to_string()]); + taxo_page1.insert("categories".to_string(), vec!["Programming tutorials".to_string()]); + page1.meta.taxonomies = taxo_page1; + page1.lang = config.default_language.clone(); + library.insert_page(page1); + + let mut page2 = Page::default(); + let mut taxo_page2 = HashMap::new(); + taxo_page2.insert("tags".to_string(), vec!["rust".to_string()]); + taxo_page2.insert("categories".to_string(), vec!["Other".to_string()]); + page2.meta.taxonomies = taxo_page2; + page2.lang = config.default_language.clone(); + library.insert_page(page2); + + let mut page3 = Page::default(); + page3.lang = "fr".to_string(); + let mut taxo_page3 = HashMap::new(); + taxo_page3.insert("tags".to_string(), vec!["rust".to_string()]); + taxo_page3.insert("auteurs".to_string(), vec!["Vincent Prouillet".to_string()]); + page3.meta.taxonomies = taxo_page3; + library.insert_page(page3); + + let taxonomies = find_taxonomies(&config, &library).unwrap(); + let (tags, categories, authors) = { + let mut t = None; + let mut c = None; + let mut a = None; + for x in taxonomies { + match x.kind.name.as_ref() { + "tags" => { + if x.kind.lang == "en" { + t = Some(x) + } + } + "categories" => c = Some(x), + "auteurs" => a = Some(x), + _ => unreachable!(), + } + } + (t.unwrap(), c.unwrap(), a.unwrap()) + }; + + assert_eq!(tags.items.len(), 2); + assert_eq!(categories.items.len(), 2); + assert_eq!(authors.items.len(), 1); + + assert_eq!(tags.items[0].name, "db"); + assert_eq!(tags.items[0].slug, "db"); + assert_eq!(tags.items[0].permalink, "http://a-website.com/tags/db/"); + assert_eq!(tags.items[0].pages.len(), 1); + + assert_eq!(tags.items[1].name, "rust"); + assert_eq!(tags.items[1].slug, "rust"); + assert_eq!(tags.items[1].permalink, "http://a-website.com/tags/rust/"); + assert_eq!(tags.items[1].pages.len(), 2); + + assert_eq!(authors.items[0].name, "Vincent Prouillet"); + assert_eq!(authors.items[0].slug, "vincent-prouillet"); + assert_eq!( + authors.items[0].permalink, + "http://a-website.com/fr/auteurs/vincent-prouillet/" + ); + assert_eq!(authors.items[0].pages.len(), 1); + + assert_eq!(categories.items[0].name, "Other"); + assert_eq!(categories.items[0].slug, "other"); + assert_eq!(categories.items[0].permalink, "http://a-website.com/categories/other/"); + assert_eq!(categories.items[0].pages.len(), 1); + + assert_eq!(categories.items[1].name, "Programming tutorials"); + assert_eq!(categories.items[1].slug, "programming-tutorials"); + assert_eq!( + categories.items[1].permalink, + "http://a-website.com/categories/programming-tutorials/" + ); + assert_eq!(categories.items[1].pages.len(), 1); + } } diff --git a/components/link_checker/Cargo.toml b/components/link_checker/Cargo.toml index d40a234..c9f398e 100644 --- a/components/link_checker/Cargo.toml +++ b/components/link_checker/Cargo.toml @@ -2,9 +2,14 @@ name = "link_checker" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] -reqwest = "0.9" +reqwest = { version = "0.10", features = ["blocking", "rustls-tls"] } lazy_static = "1" +config = { path = "../config" } errors = { path = "../errors" } + +[dev-dependencies] +mockito = "0.23" diff --git a/components/link_checker/src/lib.rs b/components/link_checker/src/lib.rs index 10297f9..6e50a95 100644 --- a/components/link_checker/src/lib.rs +++ b/components/link_checker/src/lib.rs @@ -1,16 +1,11 @@ -extern crate reqwest; -#[macro_use] -extern crate lazy_static; - -extern crate errors; - +use lazy_static::lazy_static; use reqwest::header::{HeaderMap, ACCEPT}; -use reqwest::StatusCode; +use reqwest::{blocking::Client, StatusCode}; +use config::LinkChecker; use errors::Result; use std::collections::HashMap; -use std::error::Error; use std::sync::{Arc, RwLock}; #[derive(Clone, Debug, PartialEq)] @@ -27,7 +22,7 @@ impl LinkResult { } if let Some(c) = self.code { - return c.is_success(); + return c.is_success() || c == StatusCode::NOT_MODIFIED; } true @@ -51,7 +46,7 @@ lazy_static! { static ref LINKS: Arc>> = Arc::new(RwLock::new(HashMap::new())); } -pub fn check_url(url: &str) -> LinkResult { +pub fn check_url(url: &str, config: &LinkChecker) -> LinkResult { { let guard = LINKS.read().unwrap(); if let Some(res) = guard.get(url) { @@ -63,18 +58,44 @@ pub fn check_url(url: &str) -> LinkResult { headers.insert(ACCEPT, "text/html".parse().unwrap()); headers.append(ACCEPT, "*/*".parse().unwrap()); - let client = reqwest::Client::new(); + let client = Client::new(); + + let check_anchor = !config.skip_anchor_prefixes.iter().any(|prefix| url.starts_with(prefix)); // Need to actually do the link checking let res = match client.get(url).headers(headers).send() { - Ok(ref mut response) if has_anchor(url) => { - match check_page_for_anchor(url, response.text()) { + Ok(ref mut response) if check_anchor && has_anchor(url) => { + let body = { + let mut buf: Vec = vec![]; + response.copy_to(&mut buf).unwrap(); + String::from_utf8(buf).unwrap() + }; + + match check_page_for_anchor(url, body) { Ok(_) => LinkResult { code: Some(response.status()), error: None }, Err(e) => LinkResult { code: None, error: Some(e.to_string()) }, } } - Ok(response) => LinkResult { code: Some(response.status()), error: None }, - Err(e) => LinkResult { code: None, error: Some(e.description().to_string()) }, + Ok(response) => { + if response.status().is_success() || response.status() == StatusCode::NOT_MODIFIED { + LinkResult { code: Some(response.status()), error: None } + } else { + let error_string = if response.status().is_informational() { + format!("Informational status code ({}) received", response.status()) + } else if response.status().is_redirection() { + format!("Redirection status code ({}) received", response.status()) + } else if response.status().is_client_error() { + format!("Client error status code ({}) received", response.status()) + } else if response.status().is_server_error() { + format!("Server error status code ({}) received", response.status()) + } else { + format!("Non-success status code ({}) received", response.status()) + }; + + LinkResult { code: None, error: Some(error_string) } + } + } + Err(e) => LinkResult { code: None, error: Some(e.to_string()) }, }; LINKS.write().unwrap().insert(url.to_string(), res.clone()); @@ -91,8 +112,7 @@ fn has_anchor(url: &str) -> bool { } } -fn check_page_for_anchor(url: &str, body: reqwest::Result) -> Result<()> { - let body = body.unwrap(); +fn check_page_for_anchor(url: &str, body: String) -> Result<()> { let index = url.find('#').unwrap(); let anchor = url.get(index + 1..).unwrap(); let checks: [String; 4] = [ @@ -111,21 +131,115 @@ fn check_page_for_anchor(url: &str, body: reqwest::Result) -> Result<()> #[cfg(test)] mod tests { - use super::{check_page_for_anchor, check_url, has_anchor, LINKS}; + use super::{check_page_for_anchor, check_url, has_anchor, LinkChecker, LINKS}; + use mockito::mock; + + // NOTE: HTTP mock paths below are randomly generated to avoid name + // collisions. Mocks with the same path can sometimes bleed between tests + // and cause them to randomly pass/fail. Please make sure to use unique + // paths when adding or modifying tests that use Mockito. #[test] fn can_validate_ok_links() { - let url = "https://google.com"; - let res = check_url(url); + let url = format!("{}{}", mockito::server_url(), "/ekbtwxfhjw"); + let _m = mock("GET", "/ekbtwxfhjw") + .with_header("Content-Type", "text/html") + .with_body(format!( + r#" + + + Test + + + Mock URL + + +"#, + url + )) + .create(); + + let res = check_url(&url, &LinkChecker::default()); assert!(res.is_valid()); - assert!(LINKS.read().unwrap().get(url).is_some()); - let res = check_url(url); + assert!(LINKS.read().unwrap().get(&url).is_some()); + } + + #[test] + fn can_follow_301_links() { + let _m1 = mock("GET", "/c7qrtrv3zz") + .with_status(301) + .with_header("Content-Type", "text/plain") + .with_header("Location", format!("{}/rbs5avjs8e", mockito::server_url()).as_str()) + .with_body("Redirecting...") + .create(); + + let _m2 = mock("GET", "/rbs5avjs8e") + .with_header("Content-Type", "text/plain") + .with_body("Test") + .create(); + + let url = format!("{}{}", mockito::server_url(), "/c7qrtrv3zz"); + let res = check_url(&url, &LinkChecker::default()); assert!(res.is_valid()); + assert!(res.code.is_some()); + assert!(res.error.is_none()); + } + + #[test] + fn can_fail_301_to_404_links() { + let _m1 = mock("GET", "/cav9vibhsc") + .with_status(301) + .with_header("Content-Type", "text/plain") + .with_header("Location", format!("{}/72zmfg4smd", mockito::server_url()).as_str()) + .with_body("Redirecting...") + .create(); + + let _m2 = mock("GET", "/72zmfg4smd") + .with_status(404) + .with_header("Content-Type", "text/plain") + .with_body("Not Found") + .create(); + + let url = format!("{}{}", mockito::server_url(), "/cav9vibhsc"); + let res = check_url(&url, &LinkChecker::default()); + assert_eq!(res.is_valid(), false); + assert!(res.code.is_none()); + assert!(res.error.is_some()); } #[test] fn can_fail_404_links() { - let res = check_url("https://google.comys"); + let _m = mock("GET", "/nlhab9c1vc") + .with_status(404) + .with_header("Content-Type", "text/plain") + .with_body("Not Found") + .create(); + + let url = format!("{}{}", mockito::server_url(), "/nlhab9c1vc"); + let res = check_url(&url, &LinkChecker::default()); + assert_eq!(res.is_valid(), false); + assert!(res.code.is_none()); + assert!(res.error.is_some()); + } + + #[test] + fn can_fail_500_links() { + let _m = mock("GET", "/qdbrssazes") + .with_status(500) + .with_header("Content-Type", "text/plain") + .with_body("Internal Server Error") + .create(); + + let url = format!("{}{}", mockito::server_url(), "/qdbrssazes"); + let res = check_url(&url, &LinkChecker::default()); + assert_eq!(res.is_valid(), false); + assert!(res.code.is_none()); + assert!(res.error.is_some()); + } + + #[test] + fn can_fail_unresolved_links() { + let res = check_url("https://t6l5cn9lpm.lxizfnzckd", &LinkChecker::default()); assert_eq!(res.is_valid(), false); assert!(res.code.is_none()); assert!(res.error.is_some()); @@ -134,8 +248,8 @@ mod tests { #[test] fn can_validate_anchors() { let url = "https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect"; - let body = "

collect

".to_string(); - let res = check_page_for_anchor(url, Ok(body)); + let body = r#"

collect

"#.to_string(); + let res = check_page_for_anchor(url, body); assert!(res.is_ok()); } @@ -143,7 +257,7 @@ mod tests { fn can_validate_anchors_with_other_quotes() { let url = "https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect"; let body = r#"

collect

"#.to_string(); - let res = check_page_for_anchor(url, Ok(body)); + let res = check_page_for_anchor(url, body); assert!(res.is_ok()); } @@ -151,15 +265,15 @@ mod tests { fn can_validate_anchors_with_name_attr() { let url = "https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect"; let body = r#"

collect

"#.to_string(); - let res = check_page_for_anchor(url, Ok(body)); + let res = check_page_for_anchor(url, body); assert!(res.is_ok()); } #[test] fn can_fail_when_anchor_not_found() { let url = "https://doc.rust-lang.org/std/iter/trait.Iterator.html#me"; - let body = "

collect

".to_string(); - let res = check_page_for_anchor(url, Ok(body)); + let body = r#"

collect

"#.to_string(); + let res = check_page_for_anchor(url, body); assert!(res.is_err()); } @@ -190,4 +304,53 @@ mod tests { let res = has_anchor(url); assert_eq!(res, false); } + + #[test] + fn skip_anchor_prefixes() { + let ignore_url = format!("{}{}", mockito::server_url(), "/ignore/"); + let config = LinkChecker { skip_prefixes: vec![], skip_anchor_prefixes: vec![ignore_url] }; + + let _m1 = mock("GET", "/ignore/i30hobj1cy") + .with_header("Content-Type", "text/html") + .with_body( + r#" + + + Ignore + + +

+ + +"#, + ) + .create(); + + // anchor check is ignored because the url matches the prefix + let ignore = format!("{}{}", mockito::server_url(), "/ignore/i30hobj1cy#nonexistent"); + assert!(check_url(&ignore, &config).is_valid()); + + let _m2 = mock("GET", "/guvqcqwmth") + .with_header("Content-Type", "text/html") + .with_body( + r#" + + + Test + + +

+ + +"#, + ) + .create(); + + // other anchors are checked + let existent = format!("{}{}", mockito::server_url(), "/guvqcqwmth#existent"); + assert!(check_url(&existent, &config).is_valid()); + + let nonexistent = format!("{}{}", mockito::server_url(), "/guvqcqwmth#nonexistent"); + assert_eq!(check_url(&nonexistent, &config).is_valid(), false); + } } diff --git a/components/rebuild/Cargo.toml b/components/rebuild/Cargo.toml index 358f7b5..5dca9b1 100644 --- a/components/rebuild/Cargo.toml +++ b/components/rebuild/Cargo.toml @@ -2,6 +2,7 @@ name = "rebuild" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] errors = { path = "../errors" } diff --git a/components/rebuild/src/lib.rs b/components/rebuild/src/lib.rs index 02e6367..694d4cd 100644 --- a/components/rebuild/src/lib.rs +++ b/components/rebuild/src/lib.rs @@ -1,12 +1,6 @@ -extern crate site; -#[macro_use] -extern crate errors; -extern crate front_matter; -extern crate library; - use std::path::{Component, Path}; -use errors::Result; +use errors::{bail, Result}; use front_matter::{PageFrontMatter, SectionFrontMatter}; use library::{Page, Section}; use site::Site; @@ -335,7 +329,7 @@ fn is_section(path: &str, languages_codes: &[&str]) -> bool { } } - return false; + false } /// What happens when a section or a page is created/edited @@ -423,7 +417,6 @@ pub fn after_template_change(site: &mut Site, path: &Path) -> Result<()> { if filename == "anchor-link.html" || path.components().any(|x| x == Component::Normal("shortcodes".as_ref())) { - println!("Rendering markdown"); site.render_markdown()?; } site.populate_sections(); diff --git a/components/rebuild/tests/rebuild.rs b/components/rebuild/tests/rebuild.rs index f35c0c2..3069f66 100644 --- a/components/rebuild/tests/rebuild.rs +++ b/components/rebuild/tests/rebuild.rs @@ -1,8 +1,3 @@ -extern crate fs_extra; -extern crate rebuild; -extern crate site; -extern crate tempfile; - use std::env; use std::fs::{self, File}; use std::io::prelude::*; diff --git a/components/rendering/Cargo.toml b/components/rendering/Cargo.toml index 6fe54d5..c5fd3e8 100644 --- a/components/rendering/Cargo.toml +++ b/components/rendering/Cargo.toml @@ -2,12 +2,12 @@ name = "rendering" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] -tera = { version = "1.0.0-beta.10", features = ["preserve_order"] } +tera = { version = "1", features = ["preserve_order"] } syntect = "=3.2.0" -pulldown-cmark = "0.6" -slug = "0.1" +pulldown-cmark = "0.7" serde = "1" serde_derive = "1" pest = "2" diff --git a/components/rendering/benches/all.rs b/components/rendering/benches/all.rs index 2049c5a..ea16e63 100644 --- a/components/rendering/benches/all.rs +++ b/components/rendering/benches/all.rs @@ -1,13 +1,7 @@ #![feature(test)] -extern crate tera; extern crate test; -extern crate config; -extern crate front_matter; -extern crate rendering; - use std::collections::HashMap; -use std::path::Path; use config::Config; use front_matter::InsertAnchor; @@ -92,8 +86,7 @@ fn bench_render_content_with_highlighting(b: &mut test::Bencher) { tera.add_raw_template("shortcodes/youtube.html", "{{id}}").unwrap(); let permalinks_ctx = HashMap::new(); let config = Config::default(); - let context = - RenderContext::new(&tera, &config, "", &permalinks_ctx, Path::new(""), InsertAnchor::None); + let context = RenderContext::new(&tera, &config, "", &permalinks_ctx, InsertAnchor::None); b.iter(|| render_content(CONTENT, &context).unwrap()); } @@ -104,8 +97,7 @@ fn bench_render_content_without_highlighting(b: &mut test::Bencher) { let permalinks_ctx = HashMap::new(); let mut config = Config::default(); config.highlight_code = false; - let context = - RenderContext::new(&tera, &config, "", &permalinks_ctx, Path::new(""), InsertAnchor::None); + let context = RenderContext::new(&tera, &config, "", &permalinks_ctx, InsertAnchor::None); b.iter(|| render_content(CONTENT, &context).unwrap()); } @@ -116,8 +108,7 @@ fn bench_render_content_no_shortcode(b: &mut test::Bencher) { let mut config = Config::default(); config.highlight_code = false; let permalinks_ctx = HashMap::new(); - let context = - RenderContext::new(&tera, &config, "", &permalinks_ctx, Path::new(""), InsertAnchor::None); + let context = RenderContext::new(&tera, &config, "", &permalinks_ctx, InsertAnchor::None); b.iter(|| render_content(&content2, &context).unwrap()); } @@ -128,8 +119,7 @@ fn bench_render_shortcodes_one_present(b: &mut test::Bencher) { tera.add_raw_template("shortcodes/youtube.html", "{{id}}").unwrap(); let config = Config::default(); let permalinks_ctx = HashMap::new(); - let context = - RenderContext::new(&tera, &config, "", &permalinks_ctx, Path::new(""), InsertAnchor::None); + let context = RenderContext::new(&tera, &config, "", &permalinks_ctx, InsertAnchor::None); b.iter(|| render_shortcodes(CONTENT, &context)); } diff --git a/components/rendering/src/lib.rs b/components/rendering/src/lib.rs index 542b32f..d6a6cd3 100644 --- a/components/rendering/src/lib.rs +++ b/components/rendering/src/lib.rs @@ -1,27 +1,3 @@ -extern crate pulldown_cmark; -extern crate slug; -extern crate syntect; -extern crate tera; -#[macro_use] -extern crate serde_derive; -extern crate pest; -extern crate serde; -#[macro_use] -extern crate pest_derive; -extern crate regex; -#[macro_use] -extern crate lazy_static; - -#[macro_use] -extern crate errors; -extern crate config; -extern crate front_matter; -extern crate link_checker; -extern crate utils; - -#[cfg(test)] -extern crate templates; - mod context; mod markdown; mod shortcode; diff --git a/components/rendering/src/markdown.rs b/components/rendering/src/markdown.rs index 437f558..3658420 100644 --- a/components/rendering/src/markdown.rs +++ b/components/rendering/src/markdown.rs @@ -1,22 +1,24 @@ +use lazy_static::lazy_static; use pulldown_cmark as cmark; -use slug::slugify; +use regex::Regex; use syntect::easy::HighlightLines; use syntect::html::{ start_highlighted_html_snippet, styled_line_to_highlighted_html, IncludeBackground, }; +use crate::context::RenderContext; +use crate::table_of_contents::{make_table_of_contents, Heading}; use config::highlighting::{get_highlighter, SYNTAX_SET, THEME_SET}; -use context::RenderContext; use errors::{Error, Result}; use front_matter::InsertAnchor; -use table_of_contents::{make_table_of_contents, Heading}; use utils::site::resolve_internal_link; +use utils::slugs::slugify_anchors; use utils::vec::InsertMany; use self::cmark::{Event, LinkType, Options, Parser, Tag}; +use pulldown_cmark::CodeBlockKind; -const CONTINUE_READING: &str = - "

\n"; +const CONTINUE_READING: &str = ""; const ANCHOR_LINK_TEMPLATE: &str = "anchor-link.html"; #[derive(Debug)] @@ -60,11 +62,31 @@ fn find_anchor(anchors: &[String], name: String, level: u8) -> String { find_anchor(anchors, name, level + 1) } +// Returns whether the given string starts with a schema. +// +// Although there exists [a list of registered URI schemes][uri-schemes], a link may use arbitrary, +// private schemes. This function checks if the given string starts with something that just looks +// like a scheme, i.e., a case-insensitive identifier followed by a colon. +// +// [uri-schemes]: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml +fn starts_with_schema(s: &str) -> bool { + lazy_static! { + static ref PATTERN: Regex = Regex::new(r"^[0-9A-Za-z\-]+:").unwrap(); + } + + PATTERN.is_match(s) +} + // Colocated asset links refers to the files in the same directory, // there it should be a filename only fn is_colocated_asset_link(link: &str) -> bool { !link.contains('/') // http://, ftp://, ../ etc - && !link.starts_with("mailto:") + && !starts_with_schema(link) +} + +// Returns whether a link starts with an HTTP(s) scheme. +fn is_external_link(link: &str) -> bool { + link.starts_with("http:") || link.starts_with("https:") } fn fix_link( @@ -103,7 +125,7 @@ fn fix_link( } else if is_colocated_asset_link(&link) { format!("{}{}", context.current_page_permalink, link) } else { - if !link.starts_with('#') && !link.starts_with("mailto:") { + if is_external_link(link) { external_links.push(link.to_owned()); } link.to_string() @@ -162,6 +184,7 @@ pub fn markdown_to_html(content: &str, context: &RenderContext) -> Result Result { + Event::Start(Tag::CodeBlock(ref kind)) => { if !context.config.highlight_code { return Event::Html("
".into());
                         }
 
                         let theme = &THEME_SET.themes[&context.config.highlight_theme];
-                        highlighter = Some(get_highlighter(info, &context.config));
+                        match kind {
+                            CodeBlockKind::Indented => (),
+                            CodeBlockKind::Fenced(info) => {
+                                highlighter = Some(get_highlighter(info, &context.config));
+                            }
+                        };
                         // This selects the background color the same way that start_coloured_html_snippet does
                         let color = theme
                             .settings
@@ -221,6 +249,10 @@ pub fn markdown_to_html(content: &str, context: &RenderContext) -> Result {
+                        error = Some(Error::msg("There is a link that is missing a URL"));
+                        Event::Start(Tag::Link(link_type, "#".into(), title))
+                    }
                     Event::Start(Tag::Link(link_type, link, title)) => {
                         let fixed_link = match fix_link(
                             link_type,
@@ -275,8 +307,13 @@ pub fn markdown_to_html(content: &str, context: &RenderContext) -> Result Result ResultHello\n

Hello

\n"); } +#[test] +fn can_add_non_slug_id_to_headings() { + let tera_ctx = Tera::default(); + let permalinks_ctx = HashMap::new(); + let mut config = Config::default(); + config.slugify.anchors = SlugifyStrategy::Safe; + let context = RenderContext::new(&tera_ctx, &config, "", &permalinks_ctx, InsertAnchor::None); + let res = render_content(r#"# L'écologie et vous"#, &context).unwrap(); + assert_eq!(res.body, "

L'écologie et vous

\n"); +} + #[test] fn can_handle_manual_ids_on_headings() { let tera_ctx = Tera::default(); @@ -619,11 +625,14 @@ fn can_understand_footnote_in_heading() { let config = Config::default(); let context = RenderContext::new(&ZOLA_TERA, &config, "", &permalinks_ctx, InsertAnchor::None); let res = render_content("# text [^1] there\n[^1]: footnote", &context).unwrap(); - assert_eq!(res.body, r##"

text 1 there

+ assert_eq!( + res.body, + r##"

text 1 there

1

footnote

-"##); +"## + ); } #[test] @@ -751,7 +760,7 @@ Bla bla .unwrap(); assert_eq!( res.body, - "

Hello My site

\n

\n

Bla bla

\n" + "

Hello My site

\n\n

Bla bla

\n" ); assert_eq!( res.summary_len, @@ -821,12 +830,58 @@ fn doesnt_try_to_highlight_content_from_shortcode() { //} // https://github.com/getzola/zola/issues/747 +// https://github.com/getzola/zola/issues/816 #[test] fn leaves_custom_url_scheme_untouched() { + let content = r#"[foo@bar.tld](xmpp:foo@bar.tld) + +[(123) 456-7890](tel:+11234567890) + +[blank page](about:blank) +"#; + let tera_ctx = Tera::default(); + let config = Config::default(); let permalinks_ctx = HashMap::new(); + + let context = RenderContext::new( + &tera_ctx, + &config, + "https://vincent.is/", + &permalinks_ctx, + InsertAnchor::None, + ); + + let res = render_content(content, &context).unwrap(); + + let expected = r#"

foo@bar.tld

+

(123) 456-7890

+

blank page

+"#; + + assert_eq!(res.body, expected); +} + +#[test] +fn stops_with_an_error_on_an_empty_link() { + let content = r#"[some link]()"#; + + let tera_ctx = Tera::default(); let config = Config::default(); - let context = RenderContext::new(&tera_ctx, &config, "", &permalinks_ctx, InsertAnchor::None); - let res = render_content("[foo@bar.tld](xmpp:foo@bar.tld)", &context).unwrap(); - assert_eq!(res.body, "

foo@bar.tld

\n"); + let permalinks_ctx = HashMap::new(); + + let context = RenderContext::new( + &tera_ctx, + &config, + "https://vincent.is/", + &permalinks_ctx, + InsertAnchor::None, + ); + + let res = render_content(content, &context); + + let expected = "There is a link that is missing a URL"; + + assert!(res.is_err()); + assert_eq!(res.unwrap_err().to_string(), expected); } diff --git a/components/search/Cargo.toml b/components/search/Cargo.toml index db2d9cf..1b08648 100644 --- a/components/search/Cargo.toml +++ b/components/search/Cargo.toml @@ -2,6 +2,7 @@ name = "search" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] elasticlunr-rs = "2" diff --git a/components/search/src/lib.rs b/components/search/src/lib.rs index 86b8655..76eee5d 100644 --- a/components/search/src/lib.rs +++ b/components/search/src/lib.rs @@ -1,17 +1,9 @@ -extern crate elasticlunr; -#[macro_use] -extern crate lazy_static; -extern crate ammonia; - -#[macro_use] -extern crate errors; -extern crate library; - use std::collections::{HashMap, HashSet}; use elasticlunr::{Index, Language}; +use lazy_static::lazy_static; -use errors::Result; +use errors::{bail, Result}; use library::{Library, Section}; pub const ELASTICLUNR_JS: &str = include_str!("elasticlunr.min.js"); diff --git a/components/site/Cargo.toml b/components/site/Cargo.toml index 54d9494..3174e87 100644 --- a/components/site/Cargo.toml +++ b/components/site/Cargo.toml @@ -2,9 +2,10 @@ name = "site" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] -tera = "1.0.0-beta.10" +tera = "1" glob = "0.3" rayon = "1" serde = "1" diff --git a/components/site/benches/load.rs b/components/site/benches/load.rs index 0091cf1..3cee15f 100644 --- a/components/site/benches/load.rs +++ b/components/site/benches/load.rs @@ -1,7 +1,5 @@ //! Benchmarking loading/markdown rendering of generated sites of various sizes - #![feature(test)] -extern crate site; extern crate test; use std::env; diff --git a/components/site/benches/site.rs b/components/site/benches/site.rs index c65badb..3436f88 100644 --- a/components/site/benches/site.rs +++ b/components/site/benches/site.rs @@ -1,7 +1,4 @@ #![feature(test)] -extern crate library; -extern crate site; -extern crate tempfile; extern crate test; use std::env; diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 8b1e78f..eaba38e 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -1,26 +1,4 @@ -extern crate glob; -extern crate rayon; -extern crate serde; -extern crate tera; -#[macro_use] -extern crate serde_derive; -extern crate sass_rs; - -#[macro_use] -extern crate errors; -extern crate config; -extern crate front_matter; -extern crate imageproc; -extern crate library; -extern crate link_checker; -extern crate search; -extern crate templates; -extern crate utils; - -#[cfg(test)] -extern crate tempfile; - -mod sitemap; +pub mod sitemap; use std::collections::HashMap; use std::fs::{copy, create_dir_all, remove_dir_all}; @@ -33,7 +11,7 @@ use sass_rs::{compile_file, Options as SassOptions, OutputStyle}; use tera::{Context, Tera}; use config::{get_config, Config}; -use errors::{Error, ErrorKind, Result}; +use errors::{bail, Error, ErrorKind, Result}; use front_matter::InsertAnchor; use library::{ find_taxonomies, sort_actual_pages_by_date, Library, Page, Paginator, Section, Taxonomy, @@ -69,7 +47,7 @@ pub struct Site { impl Site { /// Parse a site at the given path. Defaults to the current dir - /// Passing in a path is only used in tests + /// Passing in a path is used in tests and when --root argument is passed pub fn new>(path: P, config_file: &str) -> Result { let path = path.as_ref(); let mut config = get_config(path, config_file); @@ -98,17 +76,19 @@ impl Site { ); let mut tera_theme = Tera::parse(&theme_tpl_glob) .map_err(|e| Error::chain("Error parsing templates from themes", e))?; - rewrite_theme_paths(&mut tera_theme, &theme); + rewrite_theme_paths( + &mut tera_theme, + tera.templates.values().map(|v| v.name.as_ref()).collect(), + &theme, + ); // TODO: we do that twice, make it dry? if theme_path.join("templates").join("robots.txt").exists() { tera_theme .add_template_file(theme_path.join("templates").join("robots.txt"), None)?; } - tera_theme.build_inheritance_chains()?; tera.extend(&tera_theme)?; } tera.extend(&ZOLA_TERA)?; - // the `extend` above already does it but hey tera.build_inheritance_chains()?; // TODO: Tera doesn't use globset right now so we can load the robots.txt as part @@ -253,6 +233,14 @@ impl Site { self.add_page(p, false)?; } + { + let library = self.library.read().unwrap(); + let collisions = library.check_for_path_collisions(); + if !collisions.is_empty() { + return Err(Error::from_collisions(collisions)); + } + } + // taxonomy Tera fns are loaded in `register_early_global_fns` // so we do need to populate it first. self.populate_taxonomies()?; @@ -399,7 +387,16 @@ impl Site { all_links .par_iter() .filter_map(|(page_path, link)| { - let res = check_url(&link); + if self + .config + .link_checker + .skip_prefixes + .iter() + .any(|prefix| link.starts_with(prefix)) + { + return None; + } + let res = check_url(&link, &self.config.link_checker); if res.is_valid() { None } else { @@ -456,6 +453,7 @@ impl Site { index_path.file_name().unwrap().to_string_lossy().to_string(); if let Some(ref l) = lang { index_section.file.name = format!("_index.{}", l); + index_section.path = format!("{}/", l); index_section.permalink = self.config.make_permalink(l); let filename = format!("_index.{}.md", l); index_section.file.path = self.content_path.join(&filename); @@ -633,7 +631,7 @@ impl Site { return html.replace( "", &format!( - r#""#, + r#""#, port ), ); diff --git a/components/site/src/sitemap.rs b/components/site/src/sitemap.rs index 72152f7..51bf43c 100644 --- a/components/site/src/sitemap.rs +++ b/components/site/src/sitemap.rs @@ -2,6 +2,8 @@ use std::borrow::Cow; use std::collections::HashSet; use std::hash::{Hash, Hasher}; +use serde_derive::Serialize; + use config::Config; use library::{Library, Taxonomy}; use std::cmp::Ordering; @@ -11,9 +13,9 @@ use tera::{Map, Value}; /// for examples so we trim down all entries to only that #[derive(Debug, Serialize)] pub struct SitemapEntry<'a> { - permalink: Cow<'a, str>, - date: Option, - extra: Option<&'a Map>, + pub permalink: Cow<'a, str>, + pub date: Option, + pub extra: Option<&'a Map>, } // Hash/Eq is not implemented for tera::Map but in our case we only care about the permalink @@ -77,7 +79,11 @@ pub fn find_entries<'a>( .sections_values() .iter() .filter(|s| s.meta.render) - .map(|s| SitemapEntry::new(Cow::Borrowed(&s.permalink), None)) + .map(|s| { + let mut entry = SitemapEntry::new(Cow::Borrowed(&s.permalink), None); + entry.add_extra(&s.meta.extra); + entry + }) .collect::>(); for section in library.sections_values().iter().filter(|s| s.meta.paginate_by.is_some()) { diff --git a/components/site/tests/common.rs b/components/site/tests/common.rs index 77d5de8..a5908da 100644 --- a/components/site/tests/common.rs +++ b/components/site/tests/common.rs @@ -1,11 +1,9 @@ -extern crate site; -extern crate tempfile; - +#![allow(dead_code)] use std::env; use std::path::PathBuf; -use self::site::Site; -use self::tempfile::{tempdir, TempDir}; +use site::Site; +use tempfile::{tempdir, TempDir}; // 2 helper macros to make all the build testing more bearable #[macro_export] diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index 7fac192..2c02a68 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -1,5 +1,3 @@ -extern crate config; -extern crate site; mod common; use std::collections::HashMap; @@ -8,6 +6,7 @@ use std::path::Path; use common::{build_site, build_site_with_setup}; use config::Taxonomy; +use site::sitemap; use site::Site; #[test] @@ -87,6 +86,19 @@ fn can_parse_site() { .unwrap(); assert_eq!(prog_section.subsections.len(), 0); assert_eq!(prog_section.pages.len(), 2); + + // Testing extra variables in sections & sitemaps + // Regression test for #https://github.com/getzola/zola/issues/842 + assert_eq!( + prog_section.meta.extra.get("we_have_extra").and_then(|s| s.as_str()), + Some("variables") + ); + let sitemap_entries = sitemap::find_entries(&library, &site.taxonomies[..], &site.config); + let sitemap_entry = sitemap_entries + .iter() + .find(|e| e.permalink.ends_with("tutorials/programming/")) + .expect("expected to find programming section in sitemap"); + assert_eq!(Some(&prog_section.meta.extra), sitemap_entry.extra); } #[test] @@ -161,7 +173,10 @@ fn can_build_site_without_live_reload() { assert!(file_exists!(public, "nested_sass/scss.css")); // no live reload code - assert_eq!(file_contains!(public, "index.html", "/livereload.js?port=1112&mindelay=10"), false); + assert_eq!( + file_contains!(public, "index.html", "/livereload.js?port=1112&mindelay=10"), + false + ); // Both pages and sections are in the sitemap assert!(file_contains!( @@ -224,11 +239,11 @@ fn can_build_site_with_live_reload_and_drafts() { // no live reload code assert!(file_contains!(public, "index.html", "/livereload.js")); - // the summary anchor link has been created + // the summary target has been created assert!(file_contains!( public, "posts/python/index.html", - r#""# + r#""# )); // Drafts are included @@ -470,6 +485,12 @@ fn can_build_site_with_pagination_for_index() { "page/1/index.html", "http-equiv=\"refresh\" content=\"0;url=https://replace-this-with-your-url.com/\"" )); + assert!(file_contains!(public, "page/1/index.html", "Redirect")); + assert!(file_contains!( + public, + "page/1/index.html", + "Click here" + )); assert!(file_contains!(public, "index.html", "Num pages: 1")); assert!(file_contains!(public, "index.html", "Current index: 1")); assert!(file_contains!(public, "index.html", "First: https://replace-this-with-your-url.com/")); @@ -662,3 +683,17 @@ fn can_ignore_markdown_content() { let (_, _tmp_dir, public) = build_site("test_site"); assert!(!file_exists!(public, "posts/ignored/index.html")); } + +#[test] +fn check_site() { + let (mut site, _tmp_dir, _public) = build_site("test_site"); + + assert_eq!( + site.config.link_checker.skip_anchor_prefixes, + vec!["https://github.com/rust-lang/rust/blob/"] + ); + assert_eq!(site.config.link_checker.skip_prefixes, vec!["http://[2001:db8::]/"]); + + site.config.enable_check_mode(); + site.load().expect("link check test_site"); +} diff --git a/components/site/tests/site_i18n.rs b/components/site/tests/site_i18n.rs index a1391f9..7a5fc98 100644 --- a/components/site/tests/site_i18n.rs +++ b/components/site/tests/site_i18n.rs @@ -1,4 +1,3 @@ -extern crate site; mod common; use std::env; diff --git a/components/templates/Cargo.toml b/components/templates/Cargo.toml index 7e8a4c9..a5fdfea 100644 --- a/components/templates/Cargo.toml +++ b/components/templates/Cargo.toml @@ -2,17 +2,18 @@ name = "templates" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] -tera = "1.0.0-beta.10" -base64 = "0.10" +tera = "1" +base64 = "0.11" lazy_static = "1" -pulldown-cmark = "0.6" +pulldown-cmark = "0.7" toml = "0.5" csv = "1" -image = "0.22" +image = "0.23" serde_json = "1.0" -reqwest = "0.9" +reqwest = { version = "0.10", features = ["blocking"] } url = "2" errors = { path = "../errors" } @@ -20,3 +21,6 @@ utils = { path = "../utils" } library = { path = "../library" } config = { path = "../config" } imageproc = { path = "../imageproc" } + +[dev-dependencies] +mockito = "0.23" diff --git a/components/templates/src/builtins/internal/alias.html b/components/templates/src/builtins/internal/alias.html index 36fb8d9..1759ae7 100644 --- a/components/templates/src/builtins/internal/alias.html +++ b/components/templates/src/builtins/internal/alias.html @@ -1,8 +1,12 @@ + Redirect + +

Click here to be redirected.

+ diff --git a/components/templates/src/filters.rs b/components/templates/src/filters.rs index 53b9789..bc40839 100644 --- a/components/templates/src/filters.rs +++ b/components/templates/src/filters.rs @@ -3,7 +3,7 @@ use std::hash::BuildHasher; use base64::{decode, encode}; use pulldown_cmark as cmark; -use tera::{to_value, Result as TeraResult, Value}; +use tera::{to_value, try_get_value, Result as TeraResult, Value}; pub fn markdown( value: &Value, diff --git a/components/templates/src/global_fns/load_data.rs b/components/templates/src/global_fns/load_data.rs index c45c949..586a502 100644 --- a/components/templates/src/global_fns/load_data.rs +++ b/components/templates/src/global_fns/load_data.rs @@ -1,10 +1,7 @@ -extern crate serde_json; -extern crate toml; - use utils::de::fix_toml_dates; use utils::fs::{get_file_time, is_path_in_directory, read_file}; -use reqwest::{header, Client}; +use reqwest::{blocking::Client, header}; use std::collections::hash_map::DefaultHasher; use std::fmt; use std::hash::{Hash, Hasher}; @@ -202,7 +199,7 @@ impl TeraFn for LoadData { let data = match data_source { DataSource::Path(path) => read_data_file(&self.base_path, path), DataSource::Url(url) => { - let mut response = response_client + let response = response_client .get(url.as_str()) .header(header::ACCEPT, file_format.as_accept_header()) .send() @@ -324,8 +321,15 @@ mod tests { use std::collections::HashMap; use std::path::PathBuf; + use mockito::mock; + use serde_json::json; use tera::{to_value, Function}; + // NOTE: HTTP mock paths below are randomly generated to avoid name + // collisions. Mocks with the same path can sometimes bleed between tests + // and cause them to randomly pass/fail. Please make sure to use unique + // paths when adding or modifying tests that use Mockito. + fn get_test_file(filename: &str) -> PathBuf { let test_files = PathBuf::from("../utils/test-files").canonicalize().unwrap(); return test_files.join(filename); @@ -367,10 +371,14 @@ mod tests { #[test] fn calculates_cache_key_for_url() { - let cache_key = - DataSource::Url("https://api.github.com/repos/getzola/zola".parse().unwrap()) - .get_cache_key(&OutputFormat::Plain); - assert_eq!(cache_key, 8916756616423791754); + let _m = mock("GET", "/kr1zdgbm4y") + .with_header("content-type", "text/plain") + .with_body("Test") + .create(); + + let url = format!("{}{}", mockito::server_url(), "/kr1zdgbm4y"); + let cache_key = DataSource::Url(url.parse().unwrap()).get_cache_key(&OutputFormat::Plain); + assert_eq!(cache_key, 425638486551656875); } #[test] @@ -393,28 +401,45 @@ mod tests { #[test] fn can_load_remote_data() { + let _m = mock("GET", "/zpydpkjj67") + .with_header("content-type", "application/json") + .with_body( + r#"{ + "test": { + "foo": "bar" + } +} +"#, + ) + .create(); + + let url = format!("{}{}", mockito::server_url(), "/zpydpkjj67"); let static_fn = LoadData::new(PathBuf::new()); let mut args = HashMap::new(); - args.insert("url".to_string(), to_value("https://httpbin.org/json").unwrap()); + args.insert("url".to_string(), to_value(&url).unwrap()); args.insert("format".to_string(), to_value("json").unwrap()); let result = static_fn.call(&args).unwrap(); - assert_eq!( - result.get("slideshow").unwrap().get("title").unwrap(), - &to_value("Sample Slide Show").unwrap() - ); + assert_eq!(result.get("test").unwrap().get("foo").unwrap(), &to_value("bar").unwrap()); } #[test] fn fails_when_request_404s() { + let _m = mock("GET", "/aazeow0kog") + .with_status(404) + .with_header("content-type", "text/plain") + .with_body("Not Found") + .create(); + + let url = format!("{}{}", mockito::server_url(), "/aazeow0kog"); let static_fn = LoadData::new(PathBuf::new()); let mut args = HashMap::new(); - args.insert("url".to_string(), to_value("https://httpbin.org/status/404/").unwrap()); + args.insert("url".to_string(), to_value(&url).unwrap()); args.insert("format".to_string(), to_value("json").unwrap()); let result = static_fn.call(&args); assert!(result.is_err()); assert_eq!( result.unwrap_err().to_string(), - "Failed to request https://httpbin.org/status/404/: 404 Not Found" + format!("Failed to request {}: 404 Not Found", url) ); } diff --git a/components/templates/src/global_fns/mod.rs b/components/templates/src/global_fns/mod.rs index 8ae7d07..dd3b053 100644 --- a/components/templates/src/global_fns/mod.rs +++ b/components/templates/src/global_fns/mod.rs @@ -34,9 +34,10 @@ impl TeraFn for Trans { let lang = optional_arg!(String, args.get("lang"), "`trans`: `lang` must be a string.") .unwrap_or_else(|| self.config.default_language.clone()); - let term = self.config.get_translation(lang, key).map_err(|e| { - Error::chain("Failed to retreive term translation", e) - })?; + let term = self + .config + .get_translation(lang, key) + .map_err(|e| Error::chain("Failed to retreive term translation", e))?; Ok(to_value(term).unwrap()) } @@ -162,11 +163,11 @@ impl TeraFn for GetImageMeta { let path = required_arg!( String, args.get("path"), - "`get_image_meta` requires a `path` argument with a string value" + "`get_image_metadata` requires a `path` argument with a string value" ); let src_path = self.content_path.join(&path); if !src_path.exists() { - return Err(format!("`get_image_meta`: Cannot find path: {}", path).into()); + return Err(format!("`get_image_metadata`: Cannot find path: {}", path).into()); } let img = image::open(&src_path) .map_err(|e| Error::chain(format!("Failed to process image: {}", path), e))?; @@ -345,6 +346,7 @@ mod tests { use config::{Config, Taxonomy as TaxonomyConfig}; use library::{Library, Taxonomy, TaxonomyItem}; + use utils::slugs::SlugifyStrategy; #[test] fn can_add_cachebust_to_url() { @@ -388,7 +390,8 @@ mod tests { #[test] fn can_get_taxonomy() { - let config = Config::default(); + let mut config = Config::default(); + config.slugify.taxonomies = SlugifyStrategy::On; let taxo_config = TaxonomyConfig { name: "tags".to_string(), lang: config.default_language.clone(), @@ -465,7 +468,8 @@ mod tests { #[test] fn can_get_taxonomy_url() { - let config = Config::default(); + let mut config = Config::default(); + config.slugify.taxonomies = SlugifyStrategy::On; let taxo_config = TaxonomyConfig { name: "tags".to_string(), lang: config.default_language.clone(), @@ -509,7 +513,6 @@ mod tests { assert!(static_fn.call(&args).is_err()); } - const TRANS_CONFIG: &str = r#" base_url = "https://remplace-par-ton-url.fr" default_language = "fr" diff --git a/components/templates/src/lib.rs b/components/templates/src/lib.rs index 7eede2f..9c04651 100644 --- a/components/templates/src/lib.rs +++ b/components/templates/src/lib.rs @@ -1,28 +1,7 @@ -#[macro_use] -extern crate lazy_static; -#[macro_use] -extern crate tera; -extern crate base64; -extern crate csv; -extern crate image; -extern crate pulldown_cmark; -extern crate reqwest; -extern crate url; -#[cfg(test)] -#[macro_use] -extern crate serde_json; -#[cfg(not(test))] -extern crate serde_json; - -extern crate config; -extern crate errors; -extern crate imageproc; -extern crate library; -extern crate utils; - pub mod filters; pub mod global_fns; +use lazy_static::lazy_static; use tera::{Context, Tera}; use errors::{Error, Result}; @@ -69,6 +48,6 @@ pub fn render_redirect_template(url: &str, tera: &Tera) -> Result { let mut context = Context::new(); context.insert("url", &url); - tera.render("internal/alias.html", context) + tera.render("internal/alias.html", &context) .map_err(|e| Error::chain(format!("Failed to render alias for '{}'", url), e)) } diff --git a/components/utils/Cargo.toml b/components/utils/Cargo.toml index 8242533..e1f8894 100644 --- a/components/utils/Cargo.toml +++ b/components/utils/Cargo.toml @@ -2,14 +2,19 @@ name = "utils" version = "0.1.0" authors = ["Vincent Prouillet "] +edition = "2018" [dependencies] -errors = { path = "../errors" } -tera = "1.0.0-beta.10" +tera = "1" unicode-segmentation = "1.2" walkdir = "2" toml = "0.5" serde = "1" +serde_derive = "1" +slug = "0.1" +percent-encoding = "2" + +errors = { path = "../errors" } [dev-dependencies] tempfile = "3" diff --git a/components/utils/src/lib.rs b/components/utils/src/lib.rs index 8e462cc..44ebf4e 100644 --- a/components/utils/src/lib.rs +++ b/components/utils/src/lib.rs @@ -1,17 +1,7 @@ -#[macro_use] -extern crate errors; - -extern crate serde; -#[cfg(test)] -extern crate tempfile; -extern crate tera; -extern crate toml; -extern crate unicode_segmentation; -extern crate walkdir; - pub mod de; pub mod fs; pub mod net; pub mod site; +pub mod slugs; pub mod templates; pub mod vec; diff --git a/components/utils/src/net.rs b/components/utils/src/net.rs index bb09d66..314ec8e 100644 --- a/components/utils/src/net.rs +++ b/components/utils/src/net.rs @@ -1,7 +1,9 @@ use std::net::TcpListener; pub fn get_available_port(avoid: u16) -> Option { - (1000..9000).find(|port| *port != avoid && port_is_available(*port)) + // Start after "well-known" ports (0–1023) as they require superuser + // privileges on UNIX-like operating systems. + (1024..9000).find(|port| *port != avoid && port_is_available(*port)) } pub fn port_is_available(port: u16) -> bool { diff --git a/components/utils/src/site.rs b/components/utils/src/site.rs index c846f7a..26e0f8a 100644 --- a/components/utils/src/site.rs +++ b/components/utils/src/site.rs @@ -1,8 +1,9 @@ +use percent_encoding::percent_decode; use std::collections::HashMap; use std::hash::BuildHasher; use unicode_segmentation::UnicodeSegmentation; -use errors::Result; +use errors::{bail, Result}; /// Get word count and estimated reading time pub fn get_reading_analytics(content: &str) -> (usize, usize) { @@ -33,12 +34,15 @@ pub fn resolve_internal_link( // Then we remove any potential anchor // parts[0] will be the file path and parts[1] the anchor if present let parts = clean_link.split('#').collect::>(); - match permalinks.get(parts[0]) { + // If we have slugification turned off, we might end up with some escaped characters so we need + // to decode them first + let decoded = &*percent_decode(parts[0].as_bytes()).decode_utf8_lossy(); + match permalinks.get(decoded) { Some(p) => { if parts.len() > 1 { Ok(ResolvedInternalLink { permalink: format!("{}#{}", p, parts[1]), - md_path: Some(parts[0].to_string()), + md_path: Some(decoded.to_string()), anchor: Some(parts[1].to_string()), }) } else { @@ -81,6 +85,19 @@ mod tests { assert_eq!(res.anchor, Some("hello".to_string())); } + #[test] + fn can_resolve_escaped_internal_links() { + let mut permalinks = HashMap::new(); + permalinks.insert( + "pages/about space.md".to_string(), + "https://vincent.is/about%20space/".to_string(), + ); + let res = resolve_internal_link("@/pages/about%20space.md#hello", &permalinks).unwrap(); + assert_eq!(res.permalink, "https://vincent.is/about%20space/#hello"); + assert_eq!(res.md_path, Some("pages/about space.md".to_string())); + assert_eq!(res.anchor, Some("hello".to_string())); + } + #[test] fn errors_resolve_inexistant_internal_link() { let res = resolve_internal_link("@/pages/about.md#hello", &HashMap::new()); diff --git a/components/utils/src/slugs.rs b/components/utils/src/slugs.rs new file mode 100644 index 0000000..476eec5 --- /dev/null +++ b/components/utils/src/slugs.rs @@ -0,0 +1,89 @@ +use serde_derive::{Deserialize, Serialize}; + +#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum SlugifyStrategy { + /// Classic slugification, the default + On, + /// No slugification, only remove unsafe characters for filepaths/urls + Safe, + /// Nothing is changed, hope for the best! + Off, +} + +fn strip_chars(s: &str, chars: &str) -> String { + let mut sanitized_string = s.to_string(); + sanitized_string.retain(|c| !chars.contains(c)); + sanitized_string +} + +fn strip_invalid_paths_chars(s: &str) -> String { + // NTFS forbidden characters : https://gist.github.com/doctaphred/d01d05291546186941e1b7ddc02034d3 + // Also we need to trim whitespaces and `.` from the end of filename + let trimmed = s.trim_end_matches(|c| c == ' ' || c == '.'); + strip_chars(&trimmed, r#"<>:"/\|?*"#) +} + +pub fn slugify_paths(s: &str, strategy: SlugifyStrategy) -> String { + match strategy { + SlugifyStrategy::On => slug::slugify(s), + SlugifyStrategy::Safe => strip_invalid_paths_chars(s), + SlugifyStrategy::Off => s.to_string(), + } +} + +pub fn slugify_anchors(s: &str, strategy: SlugifyStrategy) -> String { + match strategy { + SlugifyStrategy::On => slug::slugify(s), + SlugifyStrategy::Safe | SlugifyStrategy::Off => { + s.replace(|c: char| c.is_ascii_whitespace(), "_") + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn can_slugify_paths() { + let tests = vec![ + // input, (on, safe, off) + ("input", ("input", "input", "input")), + ("test ", ("test", "test", "test ")), + ("tes t", ("tes-t", "tes t", "tes t")), + // Invalid NTFS + ("dot. ", ("dot", "dot", "dot. ")), + ("日本", ("ri-ben", "日本", "日本")), + ("héhé", ("hehe", "héhé", "héhé")), + ("test (hey)", ("test-hey", "test (hey)", "test (hey)")), + ]; + + for (input, (on, safe, off)) in tests { + assert_eq!(on, slugify_paths(input, SlugifyStrategy::On)); + assert_eq!(safe, slugify_paths(input, SlugifyStrategy::Safe)); + assert_eq!(off, slugify_paths(input, SlugifyStrategy::Off)); + } + } + + #[test] + fn can_slugify_anchors() { + let tests = vec![ + // input, (on, safe, off) + ("input", ("input", "input", "input")), + ("test ", ("test", "test_", "test_")), + ("tes t", ("tes-t", "tes_t", "tes_t")), + // Invalid NTFS + ("dot. ", ("dot", "dot._", "dot._")), + ("日本", ("ri-ben", "日本", "日本")), + ("héhé", ("hehe", "héhé", "héhé")), + ("test (hey)", ("test-hey", "test_(hey)", "test_(hey)")), + ]; + + for (input, (on, safe, off)) in tests { + assert_eq!(on, slugify_anchors(input, SlugifyStrategy::On)); + assert_eq!(safe, slugify_anchors(input, SlugifyStrategy::Safe)); + assert_eq!(off, slugify_anchors(input, SlugifyStrategy::Off)); + } + } +} diff --git a/components/utils/src/templates.rs b/components/utils/src/templates.rs index b031c25..5c25d25 100644 --- a/components/utils/src/templates.rs +++ b/components/utils/src/templates.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use tera::{Context, Tera}; -use errors::Result; +use errors::{bail, Result}; static DEFAULT_TPL: &str = include_str!("default_tpl.html"); @@ -11,7 +11,7 @@ macro_rules! render_default_tpl { let mut context = Context::new(); context.insert("filename", $filename); context.insert("url", $url); - Tera::one_off(DEFAULT_TPL, context, true).map_err(std::convert::Into::into) + Tera::one_off(DEFAULT_TPL, &context, true).map_err(std::convert::Into::into) }}; } @@ -27,21 +27,21 @@ pub fn render_template( ) -> Result { // check if it is in the templates if tera.templates.contains_key(name) { - return tera.render(name, context).map_err(std::convert::Into::into); + return tera.render(name, &context).map_err(std::convert::Into::into); } // check if it is part of a theme if let Some(ref t) = *theme { let theme_template_name = format!("{}/templates/{}", t, name); if tera.templates.contains_key(&theme_template_name) { - return tera.render(&theme_template_name, context).map_err(std::convert::Into::into); + return tera.render(&theme_template_name, &context).map_err(std::convert::Into::into); } } // check if it is part of ZOLA_TERA defaults let default_name = format!("__zola_builtins/{}", name); if tera.templates.contains_key(&default_name) { - return tera.render(&default_name, context).map_err(std::convert::Into::into); + return tera.render(&default_name, &context).map_err(std::convert::Into::into); } // maybe it's a default one? @@ -67,17 +67,21 @@ pub fn render_template( /// or macros is always better anyway for themes /// This will also rename the shortcodes to NOT have the themes in the path /// so themes shortcodes can be used. -pub fn rewrite_theme_paths(tera: &mut Tera, theme: &str) { +pub fn rewrite_theme_paths(tera_theme: &mut Tera, site_templates: Vec<&str>, theme: &str) { let mut shortcodes_to_move = vec![]; let mut templates = HashMap::new(); - let old_templates = ::std::mem::replace(&mut tera.templates, HashMap::new()); + let old_templates = ::std::mem::replace(&mut tera_theme.templates, HashMap::new()); // We want to match the paths in the templates to the new names for (key, mut tpl) in old_templates { tpl.name = format!("{}/templates/{}", theme, tpl.name); - // First the parent if there is none + // First the parent if there is one + // If a template with the same name is also in site, assumes it overrides the theme one + // and do not change anything if let Some(ref p) = tpl.parent.clone() { - tpl.parent = Some(format!("{}/templates/{}", theme, p)); + if !site_templates.contains(&p.as_ref()) { + tpl.parent = Some(format!("{}/templates/{}", theme, p)); + } } // Next the macros import @@ -96,12 +100,12 @@ pub fn rewrite_theme_paths(tera: &mut Tera, theme: &str) { templates.insert(tpl.name.clone(), tpl); } - tera.templates = templates; + tera_theme.templates = templates; // and then replace shortcodes in the Tera instance using the new names for (old_name, new_name) in shortcodes_to_move { - let tpl = tera.templates.remove(&old_name).unwrap(); - tera.templates.insert(new_name, tpl); + let tpl = tera_theme.templates.remove(&old_name).unwrap(); + tera_theme.templates.insert(new_name, tpl); } } @@ -113,12 +117,23 @@ mod tests { #[test] fn can_rewrite_all_paths_of_theme() { let mut tera = Tera::parse("test-templates/*.html").unwrap(); - rewrite_theme_paths(&mut tera, "hyde"); + rewrite_theme_paths(&mut tera, vec!["base.html"], "hyde"); // special case to make the test work: we also rename the files to // match the imports - for (key, val) in tera.templates.clone() { + for (key, val) in &tera.templates.clone() { tera.templates.insert(format!("hyde/templates/{}", key), val.clone()); } + // Adding our fake base + tera.add_raw_template("base.html", "Hello").unwrap(); tera.build_inheritance_chains().unwrap(); + + assert_eq!( + tera.templates["hyde/templates/index.html"].parent, + Some("base.html".to_string()) + ); + assert_eq!( + tera.templates["hyde/templates/child.html"].parent, + Some("hyde/templates/index.html".to_string()) + ); } } diff --git a/components/utils/test-templates/base.html b/components/utils/test-templates/base.html new file mode 100644 index 0000000..d562d6b --- /dev/null +++ b/components/utils/test-templates/base.html @@ -0,0 +1,10 @@ + + + + + + + {% block body %} + {% endblock body %} + + \ No newline at end of file diff --git a/components/utils/test-templates/index.html b/components/utils/test-templates/index.html index c15db63..b4fbbb6 100644 --- a/components/utils/test-templates/index.html +++ b/components/utils/test-templates/index.html @@ -1 +1,5 @@ -Some base template, used in tests to check whether path rewriting works. +{% extends "base.html" %} + +{% block body %} +The default text +{% endblock body %} diff --git a/docs/content/documentation/content/image-processing/index.md b/docs/content/documentation/content/image-processing/index.md index c6973af..bd860c3 100644 --- a/docs/content/documentation/content/image-processing/index.md +++ b/docs/content/documentation/content/image-processing/index.md @@ -24,14 +24,14 @@ resize_image(path, width, height, op, format, quality) - `"fill"` What each of these does is explained below. The default is `"fill"`. -- `format` (_optional_): Encoding format of the resized image. May be one of: +- `format` (_optional_): Encoding format of the resized image. May be one of: - `"auto"` - `"jpg"` - `"png"` - The default is `"auto"`, this means the format is chosen based on input image format. - JPEG is chosen for JPEGs and other lossy formats, while PNG is chosen for PNGs and other lossless formats. -- `quality` (_optional_): JPEG quality of the resized image, in percents. Only used when encoding JPEGs, default value is `75`. + The default is `"auto"`, this means that the format is chosen based on input image format. + JPEG is chosen for JPEGs and other lossy formats, and PNG is chosen for PNGs and other lossless formats. +- `quality` (_optional_): JPEG quality of the resized image, in percent. Only used when encoding JPEGs; default value is `75`. ### Image processing and return value @@ -41,7 +41,7 @@ Zola performs image processing during the build process and places the resized i static/processed_images/ ``` -Filename of each resized image is a hash of the function arguments, +The filename of each resized image is a hash of the function arguments, which means that once an image is resized in a certain way, it will be stored in the above directory and will not need to be resized again during subsequent builds (unless the image itself, the dimensions, or other arguments are changed). Therefore, if you have a large number of images, they will only need to be resized once. @@ -50,7 +50,7 @@ The function returns a full URL to the resized image. ## Resize operations -The source for all examples is this 300 × 380 pixels image: +The source for all examples is this 300 pixel × 380 pixel image: ![zola](01-zola.png) @@ -79,9 +79,11 @@ The source for all examples is this 300 × 380 pixels image: ### **`"fit"`** Like `"fit_width"` and `"fit_height"` combined, but only resize if the image is bigger than any of the specified dimensions. - This mode is handy, if e.g. images are automatically shrinked to certain sizes in a shortcode for mobile optimization. - Resizes the image such that the result fits within `width` and `height` preserving aspect ratio. This means that both width or height - will be at max `width` and `height`, respectively, but possibly one of them smaller so as to preserve the aspect ratio. + This mode is handy, if for example images are automatically shrunk to certain sizes in a shortcode for + mobile optimization. + Resizes the image such that the result fits within `width` and `height` while preserving the aspect ratio. This + means that both width or height will be at max `width` and `height`, respectively, but possibly one of them + smaller so as to preserve the aspect ratio. `resize_image(..., width=5000, height=5000, op="fit")` @@ -93,8 +95,9 @@ The source for all examples is this 300 × 380 pixels image: {{ resize_image(path="documentation/content/image-processing/01-zola.png", width=150, height=150, op="fit") }} ### **`"fill"`** - This is the default operation. It takes the image's center part with the same aspect ratio as the `width` & `height` given and resizes that - to `width` & `height`. This means that parts of the image that are outsize of the resized aspect ratio are cropped away. + This is the default operation. It takes the image's center part with the same aspect ratio as the `width` and + `height` given and resizes that to `width` and `height`. This means that parts of the image that are outside + of the resized aspect ratio are cropped away. `resize_image(..., width=150, height=150, op="fill")` @@ -103,8 +106,8 @@ The source for all examples is this 300 × 380 pixels image: ## Using `resize_image` in markdown via shortcodes -`resize_image` is a built-in Tera global function (see the [Templates](@/documentation/templates/_index.md) chapter), -but it can be used in markdown, too, using [Shortcodes](@/documentation/content/shortcodes.md). +`resize_image` is a built-in Tera global function (see the [templates](@/documentation/templates/_index.md) chapter), +but it can be used in Markdown using [shortcodes](@/documentation/content/shortcodes.md). The examples above were generated using a shortcode file named `resize_image.html` with this content: @@ -118,7 +121,7 @@ The `resize_image()` can be used multiple times and/or in loops. It is designed This can be used along with `assets` [page metadata](@/documentation/templates/pages-sections.md) to create picture galleries. The `assets` variable holds paths to all assets in the directory of a page with resources -(see [assets colocation](@/documentation/content/overview.md#assets-colocation)): if you have files other than images you +(see [asset colocation](@/documentation/content/overview.md#asset-colocation)); if you have files other than images you will need to filter them out in the loop first like in the example below. This can be used in shortcodes. For example, we can create a very simple html-only clickable @@ -135,10 +138,10 @@ picture gallery with the following shortcode named `gallery.html`: {% endfor %} ``` -As you can notice, we didn't specify an `op` argument, which means it'll default to `"fill"`. Similarly, the format will default to -`"auto"` (choosing PNG or JPEG as appropriate) and the JPEG quality will default to `75`. +As you can notice, we didn't specify an `op` argument, which means that it'll default to `"fill"`. Similarly, +the format will default to `"auto"` (choosing PNG or JPEG as appropriate) and the JPEG quality will default to `75`. -To call it from a markdown file, simply do: +To call it from a Markdown file, simply do: ```jinja2 {{/* gallery() */}} @@ -156,4 +159,4 @@ Here is the result: ## Get image size Sometimes when building a gallery it is useful to know the dimensions of each asset. You can get this information with -[get_image_metadata](@/documentation/templates/overview.md#get-image-metadata) +[get_image_metadata](@/documentation/templates/overview.md#get-image-metadata). diff --git a/docs/content/documentation/content/linking.md b/docs/content/documentation/content/linking.md index a758532..20bc065 100644 --- a/docs/content/documentation/content/linking.md +++ b/docs/content/documentation/content/linking.md @@ -4,9 +4,11 @@ weight = 50 +++ ## Heading id and anchor insertion -While rendering the markdown content, a unique id will automatically be assigned to each heading. This id is created -by converting the heading text to a [slug](https://en.wikipedia.org/wiki/Semantic_URL#Slug), appending numbers at the end -if the slug already exists for that article. For example: +While rendering the Markdown content, a unique id will automatically be assigned to each heading. +This id is created by converting the heading text to a [slug](https://en.wikipedia.org/wiki/Semantic_URL#Slug) if `slugify_paths` is enabled. +if `slugify_paths` is disabled, whitespaces are replaced by `_` and the following characters are stripped: `#`, `%`, `<`, `>`, `[`, `]`, `(`, `)`, \`, `^`, `{`, `|`, `}`. +A number is appended at the end if the slug already exists for that article +For example: ```md # Something exciting! <- something-exciting @@ -22,18 +24,21 @@ You can also manually specify an id with a `{#…}` suffix on the heading line: # Something manual! {#manual} ``` -This is useful for making deep links robust, either proactively (so that you can later change the text of a heading without breaking links to it) or retroactively (keeping the slug of the old header text, when changing the text). It can also be useful for migration of existing sites with different header id schemes, so that you can keep deep links working. +This is useful for making deep links robust, either proactively (so that you can later change the text of a heading +without breaking links to it) or retroactively (keeping the slug of the old header text when changing the text). It +can also be useful for migration of existing sites with different header id schemes, so that you can keep deep +links working. ## Anchor insertion -It is possible to have Zola automatically insert anchor links next to the heading, as you can see on the site you are currently -reading if you hover a title. +It is possible to have Zola automatically insert anchor links next to the heading, as you can see on this documentation +if you hover a title. This option is set at the section level: the `insert_anchor_links` variable on the -[Section front-matter page](@/documentation/content/section.md#front-matter). +[section front matter page](@/documentation/content/section.md#front-matter). The default template is very basic and will need CSS tweaks in your project to look decent. -If you want to change the anchor template, it can easily be overwritten by -creating a `anchor-link.html` file in the `templates` directory which gets an `id` variable. +If you want to change the anchor template, it can be easily overwritten by +creating an `anchor-link.html` file in the `templates` directory, which gets an `id` variable. ## Internal links Linking to other pages and their headings is so common that Zola adds a @@ -41,4 +46,4 @@ special syntax to Markdown links to handle them: start the link with `@/` and po to link to. The path to the file starts from the `content` directory. For example, linking to a file located at `content/pages/about.md` would be `[my link](@/pages/about.md)`. -You can still link to an anchor directly: `[my link](@/pages/about.md#example)` will work as expected. +You can still link to an anchor directly; `[my link](@/pages/about.md#example)` will work as expected. diff --git a/docs/content/documentation/content/multilingual.md b/docs/content/documentation/content/multilingual.md index a6eaba1..9f45970 100644 --- a/docs/content/documentation/content/multilingual.md +++ b/docs/content/documentation/content/multilingual.md @@ -21,7 +21,7 @@ If you want to use per-language taxonomies, ensure you set the `lang` field in t configuration. ## Content -Once the languages are added in, you can start to translate your content. Zola +Once the languages have been added, you can start to translate your content. Zola uses the filename to detect the language: - `content/an-article.md`: this will be the default language @@ -30,9 +30,9 @@ uses the filename to detect the language: If the language code in the filename does not correspond to one of the languages configured, an error will be shown. -If your default language has an `_index.md` in a directory, you will need to add a `_index.{code}.md` +If your default language has an `_index.md` in a directory, you will need to add an `_index.{code}.md` file with the desired front-matter options as there is no language fallback. ## Output Zola outputs the translated content with a base URL of `{base_url}/{code}/`. -The only exception to that is if you are setting a translated page `path` directly in the front-matter. +The only exception to this is if you are setting a translated page `path` directly in the front matter. diff --git a/docs/content/documentation/content/overview.md b/docs/content/documentation/content/overview.md index 16a5092..560c8e9 100644 --- a/docs/content/documentation/content/overview.md +++ b/docs/content/documentation/content/overview.md @@ -4,9 +4,9 @@ weight = 10 +++ -Zola uses the folder structure to determine the site structure. -Each folder in the `content` directory represents a [section](@/documentation/content/section.md) -that contains [pages](@/documentation/content/page.md): your `.md` files. +Zola uses the directory structure to determine the site structure. +Each child directory in the `content` directory represents a [section](@/documentation/content/section.md) +that contains [pages](@/documentation/content/page.md) (your `.md` files). ```bash . @@ -23,30 +23,30 @@ that contains [pages](@/documentation/content/page.md): your `.md` files. └── _index.md // -> https://mywebsite.com/landing/ ``` -Each page path (the part after the `base_url`, for example `blog/cli-usage/`) can be customised by changing the `path` or `slug` -attribute of the [page front-matter](@/documentation/content/page.md#front-matter). +Each page path (the part after `base_url`, for example `blog/cli-usage/`) can be customised by changing the `path` or +`slug` attribute of the [page front-matter](@/documentation/content/page.md#front-matter). You might have noticed a file named `_index.md` in the example above. -This file is used to store both metadata and content of the section itself and is not considered a page. +This file is used to store both the metadata and content of the section itself and is not considered a page. -To make sure the terminology used in the rest of the documentation is understood, let's go over the example above. +To ensure that the terminology used in the rest of the documentation is understood, let's go over the example above. The `content` directory in this case has three `sections`: `content`, `blog` and `landing`. The `content` section has only -one page, `something.md`, the `landing` section has no page and the `blog` section has 4 pages: `cli-usage.md`, `configuration.md`, `directory-structure.md` -and `installation.md`. +one page (`something.md`), the `landing` section has no pages and the `blog` section has 4 pages (`cli-usage.md`, +`configuration.md`, `directory-structure.md` and `installation.md`). -While not shown in the example, sections can be nested indefinitely. +Sections can be nested indefinitely. -## Assets colocation +## Asset colocation -The `content` directory is not limited to markup files though: it's natural to want to co-locate a page and some related -assets, for instance images or spreadsheets. Zola supports that pattern out of the box for both sections and pages. +The `content` directory is not limited to markup files. It's natural to want to co-locate a page and some related +assets, such as images or spreadsheets. Zola supports this pattern out of the box for both sections and pages. -Any non-markdown file you add in the page/section folder will be copied alongside the generated page when building the site, -which allows us to use a relative path to access them. +All non-Markdown files you add in a page/section directory will be copied alongside the generated page when the site is +built, which allows us to use a relative path to access them. -For pages to use assets colocation, they should not be placed directly in their section folder (such as `latest-experiment.md`), but as an `index.md` file -in a dedicated folder (`latest-experiment/index.md`), like so: +Pages with co-located assets should not be placed directly in their section directory (such as `latest-experiment.md`), but +as an `index.md` file in a dedicated directory (`latest-experiment/index.md`), like so: ```bash @@ -58,23 +58,23 @@ in a dedicated folder (`latest-experiment/index.md`), like so: └── research.jpg ``` -In this setup, you may access `research.jpg` from your 'research' section, -and `yavascript.js` from your 'latest-experiment' directly within the Markdown: +With this setup, you may access `research.jpg` from your 'research' section +and `yavascript.js` from your 'latest-experiment' page directly within the Markdown: -```markdown +```Markdown Check out the complete program [here](yavascript.js). It's **really cool free-software**! ``` -By default, this page will get the folder name as its slug. So its permalink would be in the form of `https://example.com/research/latest-experiment/` +By default, this page's slug will be the directory name and thus its permalink will be `https://example.com/research/latest-experiment/`. ### Excluding files from assets It is possible to ignore selected asset files using the [ignored_content](@/documentation/getting-started/configuration.md) setting in the config file. -For example, say you have an Excel spreadsheet from which you are taking several screenshots and -then linking to those image files on your website. For maintainability purposes, you want to keep -the spreadsheet in the same folder as the markdown, but you don't want to copy the spreadsheet to -the public web site. You can achieve this by simply setting `ignored_content` in the config file: +For example, say that you have an Excel spreadsheet from which you are taking several screenshots and +then linking to these image files on your website. For maintainability, you want to keep +the spreadsheet in the same directory as the Markdown file, but you don't want to copy the spreadsheet to +the public web site. You can achieve this by setting `ignored_content` in the config file: ``` ignored_content = ["*.xlsx"] @@ -83,15 +83,15 @@ ignored_content = ["*.xlsx"] ## Static assets In addition to placing content files in the `content` directory, you may also place content -files in the `static` directory. Any files/folders that you place in the `static` directory -will be copied, without modification, to the public directory. +files in the `static` directory. Any files/directories that you place in the `static` directory +will be copied, without modification, to the `public` directory. Typically, you might put site-wide assets (such as the site favicon, site logos or site-wide -JavaScript) in the root of the static directory. You can also place any HTML or other files that +JavaScript) in the root of the static directory. You can also place any HTML or other files that you wish to be included without modification (that is, without being parsed as Markdown files) into the static directory. -Note that the static folder provides an _alternative_ to colocation. For example, imagine that you +Note that the static directory provides an _alternative_ to co-location. For example, imagine that you had the following directory structure (a simplified version of the structure presented above): ```bash @@ -103,18 +103,16 @@ had the following directory structure (a simplified version of the structure pre    └── _index.md // -> https://mywebsite.com/blog/ ``` -If you wanted to add an image to the `https://mywebsite.com/blog/configuration` page, you would -have three options: - * You could save the image to the `content/blog/configuration` folder and then link it with a - relative path from the `index.md` page. This is the approach described under **colocation**, +To add an image to the `https://mywebsite.com/blog/configuration` page, you have three options: + * You could save the image to the `content/blog/configuration` directory and then link to it with a + relative path from the `index.md` page. This is the approach described under **co-location** above. - * You could save the image to a `static/blog/configuration` folder and link it in exactly the - same way as if you had colocated it. If you do this, the generated files will be identical to - if you had colocated; the only difference will be that all static files will be saved in the - static folder rather than in the content folder. Depending on your organizational needs, this - may be better or worse. - * Or you could save the image to some arbitrary folder within the static folder. For example, - you could save all images to `static/images`. Using this approach, you would no longer be able - to use relative links, but could use an absolute link to `images/[filename]` to access your - image. This might be preferable for small sites or for sites that associate images with + * You could save the image to a `static/blog/configuration` directory and link to it in exactly the + same way as if you had co-located it. If you do this, the generated files will be identical to those + obtained if you had co-located the image; the only difference will be that all static files will be saved in the + static directory rather than in the content directory. The choice depends on your organizational needs. + * Or you could save the image to some arbitrary directory within the static directory. For example, + you could save all images to `static/images`. Using this approach, you can no longer use relative links. Instead, + you must use an absolute link to `images/[filename]` to access your + image. This might be preferable for small sites or for sites that associate images with multiple pages (e.g., logo images that appear on every page). diff --git a/docs/content/documentation/content/page.md b/docs/content/documentation/content/page.md index 505f0c0..b43790f 100644 --- a/docs/content/documentation/content/page.md +++ b/docs/content/documentation/content/page.md @@ -6,98 +6,140 @@ weight = 30 A page is any file ending with `.md` in the `content` directory, except files named `_index.md`. -If a file ending with `.md` is named `index.md`, then it will generate a page -with the name of the containing folder (for example, `/content/about/index.md` would -create a page at `[base_url]/about`). (Note the lack of an underscore; if the file +If a file ending with `.md` is named `index.md`, it will generate a page +with the name of its directory (for example, `/content/about/index.md` would +create a page at `[base_url]/about`). (Note the lack of an underscore; if the file were named `_index.md`, then it would create a **section** at `[base_url]/about`, as -discussed in the prior part of this documentation. But naming the file `index.md` will +discussed in a previous part of this documentation. In contrast, naming the file `index.md` will create a **page** at `[base_url]/about`). If the file is given any name *other* than `index.md` or `_index.md`, then it will -create a page with that name (without the `.md`). So naming a file in the root of your -content directory `about.md` would also create a page at `[base_url]/about`. -Another exception to that rule is that a filename starting with a datetime (YYYY-mm-dd or [a RFC3339 datetime](https://www.ietf.org/rfc/rfc3339.txt)) followed by +create a page with that name (without the `.md`). For example, naming a file in the root of your +content directory `about.md` would create a page at `[base_url]/about`. +Another exception to this rule is that a filename starting with a datetime (YYYY-mm-dd or [an RFC3339 datetime](https://www.ietf.org/rfc/rfc3339.txt)) followed by an underscore (`_`) or a dash (`-`) will use that date as the page date, unless already set -in the front-matter. The page name will be anything after `_`/`-` so a filename like `2018-10-10-hello-world.md` will +in the front matter. The page name will be anything after `_`/`-`, so the file `2018-10-10-hello-world.md` will be available at `[base_url]/hello-world`. Note that the full RFC3339 datetime contains colons, which is not a valid character in a filename on Windows. -As you can see, creating an `about.md` file is exactly equivalent to creating an +As you can see, creating an `about.md` file is equivalent to creating an `about/index.md` file. The only difference between the two methods is that creating -the `about` folder allows you to use asset colocation, as discussed in the -[Overview](@/documentation/content/overview.md#assets-colocation) section of this documentation. +the `about` directory allows you to use asset co-location, as discussed in the +[overview](@/documentation/content/overview.md#asset-colocation) section. -## Front-matter +## Output paths -The front-matter is a set of metadata embedded in a file. In Zola, -it is at the beginning of the file, surrounded by `+++` and uses TOML. +For any page within your content folder, its output path will be defined by either: -While none of the front-matter variables are mandatory, the opening and closing `+++` are required. +- its `slug` frontmatter key +- its filename -Here is an example page with all the variables available. The values provided below are the default -values. +Either way, these proposed path will be sanitized before being used. +If `slugify_paths` is enabled in the site's config - the default - paths are [slugified](https://en.wikipedia.org/wiki/Clean_URL#Slug). +Otherwise, a simpler sanitation is performed, outputting only valid NTFS paths. +The following characters are removed: `<`, `>`, `:`, `/`, `|`, `?`, `*`, `#`, `\\`, `(`, `)`, `[`, `]` as well as newlines and tabulations. +Additionally, trailing whitespace and dots are removed and whitespaces are replaced by `_`. + +**NOTE:** To produce URLs containing non-English characters (UTF8), `slugify_paths` needs to be set to `false`. + +### Path from frontmatter + +The output path for the page will first be read from the `slug` key in the page's frontmatter. + +**Example:** (file `content/zines/mlf-kurdistan.md`) + +``` ++++ +title = "Le mouvement des Femmes Libres, à la tête de la libération kurde" +slug = "femmes-libres-libération-kurde" ++++ +This is my article. +``` + +This frontmatter will output the article to `[base_url]/zines/femmes-libres-libération-kurde` with `slugify_paths` disabled, and to `[base_url]/zines/femmes-libres-liberation-kurde` with `slugify_enabled` enabled. + +### Path from filename + +When the article's output path is not specified in the frontmatter, it is extracted from the file's path in the content folder. Consider a file `content/foo/bar/thing.md`. The output path is constructed: +- if the filename is `index.md`, its parent folder name (`bar`) is used as output path +- otherwise, the output path is extracted from `thing` (the filename without the `.md` extension) + +If the path found starts with a datetime string (`YYYY-mm-dd` or [a RFC3339 datetime](https://www.ietf.org/rfc/rfc3339.txt)) followed by an underscore (`_`) or a dash (`-`), this date is removed from the output path and will be used as the page date (unless already set in the front-matter). Note that the full RFC3339 datetime contains colons, which is not a valid character in a filename on Windows. + +The output path extracted from the file path is then slugified or not depending on the `slugify_paths` config, as explained previously. + +**Example:** The file `content/blog/2018-10-10-hello-world.md` will generated a page available at will be available at `[base_url]/hello-world`. + +## Front matter + +The TOML front matter is a set of metadata embedded in a file at the beginning of the file enclosed +by triple pluses (`+++`). + +Although none of the front matter variables are mandatory, the opening and closing `+++` are required. + +Here is an example page with all the available variables. The values provided below are the +default values. ```toml title = "" description = "" # The date of the post. -# 2 formats are allowed: YYYY-MM-DD (2012-10-02) and RFC3339 (2002-10-02T15:00:00Z) -# Do not wrap dates in quotes, the line below only indicates that there is no default date. +# Two formats are allowed: YYYY-MM-DD (2012-10-02) and RFC3339 (2002-10-02T15:00:00Z). +# Do not wrap dates in quotes; the line below only indicates that there is no default date. # If the section variable `sort_by` is set to `date`, then any page that lacks a `date` # will not be rendered. # Setting this overrides a date set in the filename. date = -# The weight as defined in the Section page +# The weight as defined on the Section page of the documentation. # If the section variable `sort_by` is set to `weight`, then any page that lacks a `weight` # will not be rendered. weight = 0 -# A draft page is only loaded if the `--drafts` flag is passed to `zola build`, `zola serve` or `zola check` +# A draft page is only loaded if the `--drafts` flag is passed to `zola build`, `zola serve` or `zola check`. draft = false -# If filled, it will use that slug instead of the filename to make up the URL -# It will still use the section path though +# If set, this slug will be instead of the filename to make the URL. +# The section path will still be used. slug = "" -# The path the content will appear at +# The path the content will appear at. # If set, it cannot be an empty string and will override both `slug` and the filename. # The sections' path won't be used. -# It should not start with a `/` and the slash will be removed if it does +# It should not start with a `/` and the slash will be removed if it does. path = "" # Use aliases if you are moving content but want to redirect previous URLs to the -# current one. This takes an array of path, not URLs. +# current one. This takes an array of paths, not URLs. aliases = [] -# Whether the page should be in the search index. This is only used if -# `build_search_index` is set to true in the config and the parent section -# hasn't set `in_search_index` to false in its front-matter +# When set to "true", the page will be in the search index. This is only used if +# `build_search_index` is set to "true" in the Zola configuration and the parent section +# hasn't set `in_search_index` to "false" in its front matter. in_search_index = true -# Template to use to render this page +# Template to use to render this page. template = "page.html" -# The taxonomies for that page. The keys need to be the same as the taxonomies -# name configured in `config.toml` and the values an array of String like -# tags = ["rust", "web"] +# The taxonomies for this page. The keys need to be the same as the taxonomy +# names configured in `config.toml` and the values are an array of String objects. For example, +# tags = ["rust", "web"]. [taxonomies] -# Your own data +# Your own data. [extra] ``` ## Summary -You can ask Zola to create a summary if you only want to show the first -paragraph of each page in a list for example. +You can ask Zola to create a summary if, for example, you only want to show the first +paragraph of the page content in a list. To do so, add <!-- more --> in your content at the point -where you want the summary to end and the content up to that point will be also +where you want the summary to end. The content up to that point will be available separately in the [template](@/documentation/templates/pages-sections.md#page-variables). -An anchor link to this position named `continue-reading` is created, wrapped in a paragraph -with a `zola-continue-reading` id, so you can link directly to it if needed for example: -`Continue Reading` +A span element in this position with a `continue-reading` id is created, so you can link directly to it if needed. For example: +`Continue Reading`. diff --git a/docs/content/documentation/content/sass.md b/docs/content/documentation/content/sass.md index e5cd9c7..634bfc5 100644 --- a/docs/content/documentation/content/sass.md +++ b/docs/content/documentation/content/sass.md @@ -3,8 +3,8 @@ title = "Sass" weight = 110 +++ -Sass is a popular CSS extension language that approaches some of the harder -parts of maintaining large sets of CSS rules. If you're curious about what Sass +Sass is a popular CSS preprocessor that adds special features (e.g., variables, nested rules) to facilate the +maintenance of large sets of CSS rules. If you're curious about what Sass is and why it might be useful for styling your static site, the following links may be of interest: @@ -13,7 +13,7 @@ may be of interest: ## Using Sass in Zola -Zola processes any files with the `sass` or `scss` extensions in the `sass` +Zola processes any files with the `sass` or `scss` extension in the `sass` folder, and places the processed output into a `css` file with the same folder structure and base name into the `public` folder: @@ -34,9 +34,9 @@ structure and base name into the `public` folder: Files with a leading underscore in the name are not placed into the `public` folder, but can still be used as `@import` dependencies. For more information, see the "Partials" section of -[Sass Basics](https://sass-lang.com/guide#partials). +[Sass Basics](https://sass-lang.com/guide). -Files with the `scss` extension use ["Sassy CSS" syntax](http://sass-lang.com/documentation/#Formatting), -while files with the `sass` extension use the ["indented" syntax](http://sass-lang.com/documentation/file.INDENTED_SYNTAX.html). -Zola will return an error if a `scss` and `sass` file exist with the same -base name in the same folder to avoid confusion -- see the example above. +Files with the `scss` extension use "Sassy CSS" syntax, +while files with the `sass` extension use the "indented" syntax: . +Zola will return an error if `scss` and `sass` files with the same +base name exist in the same folder to avoid confusion -- see the example above. diff --git a/docs/content/documentation/content/search.md b/docs/content/documentation/content/search.md index 2745a10..e46711b 100644 --- a/docs/content/documentation/content/search.md +++ b/docs/content/documentation/content/search.md @@ -4,19 +4,19 @@ weight = 100 +++ Zola can build a search index from the sections and pages content to -be used by a JavaScript library: [elasticlunr](http://elasticlunr.com/). +be used by a JavaScript library such as [elasticlunr](http://elasticlunr.com/). To enable it, you only need to set `build_search_index = true` in your `config.toml` and Zola will generate an index for the `default_language` set for all pages not excluded from the search index. It is very important to set the `default_language` in your `config.toml` if you are writing a site not in -English: the index building pipelines are very different depending on the language. +English; the index building pipelines are very different depending on the language. After `zola build` or `zola serve`, you should see two files in your static directory: - `search_index.${default_language}.js`: so `search_index.en.js` for a default setup - `elasticlunr.min.js` -As each site will be different, Zola makes no assumptions about how your search and doesn't provide -the JavaScript/CSS code to do an actual search and display results. You can however look at how this very site -is implementing it to have an idea: [search.js](https://github.com/getzola/zola/tree/master/docs/static/search.js). +As each site will be different, Zola makes no assumptions about your search function and doesn't provide +the JavaScript/CSS code to do an actual search and display results. You can look at how this site +implements it to get an idea: [search.js](https://github.com/getzola/zola/tree/master/docs/static/search.js). diff --git a/docs/content/documentation/content/section.md b/docs/content/documentation/content/section.md index 41e4a0e..ae1a8bb 100644 --- a/docs/content/documentation/content/section.md +++ b/docs/content/documentation/content/section.md @@ -3,33 +3,34 @@ title = "Section" weight = 20 +++ -A section is created whenever a folder (or subfolder) in the `content` section contains an -`_index.md` file. If a folder does not contain an `_index.md` file, no section will be -created, but markdown files within that folder will still create pages (known as orphan pages). +A section is created whenever a directory (or subdirectory) in the `content` section contains an +`_index.md` file. If a directory does not contain an `_index.md` file, no section will be +created, but Markdown files within that directory will still create pages (known as orphan pages). The index page (i.e., the page displayed when a user browses to your `base_url`) is a section, -which is created whether or not you add an `_index.md` file at the root of your `content` folder. +which is created whether or not you add an `_index.md` file at the root of your `content` directory. If you do not create an `_index.md` file in your content directory, this main content section will not have any content or metadata. If you would like to add content or metadata, you can add an -`_index.md` file at the root of the `content` folder and edit it just as you would edit any other +`_index.md` file at the root of the `content` directory and edit it just as you would edit any other `_index.md` file; your `index.html` template will then have access to that content and metadata. -Any non-Markdown file in the section folder is added to the `assets` collection of the section, as explained in the [Content Overview](@/documentation/content/overview.md#assets-colocation). These files are then available from the Markdown using relative links. +Any non-Markdown file in a section directory is added to the `assets` collection of the section, as explained in the +[content overview](@/documentation/content/overview.md#asset-colocation). These files are then available in the +Markdown file using relative links. -## Front-matter +## Front matter -The `_index.md` file within a folder defines the content and metadata for that section. To set +The `_index.md` file within a directory defines the content and metadata for that section. To set the metadata, add front matter to the file. -The front-matter is a set of metadata embedded in a file. In Zola, -it is at the beginning of the file, surrounded by `+++` and uses TOML. +The TOML front matter is a set of metadata embedded in a file at the beginning of the file enclosed by triple pluses (`+++`). -After the closing `+++`, you can add content that will be parsed as markdown and will be available +After the closing `+++`, you can add content, which will be parsed as Markdown and made available to your templates through the `section.content` variable. -While none of the front-matter variables are mandatory, the opening and closing `+++` are required. +Although none of the front matter variables are mandatory, the opening and closing `+++` are required. -Here is an example `_index.md` with all the variables available. The values provided below are the +Here is an example `_index.md` with all the available variables. The values provided below are the default values. @@ -38,80 +39,80 @@ title = "" description = "" -# Whether to sort pages by "date", "weight", or "none". More on that below +# Used to sort pages by "date", "weight" or "none". See below for more information. sort_by = "none" # Used by the parent section to order its subsections. -# Lower values have priority. +# Lower values have higher priority. weight = 0 -# Template to use to render this section page +# Template to use to render this section page. template = "section.html" -# Apply the given template to ALL pages below the section, recursively. -# If you have several nested sections each with a page_template set, the page +# The given template is applied to ALL pages below the section, recursively. +# If you have several nested sections, each with a page_template set, the page # will always use the closest to itself. -# However, a page own `template` variable will always have priority. -# Not set by default +# However, a page's own `template` variable will always have priority. +# Not set by default. page_template = -# How many pages to be displayed per paginated page. -# No pagination will happen if this isn't set or if the value is 0 +# This sets the number of pages to be displayed per paginated page. +# No pagination will happen if this isn't set or if the value is 0. paginate_by = 0 -# If set, will be the path used by paginated page and the page number will be appended after it. -# For example the default would be page/1 +# If set, this will be the path used by the paginated page. The page number will be appended after this path. +# The default is page/1. paginate_path = "page" -# Whether to insert a link for each header like the ones you can see in this site if you hover one -# The default template can be overridden by creating a `anchor-link.html` in the `templates` directory -# Options are "left", "right" and "none" +# This determines whether to insert a link for each header like the ones you can see on this site if you hover over +# a header. +# The default template can be overridden by creating an `anchor-link.html` file in the `templates` directory. +# This value can be "left", "right" or "none". insert_anchor_links = "none" -# Whether the section pages should be in the search index. This is only used if -# `build_search_index` is set to true in the config +# If set to "true", the section pages will be in the search index. This is only used if +# `build_search_index` is set to "true" in the Zola configuration file. in_search_index = true -# Whether to render that section homepage or not. -# Useful when the section is only there to organize things but is not meant -# to be used directly +# If set to "true", the section homepage is rendered. +# Useful when the section is used to organize pages (not used directly). render = true -# Whether to redirect when landing on that section. Defaults to not being set. +# This determines whether to redirect when a user lands on the section. Defaults to not being set. # Useful for the same reason as `render` but when you don't want a 404 when # landing on the root section page. # Example: redirect_to = "documentation/content/overview" redirect_to = "" -# Whether the section should pass its pages on to the parent section. Defaults to `false`. +# If set to "true", the section will pass its pages on to the parent section. Defaults to `false`. # Useful when the section shouldn't split up the parent section, like # sections for each year under a posts section. transparent = false # Use aliases if you are moving content but want to redirect previous URLs to the -# current one. This takes an array of path, not URLs. +# current one. This takes an array of paths, not URLs. aliases = [] -# Your own data +# Your own data. [extra] ``` -Keep in mind that any configuration apply only to the direct pages, not to the subsections' pages. +Keep in mind that any configuration options apply only to the direct pages, not to the subsections' pages. ## Pagination -To enable pagination for a section's pages, simply set `paginate_by` to a positive number and it will automatically -paginate by this much. See [pagination template documentation](@/documentation/templates/pagination.md) for more information -on what will be available in the template. +To enable pagination for a section's pages, set `paginate_by` to a positive number. See +[pagination template documentation](@/documentation/templates/pagination.md) for more information +on what variables are available in the template. You can also change the pagination path (the word displayed while paginated in the URL, like `page/1`) by setting the `paginate_path` variable, which defaults to `page`. ## Sorting It is very common for Zola templates to iterate over pages or sections -to display all pages/sections a given directory. Consider a very simple +to display all pages/sections in a given directory. Consider a very simple example: a `blog` directory with three files: `blog/Post_1.md`, -`blog/Post_2.md`, and `blog/Post_3.md`. To iterate over these posts and +`blog/Post_2.md` and `blog/Post_3.md`. To iterate over these posts and create a list of links to the posts, a simple template might look like this: ```j2 @@ -120,21 +121,21 @@ create a list of links to the posts, a simple template might look like this: {% endfor %} ``` -This would iterate over the posts, and would do so in a specific order -based on the `sort_by` variable set in the `_index.md` page for the -containing section. The `sort_by` variable can be given three values: `date`, -`weight`, and `none`. If no `sort_by` method is set, the pages will be -sorted in the `none` order, which is not intended to be used for sorted content. +This would iterate over the posts in the order specified +by the `sort_by` variable set in the `_index.md` page for the corresponding +section. The `sort_by` variable can be given one of three values: `date`, +`weight` or `none`. If `sort_by` is not set, the pages will be +sorted in the `none` order, which is not intended for sorted content. Any page that is missing the data it needs to be sorted will be ignored and -won't be rendered. For example, if a page is missing the date variable the -containing section sets `sort_by = "date"`, then that page will be ignored. -The terminal will warn you if this is happening. +won't be rendered. For example, if a page is missing the date variable and its +section sets `sort_by = "date"`, then that page will be ignored. +The terminal will warn you if this occurs. If several pages have the same date/weight/order, their permalink will be used -to break the tie following an alphabetical order. +to break the tie based on alphabetical order. -## Sorting Pages +## Sorting pages The `sort_by` front-matter variable can have the following values: ### `date` @@ -150,24 +151,24 @@ page gets `page.lighter` and `page.heavier` variables that contain the pages with lighter and heavier weights, respectively. When iterating through pages, you may wish to use the Tera `reverse` filter, -which reverses the order of the pages. Thus, after using the `reverse` filter, +which reverses the order of the pages. For example, after using the `reverse` filter, pages sorted by weight will be sorted from lightest (at the top) to heaviest (at the bottom); pages sorted by date will be sorted from oldest (at the top) to newest (at the bottom). -`reverse` has no effect on `page.later`/`page.earlier`/`page.heavier`/`page.lighter`. +`reverse` has no effect on `page.later`/`page.earlier` or `page.heavier`/`page.lighter`. -## Sorting Subsections +## Sorting subsections Sorting sections is a bit less flexible: sections are always sorted by `weight`, -and do not have any variables that point to the next heavier/lighter sections. +and do not have variables that point to the heavier/lighter sections. -Based on this, by default the lightest (lowest `weight`) subsections will be at +By default, the lightest (lowest `weight`) subsections will be at the top of the list and the heaviest (highest `weight`) will be at the bottom; the `reverse` filter reverses this order. **Note**: Unlike pages, permalinks will **not** be used to break ties between -equally weighted sections. Thus, if the `weight` variable for your section is not set (or if it +equally weighted sections. Thus, if the `weight` variable for your section is not set (or if it is set in a way that produces ties), then your sections will be sorted in **random** order. Moreover, that order is determined at build time and will change with each site rebuild. Thus, if there is any chance that you will -iterate over your sections, you should always assign them weight. +iterate over your sections, you should always assign them a weight. diff --git a/docs/content/documentation/content/shortcodes.md b/docs/content/documentation/content/shortcodes.md index ee58ab7..1240fee 100644 --- a/docs/content/documentation/content/shortcodes.md +++ b/docs/content/documentation/content/shortcodes.md @@ -3,13 +3,14 @@ title = "Shortcodes" weight = 40 +++ -While Markdown is good at writing, it isn't great when you need write inline +Although Markdown is good for writing, it isn't great when you need write inline HTML to add some styling for example. To solve this, Zola borrows the concept of [shortcodes](https://codex.wordpress.org/Shortcode_API) from WordPress. -In our case, the shortcode corresponds to a template that is defined in the `templates/shortcodes` directory or a built-in one that can -be used in a Markdown file. If you want to use something similar to shortcodes in your templates, try [Tera macros](https://tera.netlify.com/docs#macros). +In our case, a shortcode corresponds to a template defined in the `templates/shortcodes` directory or +a built-in one that can be used in a Markdown file. If you want to use something similar to shortcodes in your templates, try [Tera macros](https://tera.netlify.com/docs/templates/#macros). + ## Writing a shortcode Let's write a shortcode to embed YouTube videos as an example. @@ -28,44 +29,44 @@ following: ``` This template is very straightforward: an iframe pointing to the YouTube embed URL wrapped in a `
`. -In terms of input, it expects at least one variable: `id`. Since the other variables -are in a `if` statement, we can assume they are optional. +In terms of input, this shortcode expects at least one variable: `id`. Because the other variables +are in an `if` statement, they are optional. -That's it, Zola will now recognise this template as a shortcode named `youtube` (the filename minus the `.html` extension). +That's it. Zola will now recognise this template as a shortcode named `youtube` (the filename minus the `.html` extension). -The markdown renderer will wrap an inline HTML node like `` or `` into a paragraph. If you want to disable that, -simply wrap your shortcode in a `div`. +The Markdown renderer will wrap an inline HTML node such as `` or `` into a paragraph. +If you want to disable this behaviour, wrap your shortcode in a `
`. -Shortcodes are rendered before parsing the markdown so it doesn't have access to the table of contents. Because of that, -you also cannot use the `get_page`/`get_section`/`get_taxonomy` global function. It might work while running `zola serve` because -it has been loaded but it will fail during `zola build`. +Shortcodes are rendered before the Markdown is parsed so they don't have access to the table of contents. Because of that, +you also cannot use the `get_page`/`get_section`/`get_taxonomy` global functions. It might work while running +`zola serve` because it has been loaded but it will fail during `zola build`. ## Using shortcodes There are two kinds of shortcodes: -- ones that do not take a body like the YouTube example above -- ones that do, a quote for example +- ones that do not take a body, such as the YouTube example above +- ones that do, such as one that styles a quote -In both cases, their arguments must be named and they will all be passed to the template. +In both cases, the arguments must be named and they will all be passed to the template. -Lastly, a shortcode name (and thus the corresponding `.html` file) as well as the arguments name -can only contain numbers, letters and underscores, or in Regex terms the following: `[0-9A-Za-z_]`. -While theoretically an argument name could be a number, it will not be possible to use it in the template in that case. +Lastly, a shortcode name (and thus the corresponding `.html` file) as well as the argument names +can only contain numbers, letters and underscores, or in Regex terms `[0-9A-Za-z_]`. +Although theoretically an argument name could be a number, it will not be possible to use such an argument in the template. -Argument values can be of 5 types: +Argument values can be of one of five types: - string: surrounded by double quotes, single quotes or backticks - bool: `true` or `false` -- float: a number with a `.` in it -- integer: a number without a `.` in it -- array: an array of any kind of values, except arrays +- float: a number with a decimal point (e.g., 1.2) +- integer: a whole number or its negative counterpart (e.g., 3) +- array: an array of any kind of value, except arrays Malformed values will be silently ignored. -Both type of shortcodes will also get either a `page` or `section` variable depending on where they were used and a `config` -one. Those values will overwrite any arguments passed to a shortcode so shortcodes should not use arguments called like one -of these. +Both types of shortcode will also get either a `page` or `section` variable depending on where they were used +and a `config` variable. These values will overwrite any arguments passed to a shortcode so these variable names +should not be used as argument names in shortcodes. ### Shortcodes without body @@ -86,7 +87,7 @@ Note that if you want to have some content that looks like a shortcode but not h you will need to escape it by using `{{/*` and `*/}}` instead of `{{` and `}}`. ### Shortcodes with body -For example, let's imagine we have the following shortcode `quote.html` template: +Let's imagine that we have the following shortcode `quote.html` template: ```jinja2
@@ -95,7 +96,7 @@ For example, let's imagine we have the following shortcode `quote.html` template
``` -We could use it in our markup file like so: +We could use it in our Markdown file like so: ```md As someone said: @@ -106,7 +107,7 @@ A quote ``` The body of the shortcode will be automatically passed down to the rendering context as the `body` variable and needs -to be in a newline. +to be on a new line. If you want to have some content that looks like a shortcode but not have Zola try to render it, you will need to escape it by using `{%/*` and `*/%}` instead of `{%` and `%}`. You won't need to escape @@ -124,8 +125,8 @@ Embed a responsive player for a YouTube video. The arguments are: - `id`: the video id (mandatory) -- `class`: a class to add the `div` surrounding the iframe -- `autoplay`: whether to autoplay the video on load +- `class`: a class to add to the `
` surrounding the iframe +- `autoplay`: when set to "true", the video autoplays on load Usage example: @@ -147,7 +148,7 @@ Embed a player for a Vimeo video. The arguments are: - `id`: the video id (mandatory) -- `class`: a class to add the `div` surrounding the iframe +- `class`: a class to add to the `
` surrounding the iframe Usage example: @@ -167,7 +168,7 @@ Embed a player for a Streamable video. The arguments are: - `id`: the video id (mandatory) -- `class`: a class to add the `div` surrounding the iframe +- `class`: a class to add to the `
` surrounding the iframe Usage example: @@ -188,7 +189,7 @@ The arguments are: - `url`: the url to the gist (mandatory) - `file`: by default, the shortcode will pull every file from the URL unless a specific filename is requested -- `class`: a class to add the `div` surrounding the iframe +- `class`: a class to add to the `
` surrounding the iframe Usage example: diff --git a/docs/content/documentation/content/syntax-highlighting.md b/docs/content/documentation/content/syntax-highlighting.md index f3d97e9..1326015 100644 --- a/docs/content/documentation/content/syntax-highlighting.md +++ b/docs/content/documentation/content/syntax-highlighting.md @@ -17,115 +17,114 @@ let highlight = true; ```` -You can replace the `rust` by the language you want to highlight or not put anything to get it +You can replace `rust` with another language or not put anything to get the text interpreted as plain text. -Here is a full list of the supported languages and the short names you can use: +Here is a full list of supported languages and their short names: ``` -- Plain Text -> ["txt"] -- Assembly x86 (NASM) -> ["asm", "inc", "nasm"] -- Crystal -> ["cr"] -- Dart -> ["dart"] -- Elixir -> ["ex", "exs"] -- fsharp -> ["fs"] -- Handlebars -> ["handlebars", "handlebars.html", "hbr", "hbrs", "hbs", "hdbs", "hjs", "mu", "mustache", "rac", "stache", "template", "tmpl"] -- Jinja2 -> ["j2", "jinja2"] -- Julia -> ["jl"] -- Kotlin -> ["kt", "kts"] -- Less -> ["less", "css.less"] -- MiniZinc (MZN) -> ["mzn", "dzn"] -- Nim -> ["nim", "nims"] -- ASP -> ["asa"] -- HTML (ASP) -> ["asp"] - ActionScript -> ["as"] - AppleScript -> ["applescript", "script editor"] +- ASP -> ["asa"] +- Assembly x86 (NASM) -> ["asm", "inc", "nasm"] - Batch File -> ["bat", "cmd"] -- NAnt Build File -> ["build"] -- C# -> ["cs", "csx"] -- C++ -> ["cpp", "cc", "cp", "cxx", "c++", "C", "h", "hh", "hpp", "hxx", "h++", "inl", "ipp"] +- BibTeX -> ["bib"] +- Bourne Again Shell (bash) -> [".bash_aliases", ".bash_completions", ".bash_functions", ".bash_login", ".bash_logout", ".bash_profile", ".bash_variables", ".bashrc", ".profile", ".textmate_init", ".zshrc", "bash", "fish", "sh", "zsh"] - C -> ["c", "h"] -- CSS -> ["css", "css.erb", "css.liquid"] +- C# -> ["cs", "csx"] +- C++ -> ["C", "c++", "cc", "cp", "cpp", "cxx", "h", "h++", "hh", "hpp", "hxx", "inl", "ipp"] - Clojure -> ["clj"] +- CMake -> ["CMakeLists.txt", "cmake"] +- CMake C Header -> ["h.in"] +- CMake C++ Header -> ["h++.in", "hh.in", "hpp.in", "hxx.in"] +- CMakeCache -> ["CMakeCache.txt"] +- Crystal -> ["cr"] +- CSS -> ["css", "css.erb", "css.liquid"] - D -> ["d", "di"] +- Dart -> ["dart"] - Diff -> ["diff", "patch"] -- Erlang -> ["erl", "hrl", "Emakefile", "emakefile"] -- HTML (Erlang) -> ["yaws"] -- Git Attributes -> ["attributes", "gitattributes", ".gitattributes"] +- Elixir -> ["ex", "exs"] +- Elm -> ["elm"] +- Erlang -> ["Emakefile", "emakefile", "erl", "hrl"] +- fsharp -> ["fs"] +- Generic Config -> [".dircolors", ".gitattributes", ".gitignore", ".gitmodules", ".inputrc", "Doxyfile", "cfg", "conf", "config", "dircolors", "gitattributes", "gitignore", "gitmodules", "ini", "inputrc", "mak", "mk", "pro"] +- Git Attributes -> [".gitattributes", "attributes", "gitattributes"] - Git Commit -> ["COMMIT_EDITMSG", "MERGE_MSG", "TAG_EDITMSG"] -- Git Config -> ["gitconfig", ".gitconfig", ".gitmodules"] -- Git Ignore -> ["exclude", "gitignore", ".gitignore"] +- Git Config -> [".gitconfig", ".gitmodules", "gitconfig"] +- Git Ignore -> [".gitignore", "exclude", "gitignore"] - Git Link -> [".git"] - Git Log -> ["gitlog"] - Git Rebase Todo -> ["git-rebase-todo"] - Go -> ["go"] -- Graphviz (DOT) -> ["dot", "DOT", "gv"] -- Groovy -> ["groovy", "gvy", "gradle", "Jenkinsfile"] -- HTML -> ["html", "htm", "shtml", "xhtml"] +- Graphviz (DOT) -> ["DOT", "dot", "gv"] +- Groovy -> ["Jenkinsfile", "gradle", "groovy", "gvy"] +- Handlebars -> ["handlebars", "handlebars.html", "hbr", "hbrs", "hbs", "hdbs", "hjs", "mu", "mustache", "rac", "stache", "template", "tmpl"] - Haskell -> ["hs"] -- Literate Haskell -> ["lhs"] -- Java Server Page (JSP) -> ["jsp"] -- Java -> ["java", "bsh"] +- HTML -> ["htm", "html", "shtml", "xhtml"] +- HTML (ASP) -> ["asp"] +- HTML (Erlang) -> ["yaws"] +- HTML (Rails) -> ["erb", "html.erb", "rails", "rhtml"] +- HTML (Tcl) -> ["adp"] +- Java -> ["bsh", "java"] - Java Properties -> ["properties"] -- JSON -> ["json", "sublime-settings", "sublime-menu", "sublime-keymap", "sublime-mousemap", "sublime-theme", "sublime-build", "sublime-project", "sublime-completions", "sublime-commands", "sublime-macro", "sublime-color-scheme"] -- JavaScript -> ["js", "htc"] -- BibTeX -> ["bib"] -- LaTeX -> ["tex", "ltx"] -- TeX -> ["sty", "cls"] -- Lisp -> ["lisp", "cl", "clisp", "l", "mud", "el", "scm", "ss", "lsp", "fasl"] +- Java Server Page (JSP) -> ["jsp"] +- JavaScript -> ["htc", "js"] +- JavaScript (Rails) -> ["js.erb"] +- Jinja2 -> ["j2", "jinja2"] +- JSON -> ["json", "sublime-build", "sublime-color-scheme", "sublime-commands", "sublime-completions", "sublime-keymap", "sublime-macro", "sublime-menu", "sublime-mousemap", "sublime-project", "sublime-settings", "sublime-theme"] +- Julia -> ["jl"] +- Kotlin -> ["kt", "kts"] +- LaTeX -> ["ltx", "tex"] +- Less -> ["css.less", "less"] +- Linker Script -> ["ld"] +- Lisp -> ["cl", "clisp", "el", "fasl", "l", "lisp", "lsp", "mud", "scm", "ss"] +- Literate Haskell -> ["lhs"] - Lua -> ["lua"] -- Makefile -> ["make", "GNUmakefile", "makefile", "Makefile", "makefile.am", "Makefile.am", "makefile.in", "Makefile.in", "OCamlMakefile", "mak", "mk"] -- Markdown -> ["md", "mdown", "markdown", "markdn"] +- Makefile -> ["GNUmakefile", "Makefile", "Makefile.am", "Makefile.in", "OCamlMakefile", "mak", "make", "makefile", "makefile.am", "makefile.in", "mk"] +- Markdown -> ["markdn", "markdown", "md", "mdown"] - MATLAB -> ["matlab"] +- MiniZinc (MZN) -> ["dzn", "mzn"] +- NAnt Build File -> ["build"] +- Nim -> ["nim", "nims"] +- Nix -> ["nix"] +- Objective-C -> ["h", "m"] +- Objective-C++ -> ["M", "h", "mm"] - OCaml -> ["ml", "mli"] - OCamllex -> ["mll"] - OCamlyacc -> ["mly"] -- Objective-C++ -> ["mm", "M", "h"] -- Objective-C -> ["m", "h"] +- Pascal -> ["dpr", "p", "pas"] +- Perl -> ["PL", "pl", "pm", "pod", "t"] - PHP -> ["php", "php3", "php4", "php5", "php7", "phps", "phpt", "phtml"] -- Pascal -> ["pas", "p", "dpr"] -- Perl -> ["pl", "pm", "pod", "t", "PL"] -- Python -> ["py", "py3", "pyw", "pyi", "pyx", "pyx.in", "pxd", "pxd.in", "pxi", "pxi.in", "rpy", "cpy", "SConstruct", "Sconstruct", "sconstruct", "SConscript", "gyp", "gypi", "Snakefile", "wscript"] -- R -> ["R", "r", "s", "S", "Rprofile"] +- Plain Text -> ["txt"] +- PowerShell -> ["ps1", "psd1", "psm1"] +- Python -> ["SConscript", "SConstruct", "Sconstruct", "Snakefile", "cpy", "gyp", "gypi", "pxd", "pxd.in", "pxi", "pxi.in", "py", "py3", "pyi", "pyw", "pyx", "pyx.in", "rpy", "sconstruct", "wscript"] +- R -> ["R", "Rprofile", "S", "r", "s"] - Rd (R Documentation) -> ["rd"] -- HTML (Rails) -> ["rails", "rhtml", "erb", "html.erb"] -- JavaScript (Rails) -> ["js.erb"] -- Ruby Haml -> ["haml", "sass"] -- Ruby on Rails -> ["rxml", "builder"] -- SQL (Rails) -> ["erbsql", "sql.erb"] +- Reason -> ["re", "rei"] - Regular Expression -> ["re"] -- reStructuredText -> ["rst", "rest"] -- Ruby -> ["rb", "Appfile", "Appraisals", "Berksfile", "Brewfile", "capfile", "cgi", "Cheffile", "config.ru", "Deliverfile", "Fastfile", "fcgi", "Gemfile", "gemspec", "Guardfile", "irbrc", "jbuilder", "podspec", "prawn", "rabl", "rake", "Rakefile", "Rantfile", "rbx", "rjs", "ruby.rail", "Scanfile", "simplecov", "Snapfile", "thor", "Thorfile", "Vagrantfile"] +- reStructuredText -> ["rest", "rst"] +- Ruby -> ["Appfile", "Appraisals", "Berksfile", "Brewfile", "Cheffile", "Deliverfile", "Fastfile", "Gemfile", "Guardfile", "Rakefile", "Rantfile", "Scanfile", "Snapfile", "Thorfile", "Vagrantfile", "capfile", "cgi", "config.ru", "fcgi", "gemspec", "irbrc", "jbuilder", "podspec", "prawn", "rabl", "rake", "rb", "rbx", "rjs", "ruby.rail", "simplecov", "thor"] +- Ruby Haml -> ["haml", "sass"] +- Ruby on Rails -> ["builder", "rxml"] - Rust -> ["rs"] -- SQL -> ["sql", "ddl", "dml"] -- Scala -> ["scala", "sbt"] -- Bourne Again Shell (bash) -> ["sh", "bash", "zsh", "fish", ".bash_aliases", ".bash_completions", ".bash_functions", ".bash_login", ".bash_logout", ".bash_profile", ".bash_variables", ".bashrc", ".profile", ".textmate_init", ".zshrc"] -- HTML (Tcl) -> ["adp"] -- Tcl -> ["tcl"] -- Textile -> ["textile"] -- XML -> ["xml", "xsd", "xslt", "tld", "dtml", "rss", "opml", "svg"] -- YAML -> ["yaml", "yml", "sublime-syntax"] -- PowerShell -> ["ps1", "psm1", "psd1"] +- Scala -> ["sbt", "scala"] +- SQL -> ["ddl", "dml", "sql"] +- SQL (Rails) -> ["erbsql", "sql.erb"] - SWI-Prolog -> ["pro"] -- Reason -> ["re", "rei"] -- CMake C Header -> ["h.in"] -- CMake C++ Header -> ["hh.in", "hpp.in", "hxx.in", "h++.in"] -- CMake -> ["CMakeLists.txt", "cmake"] -- CMakeCache -> ["CMakeCache.txt"] -- Generic Config -> ["cfg", "conf", "config", "ini", "pro", "mak", "mk", "Doxyfile", "inputrc", ".inputrc", "dircolors", ".dircolors", "gitmodules", ".gitmodules", "gitignore", ".gitignore", "gitattributes", ".gitattributes"] -- Elm -> ["elm"] -- Linker Script -> ["ld"] - Swift -> ["swift"] -- TOML -> ["toml", "tml"] +- Tcl -> ["tcl"] +- TeX -> ["cls", "sty"] +- Textile -> ["textile"] +- TOML -> ["Cargo.lock", "Gopkg.lock", "Pipfile", "tml", "toml"] - TypeScript -> ["ts"] - TypeScriptReact -> ["tsx"] - VimL -> ["vim"] -- Nix -> ["nix"] -- TOML -> ["toml", "tml", "Cargo.lock", "Gopkg.lock", "Pipfile"] +- XML -> ["dtml", "opml", "rss", "svg", "tld", "xml", "xsd", "xslt"] +- YAML -> ["sublime-syntax", "yaml", "yml"] ``` -If you want to highlight a language not on that list, please open an issue or a pull request on the [Zola repo](https://github.com/getzola/zola). -Alternatively, the `extra_syntaxes` config option can be used to add additional syntax files. +If you want to highlight a language not on this list, please open an issue or a pull request on the [Zola repo](https://github.com/getzola/zola). +Alternatively, the `extra_syntaxes` configuration option can be used to add additional syntax files. If your site source is laid out as follows: @@ -144,4 +143,4 @@ If your site source is laid out as follows: └── ... ``` -you would set your `extra_syntaxes` to `["syntaxes", "syntaxes/Sublime-Language1"]` in order to load `lang1.sublime-syntax` and `lang2.sublime-syntax`. +you would set your `extra_syntaxes` to `["syntaxes", "syntaxes/Sublime-Language1"]` to load `lang1.sublime-syntax` and `lang2.sublime-syntax`. diff --git a/docs/content/documentation/content/table-of-contents.md b/docs/content/documentation/content/table-of-contents.md index 5d2b35c..d192401 100644 --- a/docs/content/documentation/content/table-of-contents.md +++ b/docs/content/documentation/content/table-of-contents.md @@ -5,15 +5,15 @@ weight = 60 Each page/section will automatically generate a table of contents for itself based on the headers present. -It is available in the template through the `toc` variable. +It is available in the template through the `page.toc` or `section.toc` variable. You can view the [template variables](@/documentation/templates/pages-sections.md#table-of-contents) documentation for information on its structure. -Here is an example of using that field to render a 2-level table of contents: +Here is an example of using that field to render a two-level table of contents: ```jinja2 ``` -While headers are neatly ordered in that example, it will work just as well with disjoint headers. +While headers are neatly ordered in this example, it will work just as well with disjoint headers. Note that all existing HTML tags from the title will NOT be present in the table of contents to avoid various issues. diff --git a/docs/content/documentation/content/taxonomies.md b/docs/content/documentation/content/taxonomies.md index 606abcf..e312f16 100644 --- a/docs/content/documentation/content/taxonomies.md +++ b/docs/content/documentation/content/taxonomies.md @@ -5,32 +5,59 @@ weight = 90 Zola has built-in support for taxonomies. -The first step is to define the taxonomies in your [config.toml](@/documentation/getting-started/configuration.md). +## Configuration -A taxonomy has 5 variables: +A taxonomy has five variables: -- `name`: a required string that will be used in the URLs, usually the plural version (i.e. tags, categories etc) +- `name`: a required string that will be used in the URLs, usually the plural version (i.e., tags, categories, etc.) - `paginate_by`: if this is set to a number, each term page will be paginated by this much. -- `paginate_path`: if set, will be the path used by paginated page and the page number will be appended after it. -For example the default would be page/1 -- `rss`: if set to `true`, a RSS feed will be generated for each individual term. +- `paginate_path`: if set, this path will be used by the paginated page and the page number will be appended after it. +For example the default would be page/1. +- `rss`: if set to `true`, an RSS feed will be generated for each term. - `lang`: only set this if you are making a multilingual site and want to indicate which language this taxonomy is for -Once this is done, you can then set taxonomies in your content and Zola will pick -them up: +**Example 1:** (one language) + +```toml +taxonomies = [ name = "categories", rss = true ] +``` + +**Example 2:** (multilingual site) + +```toml +taxonomies = [ + {name = "tags", lang = "fr"}, + {name = "tags", lang = "eo"}, + {name = "tags", lang = "en"}, +] +``` + +## Using taxonomies + +Once the configuration is done, you can then set taxonomies in your content and Zola will pick them up: + +**Example:** ```toml +++ -... +title = "Writing a static-site generator in Rust" +date = 2019-08-15 [taxonomies] tags = ["rust", "web"] categories = ["programming"] +++ ``` -The taxonomy pages are available at the following paths: +## Output paths + +In a similar manner to how section and pages calculate their output path: +- the taxonomy name is never slugified +- the taxonomy entry (eg. as specific tag) is slugified when `slugify_paths` is enabled in the configuration + +The taxonomy pages are then available at the following paths: ```plain -$BASE_URL/$NAME/ -$BASE_URL/$NAME/$SLUG +$BASE_URL/$NAME/ (taxonomy) +$BASE_URL/$NAME/$SLUG (taxonomy entry) ``` + diff --git a/docs/content/documentation/deployment/github-pages.md b/docs/content/documentation/deployment/github-pages.md index dd50ac5..5ba0287 100644 --- a/docs/content/documentation/deployment/github-pages.md +++ b/docs/content/documentation/deployment/github-pages.md @@ -3,25 +3,31 @@ title = "GitHub Pages" weight = 30 +++ -By default, GitHub Pages uses Jekyll (A ruby based static site generator), -but you can also publish any generated files provided you have an `index.html` file in the root of a branch called `gh-pages` or `master`, in addition you can also publish from a `docs` directory in your repository. That branch name can also be manually changed in the settings of a repository. **However** this only applies to publishing in a custom domain, i.e. if you want to publish to a GitHub provided web service under the `github.io` domain, you can **only** use the `master` branch of your repository as explained [here](https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages), so we will focus on the method which will work regardless of the domain. +By default, GitHub Pages uses Jekyll (a ruby based static site generator), +but you can also publish any generated files provided you have an `index.html` file in the root of a branch called +`gh-pages` or `master`. In addition you can publish from a `docs` directory in your repository. That branch name can +also be manually changed in the settings of a repository. **However**, this only applies to publishing in a custom domain, +i.e., if you want to publish to a GitHub-provided web service under the `github.io` domain, you can **only** use the +`master` branch of your repository, as explained +[here](https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages), +so we will focus on the method that will work regardless of the domain. -We can use any CI server to build and deploy our site. For example: +We can use any continuous integration (CI) server to build and deploy our site. For example: * [Github Actions](https://github.com/shalzz/zola-deploy-action) * [Travis CI](#travis-ci) ## Travis CI -We are going to use [TravisCI](https://travis-ci.org) to automatically publish the site. If you are not using Travis already, -you will need to login with the GitHub OAuth and activate Travis for the repository. +We are going to use [Travis CI](https://travis-ci.org) to automatically publish the site. If you are not using Travis +already, you will need to login with the GitHub OAuth and activate Travis for the repository. Don't forget to also check if your repository allows GitHub Pages in its settings. -## Ensure Travis can access your theme +## Ensure that Travis can access your theme -Depending on how you added your theme Travis may not exactly know how to access -it. The best way to ensure it will have full access to the theme is to use git -submodules. When doing this ensure you are using the `https` version of the URL. +Depending on how you added your theme, Travis may not know how to access +it. The best way to ensure that it will have full access to the theme is to use git +submodules. When doing this, ensure that you are using the `https` version of the URL. ```shell $ git submodule add {THEME_URL} themes/{THEME_NAME} @@ -29,16 +35,17 @@ $ git submodule add {THEME_URL} themes/{THEME_NAME} ## Allowing Travis to push to GitHub -Before pushing anything, Travis needs a Github private access key in order to make changes to your repository. -If you're already logged in to your account, just click [here](https://github.com/settings/tokens) to go to your tokens page. +Before pushing anything, Travis needs a Github private access key to make changes to your repository. +If you're already logged in to your account, just click [here](https://github.com/settings/tokens) to go to +your tokens page. Otherwise, navigate to `Settings > Developer Settings > Personal Access Tokens`. -Generate a new token, and give it any description you'd like. +Generate a new token and give it any description you'd like. Under the "Select Scopes" section, give it repo permissions. Click "Generate token" to finish up. -Your token will now be visible! +Your token will now be visible. Copy it into your clipboard and head back to Travis. Once on Travis, click on your project, and navigate to "Settings". Scroll down to "Environment Variables" and input a name of `GH_TOKEN` with a value of your access token. -Make sure "Display value in build log" is off, and then click add. Now Travis has access to your repository. +Make sure that "Display value in build log" is off, and then click add. Now Travis has access to your repository. ## Setting up Travis @@ -68,7 +75,7 @@ after_success: | git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git master ``` -If your site is using a custom domain, you will need to mention it in the `ghp-import` command: `ghp-import -c vaporsoft.net -n public` -for example. +If your site is using a custom domain, you will need to mention it in the `ghp-import` command: +`ghp-import -c vaporsoft.net -n public` for example. Credits: this page is based on the article https://vaporsoft.net/publishing-gutenberg-to-github/ diff --git a/docs/content/documentation/deployment/gitlab-pages.md b/docs/content/documentation/deployment/gitlab-pages.md index 8bcde42..ecd8a17 100644 --- a/docs/content/documentation/deployment/gitlab-pages.md +++ b/docs/content/documentation/deployment/gitlab-pages.md @@ -9,7 +9,7 @@ We are going to use the GitLab CI runner to automatically publish the site (this Your repository needs to be set up to be a user or group website. This means the name of the repository has to be in the correct format. -For example, under your username, `john`, you have to create a project called `john.gitlab.io`. Your project URL will be `https://gitlab.com/john/john.gitlab.io`. Once you enable GitLab Pages for your project, your website will be published under `https://john.gitlab.io`. +For example, assuming that the username is `john`, you have to create a project called `john.gitlab.io`. Your project URL will be `https://gitlab.com/john/john.gitlab.io`. Once you enable GitLab Pages for your project, your website will be published under `https://john.gitlab.io`. Under your group `websites`, you created a project called `websites.gitlab.io`. Your project’s URL will be `https://gitlab.com/websites/websites.gitlab.io`. Once you enable GitLab Pages for your project, your website will be published under `https://websites.gitlab.io`. @@ -18,23 +18,23 @@ This guide assumes that your zola project is located in the root of your reposit ## Ensuring that the CI runner can access your theme -Depending on how you added your theme your repository may not contain it. The best way to ensure the theme will be added is to use -submodules. When doing this ensure you are using the `https` version of the URL. +Depending on how you added your theme, your repository may not contain it. The best way to ensure that the theme will +be added is to use submodules. When doing this, ensure that you are using the `https` version of the URL. ```shell $ git submodule add {THEME_URL} themes/{THEME_NAME} ``` -For example, this could look like +For example, this could look like: ```shell $ git submodule add https://github.com/getzola/hyde.git themes/hyde ``` ## Setting up the GitLab CI/CD Runner -The second step is to tell the gitlab continous integration runner how to create the gitlab page. +The second step is to tell the GitLab continous integration runner how to create the GitLab page. -To do this, create a file called `.gitlab-ci.yml` in the root directory of your repository. +To do this, create a file called `.gitlab-ci.yml` in the root directory of your repository. ```yaml variables: @@ -62,7 +62,8 @@ pages: - master ``` -Push this new file and... Tada! You're done! If you navigate to `settings > pages` you should be able to see something like this: +Push this new file and ... Tada! You're done! If you navigate to `settings > pages`, you should be able to see +something like this: > Congratulations! Your pages are served under: https://john.gitlab.io diff --git a/docs/content/documentation/deployment/netlify.md b/docs/content/documentation/deployment/netlify.md index a8557b9..6402991 100644 --- a/docs/content/documentation/deployment/netlify.md +++ b/docs/content/documentation/deployment/netlify.md @@ -4,12 +4,12 @@ weight = 20 +++ Netlify provides best practices like SSL, CDN distribution, caching and continuous deployment -with no effort. This very site is hosted by Netlify and automatically deployed on commits. +with no effort. This site is hosted by Netlify and automatically deployed on commits. If you don't have an account with Netlify, you can [sign up](https://app.netlify.com) for one. -## Automatic Deploys +## Automatic deploys Once you are in the admin interface, you can add a site from a Git provider (GitHub, GitLab or Bitbucket). At the end of this process, you can select the deploy settings for the project: @@ -20,27 +20,27 @@ Once you are in the admin interface, you can add a site from a Git provider (Git - Environment variables: `ZOLA_VERSION` with for example `0.8.0` as value With this setup, your site should be automatically deployed on every commit on master. For `ZOLA_VERSION`, you may -use any of the tagged `release` versions in the GitHub repository — Netlify will automatically fetch the tagged version +use any of the tagged `release` versions in the GitHub repository. Netlify will automatically fetch the tagged version and use it to build your site. However, if you want to use everything that Netlify gives you, you should also publish temporary sites for pull requests. -This is done by adding the following `netlify.toml` file in your repository and removing the build command/publish directory in -the admin interface. +This is done by adding the following `netlify.toml` file in your repository and removing the build command/publish +directory in the admin interface. ```toml [build] -# assuming the Zola site is in a docs folder, if it isn't you don't need -# to have a `base` variable but you do need the `publish` and `command` +# This assumes that the Zola site is in a docs folder. If it isn't, you don't need +# to have a `base` variable but you do need the `publish` and `command` variables. base = "docs" publish = "docs/public" command = "zola build" [build.environment] -# Set the version name that you want to use and Netlify will automatically use it +# Set the version name that you want to use and Netlify will automatically use it. ZOLA_VERSION = "0.9.0" -# The magic for deploying previews of branches +# The magic for deploying previews of branches. # We need to override the base url with whatever url Netlify assigns to our # preview site. We do this using the Netlify environment variable # `$DEPLOY_PRIME_URL`. @@ -49,17 +49,18 @@ ZOLA_VERSION = "0.9.0" command = "zola build --base-url $DEPLOY_PRIME_URL" ``` -## Manual Deploys +## Manual deploys If you would prefer to use a version of Zola that isn't a tagged release (for example, after having built Zola from -source and made modifications), then you will need to manually deploy your `public` folder to Netlify. You can do this through -Netlify's web GUI or via the command line. +source and made modifications), then you will need to manually deploy your `public` folder to Netlify. You can do +this through Netlify's web GUI or via the command line. For a command-line manual deploy, follow these steps: - 1. Generate a `Personal Access Token` from the settings section of your Netlify account (*not* an OAuth Application) - 2. Build your site with `zola build` - 3. Create a zip folder containing the `public` directory - 4. Run the `curl` command below, filling in your values for PERSONAL_ACCESS_TOKEN_FROM_STEP_1, FILE_NAME.zip and SITE_NAME - 5. (Optional) delete the zip folder + 1. Generate a `Personal Access Token` from the settings section of your Netlify account (*not* an OAuth Application). + 2. Build your site with `zola build`. + 3. Create a zip folder containing the `public` directory. + 4. Run the `curl` command below, filling in your values for PERSONAL_ACCESS_TOKEN_FROM_STEP_1, FILE_NAME.zip + and SITE_NAME. + 5. (Optional) delete the zip folder. ```bash curl -H "Content-Type: application/zip" \ diff --git a/docs/content/documentation/getting-started/cli-usage.md b/docs/content/documentation/getting-started/cli-usage.md index d31a198..284eb57 100644 --- a/docs/content/documentation/getting-started/cli-usage.md +++ b/docs/content/documentation/getting-started/cli-usage.md @@ -5,20 +5,20 @@ weight = 2 Zola only has 4 commands: `init`, `build`, `serve` and `check`. -You can view the help of the whole program by running `zola --help` and -the command help by running `zola --help`. +You can view the help for the whole program by running `zola --help` and +that for a specific command by running `zola --help`. ## init Creates the directory structure used by Zola at the given directory after asking a few basic configuration questions. -Any choices made during those prompts can easily be changed by modifying the `config.toml`. +Any choices made during these prompts can be easily changed by modifying `config.toml`. ```bash $ zola init my_site $ zola init ``` -If the `my_site` folder already exists, Zola will only populate it if it does not contain non-hidden files (dotfiles are ignored). If no `my_site` argument is passed, Zola will try to populate the current directory. +If the `my_site` directory already exists, Zola will only populate it if it contains only hidden files (dotfiles are ignored). If no `my_site` argument is passed, Zola will try to populate the current directory. You can initialize a git repository and a Zola site directly from within a new folder: @@ -29,7 +29,7 @@ $ zola init ## build -This will build the whole site in the `public` directory after deleting it. +This will build the whole site in the `public` directory (if this directory already exists, it is overwritten). ```bash $ zola build @@ -44,34 +44,38 @@ $ zola build --base-url $DEPLOY_URL This is useful for example when you want to deploy previews of a site to a dynamic URL, such as Netlify deploy previews. -You can override the default output directory 'public' by passing a other value to the `output-dir` flag. +You can override the default output directory `public` by passing another value to the `output-dir` flag. ```bash $ zola build --output-dir $DOCUMENT_ROOT ``` -You can also point to another config file than `config.toml` like so - the position of the `config` option is important: +You can point to a config file other than `config.toml` like so (note that the position of the `config` option is important): ```bash $ zola --config config.staging.toml build ``` -By defaults, drafts are not loaded. If you wish to include them, pass the `--drafts` flag. +You can also process a project from a different directory with the `root` flag. If building a project 'out-of-tree' with the `root` flag, you may want to combine it with the `output-dir` flag. (Note that like `config`, the position is important): +```bash +$ zola --root /path/to/project build +``` + +By default, drafts are not loaded. If you wish to include them, pass the `--drafts` flag. ## serve This will build and serve the site using a local server. You can also specify the interface/port combination to use if you want something different than the default (`127.0.0.1:1111`). -You can also specify different addresses for the interface and base_url using `-u`/`--base-url`, for example -if you are running zola in a Docker container. +You can also specify different addresses for the interface and base_url using `--interface` and `-u`/`--base-url`, respectively, if for example you are running Zola in a Docker container. Use the `--open` flag to automatically open the locally hosted instance in your web browser. -In the event you don't want zola to run a local webserver, you can use the `--watch-only` flag. +In the event you don't want Zola to run a local webserver, you can use the `--watch-only` flag. -Before starting, it will delete the public directory to ensure it starts from a clean slate. +Before starting, Zola will delete the `public` directory to start from a clean slate. ```bash $ zola serve @@ -84,40 +88,40 @@ $ zola serve --watch-only $ zola serve --open ``` -The serve command will watch all your content and will provide live reload, without -hard refresh if possible. +The serve command will watch all your content and provide live reload without +a hard refresh if possible. -Zola does a best-effort to live reload but some changes cannot be handled automatically. If you -fail to see your change or get a weird error, try to restart `zola serve`. +Some changes cannot be handled automatically and thus live reload may not always work. If you +fail to see your change or get an error, try restarting `zola serve`. -You can also point to another config file than `config.toml` like so - the position of the `config` option is important: +You can also point to a config file other than `config.toml` like so (note that the position of the `config` option is important): ```bash $ zola --config config.staging.toml serve ``` -By defaults, drafts are not loaded. If you wish to include them, pass the `--drafts` flag. +By default, drafts are not loaded. If you wish to include them, pass the `--drafts` flag. ### check The check subcommand will try to build all pages just like the build command would, but without writing any of the -results to disk. Additionally, it will also check all external links present in Markdown files by trying to fetch -them (links present in the template files will not be checked). +results to disk. Additionally, it will also check all external links in Markdown files by trying to fetch +them (links in the template files are not checked). -By defaults, drafts are not loaded. If you wish to include them, pass the `--drafts` flag. +By default, drafts are not loaded. If you wish to include them, pass the `--drafts` flag. ## Colored output -Any of the three commands will emit colored output if your terminal supports it. +Colored output is used if your terminal supports it. -*Note*: coloring is automatically disabled when the output is redirected to a pipe or a file (ie. when the standard output is not a TTY). +*Note*: coloring is automatically disabled when the output is redirected to a pipe or a file (i.e., when the standard output is not a TTY). -You can disable this behavior by exporting one of the two following environment variables: +You can disable this behavior by exporting one of the following two environment variables: - `NO_COLOR` (the value does not matter) - `CLICOLOR=0` -Should you want to force the use of colors, you can set the following environment variable: +To force the use of colors, you can set the following environment variable: - `CLICOLOR_FORCE=1` diff --git a/docs/content/documentation/getting-started/configuration.md b/docs/content/documentation/getting-started/configuration.md index 9d060af..6a5465a 100644 --- a/docs/content/documentation/getting-started/configuration.md +++ b/docs/content/documentation/getting-started/configuration.md @@ -1,53 +1,53 @@ +++ title = "Configuration" -weight = 4 +weight = 40 +++ -The default configuration will be enough to get Zola running locally but not more than that. -It follows the philosophy of only paying for what you need: almost everything is turned off by default. +The default configuration is sufficient to get Zola running locally but not more than that. +It follows the philosophy of paying for only what you need; almost everything is turned off by default. -To change the config, edit the `config.toml` file. -If you are not familiar with TOML, have a look at [the TOML Spec](https://github.com/toml-lang/toml) -to learn about it. +To change the configuration, edit the `config.toml` file. +If you are not familiar with TOML, have a look at [the TOML spec](https://github.com/toml-lang/toml). -Only one variable - `base_url` - is mandatory, everything else is optional. You can find all variables -used by Zola config as well as their default values below: +Only the `base_url` variable is mandatory; everything else is optional. All configuration variables +used by Zola as well as their default values are listed below: ```toml -# Base URL of the site, the only required config argument +# The base URL of the site; the only required configuration variable. base_url = "mywebsite.com" -# Used in RSS by default +# The site title and description; used in RSS by default. title = "" description = "" -# The default language, used in RSS + +# The default language; used in RSS. default_language = "en" -# Theme name to use +# The site theme to use. theme = "" -# Highlight all code blocks found +# When set to "true", all code blocks are highlighted. highlight_code = false -# Which theme to use for the code highlighting. -# See below for list of accepted values +# The theme to use for code highlighting. +# See below for list of allowed values. highlight_theme = "base16-ocean-dark" -# Whether to generate a RSS feed automatically +# When set to "true", an RSS feed is automatically generated. generate_rss = false -# The number of articles to include in the RSS feed. Will include all items if -# not set (the default). +# The number of articles to include in the RSS feed. All items are included if +# this limit is not set (the default). # rss_limit = 20 -# Whether to copy or hardlink files in static/ directory. Useful for sites -# whose static files are large. Note that for this to work, both static/ and -# output directory need to be on the same filesystem. Also, theme's static/ -# files are always copies, regardles of this setting. False by default. +# When set to "true", files in the `static` directory are hard-linked. Useful for large +# static files. Note that for this to work, both `static` and the +# output directory need to be on the same filesystem. Note that the theme's `static` +# files are always copied, regardles of this setting. # hard_link_static = false -# The taxonomies to be rendered for that site and their configuration +# The taxonomies to be rendered for the site and their configuration. # Example: # taxonomies = [ # {name = "tags", rss = true}, # each tag will have its own RSS feed @@ -58,7 +58,7 @@ generate_rss = false # taxonomies = [] -# The additional languages for that site +# The additional languages for the site. # Example: # languages = [ # {code = "fr", rss = true}, # there will be a RSS feed for French content @@ -68,21 +68,21 @@ taxonomies = [] # languages = [] -# Whether to compile the Sass files found in the `sass` directory +# When set to "true", the Sass files in the `sass` directory are compiled. compile_sass = false -# Whether to build a search index out of the pages and section -# content for the `default_language` +# When set to "true", a search index is built from the pages and section +# content for `default_language`. build_search_index = false -# A list of glob patterns specifying asset files to ignore when -# processing the content directory. -# Defaults to none, which means all asset files are copied over to the public folder. +# A list of glob patterns specifying asset files to ignore when the content +# directory is processed. Defaults to none, which means that all asset files are +# copied over to the `public` directory. # Example: # ignored_content = ["*.{graphml,xlsx}", "temp.*"] ignored_content = [] -# A list of directories to search for additional `.sublime-syntax` files in. +# A list of directories used to search for additional `.sublime-syntax` files. extra_syntaxes = [] # Optional translation object. The key if present should be a language code. @@ -95,11 +95,32 @@ extra_syntaxes = [] # # [translations.en] # title = "A title" -# + + +# Configuration of the link checker. +[link_checker] +# Skip link checking for external URLs that start with these prefixes +skip_prefixes = [ + "http://[2001:db8::]/", +] + +# Skip anchor checking for external URLs that start with these prefixes +skip_anchor_prefixes = [ + "https://caniuse.com/", +] + +# Various slugification strategies, see below for details +# Defauls to everything being a slug +[slugify] +paths = "on" +taxonomies = "on" +anchors = "on" + +# Optional translation object. Keys should be language codes. [translations] -# You can put any kind of data in there and it -# will be accessible in all templates +# You can put any kind of data here. The data +# will be accessible in all templates. [extra] ``` @@ -141,6 +162,23 @@ Zola currently has the following highlight themes available: - [ayu-mirage](https://github.com/dempfi/ayu) - [Tomorrow](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Tomorrow) - [one-dark](https://github.com/andresmichel/one-dark-theme) +- [zenburn](https://github.com/colinta/zenburn) Zola uses the Sublime Text themes, making it very easy to add more. -If you want a theme not on that list, please open an issue or a pull request on the [Zola repo](https://github.com/getzola/zola). +If you want a theme not listed above, please open an issue or a pull request on the [Zola repo](https://github.com/getzola/zola). + +## Slugification strategies + +By default, Zola will turn every path, taxonomies and anchors to a slug, an ASCII representation with no special characters. +You can however change that strategy for each kind of item, if you want UTF-8 characters in your URLs for example. There are 3 strategies: + +- `on`: the default one, everything is turned into a slug +- `safe`: characters that cannot exist in files on Windows (`<>:"/\|?*`) or Unix (`/`) are removed, everything else stays +- `off`: nothing is changed, your site might not build on some OS and/or break various URL parsers + +Since there are no filename issues with anchors, the `safe` and `off` strategies are identical in their case: the only change +is space being replaced by `_` since a space is not valid in an anchor. + +Note that if you are using a strategy other than the default, you will have to manually escape whitespace and Markdown +tokens to be able to link to your pages. For example an internal link to a file named `some space.md` will need to be +written like `some%20space.md` in your Markdown files. \ No newline at end of file diff --git a/docs/content/documentation/getting-started/directory-structure.md b/docs/content/documentation/getting-started/directory-structure.md index 0bf979e..9feeab2 100644 --- a/docs/content/documentation/getting-started/directory-structure.md +++ b/docs/content/documentation/getting-started/directory-structure.md @@ -1,9 +1,9 @@ +++ title = "Directory structure" -weight = 3 +weight = 30 +++ -After running `zola init`, you should see the following structure in your folder: +After running `zola init`, you should see the following structure in your directory: ```bash @@ -18,34 +18,34 @@ After running `zola init`, you should see the following structure in your folder 5 directories, 1 file ``` -Here's a high level overview of each of these folders and `config.toml`. +Here's a high-level overview of each of these directories and `config.toml`. ## `config.toml` -A mandatory configuration file of Zola in TOML format. -It is explained in details in the [Configuration page](@/documentation/getting-started/configuration.md). +A mandatory Zola configuration file in TOML format. +This file is explained in detail in the [configuration documentation](@/documentation/getting-started/configuration.md). ## `content` -Where all your markup content lies: this will be mostly comprised of `.md` files. -Each folder in the `content` directory represents a [section](@/documentation/content/section.md) -that contains [pages](@/documentation/content/page.md) : your `.md` files. +Contains all your markup content (mostly `.md` files). +Each child directory of the `content` directory represents a [section](@/documentation/content/section.md) +that contains [pages](@/documentation/content/page.md) (your `.md` files). -To learn more, read [the content overview](@/documentation/content/overview.md). +To learn more, read the [content overview page](@/documentation/content/overview.md). ## `sass` Contains the [Sass](http://sass-lang.com) files to be compiled. Non-Sass files will be ignored. -The directory structure of the `sass` folder will be preserved when copying over the compiled files: a file at +The directory structure of the `sass` folder will be preserved when copying over the compiled files; for example, a file at `sass/something/site.scss` will be compiled to `public/something/site.css`. ## `static` -Contains any kind of files. All the files/folders in the `static` folder will be copied as-is in the output directory. -If your static files are large you can configure Zola to [hard link](https://en.wikipedia.org/wiki/Hard_link) them -instead of copying by setting `hard_link_static = true` in the config file. +Contains any kind of file. All the files/directories in the `static` directory will be copied as-is to the output directory. +If your static files are large, you can configure Zola to [hard link](https://en.wikipedia.org/wiki/Hard_link) them +instead of copying them by setting `hard_link_static = true` in the config file. ## `templates` -Contains all the [Tera](https://tera.netlify.com) templates that will be used to render this site. -Have a look at the [Templates](@/documentation/templates/_index.md) to learn more about default templates +Contains all the [Tera](https://tera.netlify.com) templates that will be used to render your site. +Have a look at the [templates documentation](@/documentation/templates/_index.md) to learn more about default templates and available variables. ## `themes` -Contains themes that can be used for that site. If you are not planning to use themes, leave this folder empty. -If you want to learn about themes, head to the [themes documentation](@/documentation/themes/_index.md). +Contains themes that can be used for your site. If you are not planning to use themes, leave this directory empty. +If you want to learn about themes, see the [themes documentation](@/documentation/themes/_index.md). diff --git a/docs/content/documentation/getting-started/installation.md b/docs/content/documentation/getting-started/installation.md index c025636..cac6123 100644 --- a/docs/content/documentation/getting-started/installation.md +++ b/docs/content/documentation/getting-started/installation.md @@ -1,6 +1,6 @@ +++ title = "Installation" -weight = 1 +weight = 10 +++ Zola provides pre-built binaries for MacOS, Linux and Windows on the @@ -24,7 +24,7 @@ $ yay -S zola-bin ### Fedora -Zola is available in official repositories since Fedora 29. +Zola has been available in the official repositories since Fedora 29. ```sh $ sudo dnf install zola @@ -54,7 +54,7 @@ Zola is available on [Scoop](http://scoop.sh): $ scoop install zola ``` -And [Chocolatey](https://chocolatey.org/): +and [Chocolatey](https://chocolatey.org/): ```bash $ choco install zola @@ -63,10 +63,10 @@ $ choco install zola Zola does not work in PowerShell ISE. ## From source -To build it from source, you will need to have Git, [Rust (at least 1.31) and Cargo](https://www.rust-lang.org/) -installed. You will also need additional dependencies to compile [libsass](https://github.com/sass/libsass): +To build Zola from source, you will need to have Git, [Rust (at least 1.36) and Cargo](https://www.rust-lang.org/) +installed. You will also need to meet additional dependencies to compile [libsass](https://github.com/sass/libsass): -- OSX, Linux and other Unix: `make` (`gmake` on BSDs), `g++`, `libssl-dev` +- OSX, Linux and other Unix-like operating systems: `make` (`gmake` on BSDs), `g++`, `libssl-dev` - NixOS: Create a `shell.nix` file in the root of the cloned project with the following contents: ```nix with import {}; @@ -79,7 +79,7 @@ installed. You will also need additional dependencies to compile [libsass](https ]; } ``` - - Then invoke `nix-shell`. This opens a shell with the above dependencies. You then run `cargo build --release` to build the project. + - Then, invoke `nix-shell`. This opens a shell with the above dependencies. Then, run `cargo build --release` to build the project. - Windows (a bit trickier): updated `MSVC` and overall updated VS installation From a terminal, you can now run the following command: @@ -88,6 +88,6 @@ From a terminal, you can now run the following command: $ cargo build --release ``` -The binary will be available in the `target/release` folder. You can move it in your `$PATH` to have the +The binary will be available in the `target/release` directory. You can move it in your `$PATH` to have the `zola` command available globally or in a directory if you want for example to have the binary in the same repository as the site. diff --git a/docs/content/documentation/getting-started/overview.md b/docs/content/documentation/getting-started/overview.md new file mode 100644 index 0000000..b2a20d3 --- /dev/null +++ b/docs/content/documentation/getting-started/overview.md @@ -0,0 +1,206 @@ ++++ +title = "Overview" +weight = 5 ++++ + +## Zola at a Glance + +Zola is a static site generator (SSG), similar to [Hugo](https://gohugo.io/), [Pelican](https://blog.getpelican.com/), and [Jekyll](https://jekyllrb.com/) (for a comprehensive list of SSGs, please see the [StaticGen](https://www.staticgen.com/) site). It is written in [Rust](https://www.rust-lang.org/) and uses the [Tera](https://tera.netlify.com/) template engine, which is similar to [Jinja2](https://jinja.palletsprojects.com/en/2.10.x/), [Django templates](https://docs.djangoproject.com/en/2.2/topics/templates/), [Liquid](https://shopify.github.io/liquid/), and [Twig](https://twig.symfony.com/). Content is written in [CommonMark](https://commonmark.org/), a strongly defined, highly compatible specification of [Markdown](https://www.markdownguide.org/). + +SSGs use dynamic templates to transform content into static HTML pages. Static sites are thus very fast and require no databases, making them easy to host. A comparison between static and dynamic sites, such as WordPress, Drupal, and Django, can be found [here](https://dev.to/ashenmaster/static-vs-dynamic-sites-61f). + +To get a taste of Zola, please see the quick overview below. + +## First Steps with Zola + +Unlike some SSGs, Zola makes no assumptions regarding the structure of your site. In this overview, we'll be making a simple blog site. + +### Initialize Site + +> This overview is based on Zola 0.9. + +Please see the detailed [installation instructions for your platform](@/documentation/getting-started/installation.md). With Zola installed, let's initialize our site: + +```bash +$ zola init myblog +``` + +You will be asked a few questions. + +``` +> What is the URL of your site? (https://example.com): +> Do you want to enable Sass compilation? [Y/n]: +> Do you want to enable syntax highlighting? [y/N]: +> Do you want to build a search index of the content? [y/N]: +``` + + For our blog, let's accept the default values (i.e., press Enter for each question). We now have a `myblog` directory with the following structure: + +```bash +├── config.toml +├── content +├── sass +├── static +├── templates +└── themes +``` + +Let's start the zola development server with: + +```bash +$ zola serve +Building site... +-> Creating 0 pages (0 orphan), 0 sections, and processing 0 images +``` + +> This command must be run in the base Zola directory, which contains `config.toml`. + +If you point your web browser to , you should see a "Welcome to Zola" message. + +### Home Page + +Let's make a home page. To do this, let's first create a `base.html` file inside the `templates` directory. This step will make more sense as we move through this overview. We'll be using the CSS framework [Bulma](https://bulma.io/). + +```html + + + + + + MyBlog + + + + +
+
+ {% block content %} {% endblock %} +
+
+ + + +``` + +Now, let's create an `index.html` file inside the `templates` directory. + +```html +{% extends "base.html" %} + +{% block content %} +

+ This is my blog made with Zola. +

+{% endblock content %} +``` + +This tells Zola that `index.html` extends our `base.html` file and replaces the block called "content" with the text between the `{% block content %}` and `{% endblock content %}` tags. + +### Content Directory + +Now let's add some content. We'll start by making a `blog` subdirectory in the `content` directory and creating an `_index.md` file inside it. This file tells Zola that `blog` is a [section](@/documentation/content/section.md), which is how content is categorized in Zola. + +```bash +├── content +│ └── blog +│ └── _index.md +``` + +In the `_index.md` file, we'll set the following variables in [TOML](https://github.com/toml-lang/toml) format: + +```md ++++ +title = "List of blog posts" +sort_by = "date" +template = "blog.html" +page_template = "blog-page.html" ++++ +``` + +> Note that although no variables are mandatory, the opening and closing `+++` are required. + +* *sort_by = "date"* tells Zola to use the date to order our section pages (more on pages below). +* *template = "blog.html"* tells Zola to use `blog.html` in the `templates` directory as the template for listing the Markdown files in this section. +* *page_template = "blog-page.html"* tells Zola to use `blog-page.html` in the `templates` directory as the template for individual Markdown files. + +For a full list of section variables, please see the [section](@/documentation/content/section.md) documentation. We will use *title = "List of blog posts"* in a template (see below). + +### Templates + +Let's now create some more templates. In the `templates` directory, create a `blog.html` file with the following contents: + +```html +{% extends "base.html" %} + +{% block content %} +

+ {{ section.title }} +

+ +{% endblock content %} +``` + +As done by `index.html`, `blog.html` extends `base.html`, but this time we want to list the blog posts. The *title* we set in the `_index.md` file above is available to us as `{{ section.title }}`. In the list below the title, we loop through all the pages in our section (`blog` directory) and output the page title and URL using `{{ page.title }}` and `{{ page.permalink }}`, respectively. If you go to , you will see the section page for `blog`. The list is empty because we don't have any blog posts. Let's fix that now. + +### Markdown Content + +In the `blog` directory, create a file called `first.md` with the following contents: + +```md ++++ +title = "My first post" +date = 2019-11-27 ++++ + +This is my first blog post. +``` + +The *title* and *date* will be avaiable to us in the `blog-page.html` template as `{{ page.title }}` and `{{ page.date }}`, respectively. All text below the closing `+++` will be available to us as `{{ page.content }}`. + +We now need to make the `blog-page.html` template. In the `templates` directory, create this file with the contents: + +```html +{% extends "base.html" %} + +{% block content %} +

+ {{ page.title }} +

+

{{ page.date }}

+

{{ page.content | safe }}

+{% endblock content %} +``` + +> Note the `| safe` filter for `{{ page.content }}`. + +This should start to look familiar. If you now go back to our blog list page at , you should see our lonely post. Let's add another. In the `content/blog` directory, let's create the file `second.md` with the contents: + +```md ++++ +title = "My second post" +date = 2019-11-28 ++++ + +This is my second blog post. +``` + +Back at , our second post shows up on top of the list because it's newer than the first post and we had set *sort_by = "date"* in our `_index.md` file. As a final step, let's modify our home page to link to our blog posts. + +The `index.html` file inside the `templates` directory should be: + +```html +{% extends "base.html" %} + +{% block content %} +

+ This is my blog made with Zola. +

+

Click here to see my posts.

+{% endblock content %} +``` + +This has been a quick overview of Zola. You can now dive into the rest of the documentation. diff --git a/docs/content/documentation/templates/404.md b/docs/content/documentation/templates/404.md index 3e18c34..eb0a558 100644 --- a/docs/content/documentation/templates/404.md +++ b/docs/content/documentation/templates/404.md @@ -4,5 +4,4 @@ weight = 80 +++ Zola will look for a `404.html` file in the `templates` directory or -use the built-in one. The default template is very basic and gets a simple -variable in the context: the site `config`. +use the built-in one. The default template is very basic and gets `config` in its context. diff --git a/docs/content/documentation/templates/archive.md b/docs/content/documentation/templates/archive.md index ee7f830..467d12c 100644 --- a/docs/content/documentation/templates/archive.md +++ b/docs/content/documentation/templates/archive.md @@ -3,8 +3,8 @@ title = "Archive" weight = 90 +++ -Zola doesn't have a built-in way to display an archive page, a page showing -all post titles ordered by year. However, this can be accomplished directly in the templates: +Zola doesn't have a built-in way to display an archive page (a page showing +all post titles ordered by year). However, this can be accomplished directly in the templates: ```jinja2 {% for year, posts in section.pages | group_by(attribute="year") %} @@ -19,5 +19,5 @@ all post titles ordered by year. However, this can be accomplished directly in t ``` This snippet assumes that posts are sorted by date and that you want to display the archive -in a descending order. If you want to show articles in a ascending order, simply add a `reverse` filter -after the `group_by`. +in descending order. If you want to show articles in ascending order, add a `reverse` filter +after `group_by`. diff --git a/docs/content/documentation/templates/overview.md b/docs/content/documentation/templates/overview.md index 4a6b2aa..e128494 100644 --- a/docs/content/documentation/templates/overview.md +++ b/docs/content/documentation/templates/overview.md @@ -3,49 +3,49 @@ title = "Overview" weight = 10 +++ -Zola uses the [Tera](https://tera.netlify.com) template engine and is very similar -to Jinja2, Liquid or Twig. +Zola uses the [Tera](https://tera.netlify.com) template engine, which is very similar +to Jinja2, Liquid and Twig. As this documentation will only talk about how templates work in Zola, please read the [Tera template documentation](https://tera.netlify.com/docs#templates) if you want to learn more about it first. -All templates live in the `templates` directory. If you are not sure what variables are available in a template, you can just stick `{{ __tera_context }}` in it -to print the whole context. +All templates live in the `templates` directory. If you are not sure what variables are available in a template, +you can place `{{ __tera_context }}` in the template to print the whole context. -A few variables are available on all templates minus RSS and sitemap: +A few variables are available on all templates except RSS and the sitemap: - `config`: the [configuration](@/documentation/getting-started/configuration.md) without any modifications -- `current_path`: the path (full URL without the `base_url`) of the current page, never starting with a `/` -- `current_url`: the full URL for that page -- `lang`: the language for that page, `null` if the page/section doesn't have a language set +- `current_path`: the path (full URL without `base_url`) of the current page, never starting with a `/` +- `current_url`: the full URL for the current page +- `lang`: the language for the current page; `null` if the page/section doesn't have a language set -The 404 template does not get `current_path` and `current_url` as it cannot know it. +The 404 template does not get `current_path` and `current_url` (this information cannot be determined). -## Standard Templates +## Standard templates By default, Zola will look for three templates: `index.html`, which is applied to the site homepage; `section.html`, which is applied to all sections (any HTML page generated by creating a directory within your `content` directory); and -`page.html`, which is applied to all pages (any HTML page generated by creating a +`page.html`, which is applied to all pages (any HTML page generated by creating an `.md` file within your `content` directory). The homepage is always a section (regardless of whether it contains other pages). Thus, the `index.html` and `section.html` templates both have access to the section variables. The `page.html` template has access to the page variables. -The page and section variables are described in more detail in the next section of this documentation. +The page and section variables are described in more detail in the next section. -## Built-in Templates -Zola comes with three built-in templates: `rss.xml`, `sitemap.xml`, and -`robots.txt` (each described in their own section of this documentation). +## Built-in templates +Zola comes with three built-in templates: `rss.xml`, `sitemap.xml` and +`robots.txt` (each is described in its own section of this documentation). Additionally, themes can add their own templates, which will be applied if not overridden. You can override built-in or theme templates by creating a template with -same name in the correct path. For example, you can override the RSS template by +the same name in the correct path. For example, you can override the RSS template by creating a `templates/rss.xml` file. -## Custom Templates -In addition to the standard `index.html`, `section.html`, and `page.html` templates, -you may also create custom templates by creating a `.html` file in the `templates` -directory. These custom templates will not be used by default. Instead, the custom template will _only_ be used if you apply it by setting the `template` front-matter variable to the path for that template (or if you `include` it in another template that is applied). For example, if you created a custom template for your site's About page called `about.html`, you could apply it to your `about.md` page by including the following front matter in your `about.md` page: +## Custom templates +In addition to the standard `index.html`, `section.html` and `page.html` templates, +you may also create custom templates by creating an `.html` file in the `templates` +directory. These custom templates will not be used by default. Instead, a custom template will _only_ be used if you apply it by setting the `template` front-matter variable to the path for that template (or if you `include` it in another template that is applied). For example, if you created a custom template for your site's About page called `about.html`, you could apply it to your `about.md` page by including the following front matter in your `about.md` page: ```md +++ @@ -58,13 +58,14 @@ Custom templates are not required to live at the root of your `templates` direct For example, `product_pages/with_pictures.html` is a valid template. ## Built-in filters -Zola adds a few filters, in addition of the ones [ones already present](https://tera.netlify.com/docs#built-in-filters) in Tera. +Zola adds a few filters in addition to [those](https://tera.netlify.com/docs/templates/#built-in-filters) already present +in Tera. ### markdown Converts the given variable to HTML using Markdown. This doesn't apply any of the -features that Zola adds to Markdown: internal links, shortcodes etc won't work. +features that Zola adds to Markdown; for example, internal links and shortcodes won't work. -By default, the filter will wrap all text into a paragraph. To disable that, you can +By default, the filter will wrap all text in a paragraph. To disable this behaviour, you can pass `true` to the inline argument: ```jinja2 @@ -80,18 +81,19 @@ Decode the variable from base64. ## Built-in global functions -Zola adds a few global functions to [those in Tera](https://tera.netlify.com/docs#built-in-functions) in order to make it easier to develop complex sites. +Zola adds a few global functions to [those in Tera](https://tera.netlify.com/docs/templates/#built-in-functions) +to make it easier to develop complex sites. ### `get_page` -Takes a path to a `.md` file and returns the associated page +Takes a path to an `.md` file and returns the associated page. ```jinja2 {% set page = get_page(path="blog/page2.md") %} ``` ### `get_section` -Takes a path to a `_index.md` file and returns the associated section +Takes a path to an `_index.md` file and returns the associated section. ```jinja2 {% set section = get_section(path="blog/_index.md") %} @@ -105,14 +107,14 @@ If you only need the metadata of the section, you can pass `metadata_only=true` ### ` get_url` Gets the permalink for the given path. -If the path starts with `@/`, it will be understood as an internal -link like the ones used in markdown, starting from the root `content` directory. +If the path starts with `@/`, it will be treated as an internal +link like the ones used in Markdown, starting from the root `content` directory. ```jinja2 {% set url = get_url(path="@/blog/_index.md") %} ``` -This can also be used to get the permalinks for static assets for example if +This can also be used to get the permalinks for static assets, for example if we want to link to the file that is located at `static/css/app.css`: ```jinja2 @@ -131,7 +133,7 @@ by passing `cachebust=true` to the `get_url` function. ### `get_image_metadata` -Gets metadata for an image. Today the only supported keys are `width` and `height`. +Gets metadata for an image. Currently, the only supported keys are `width` and `height`. ```jinja2 {% set meta = get_image_metadata(path="...") %} @@ -145,8 +147,8 @@ Gets the permalink for the taxonomy item found. {% set url = get_taxonomy_url(kind="categories", name=page.taxonomies.category) %} ``` -The `name` will almost come from a variable but in case you want to do it manually, -the value should be the same as the one in the front-matter, not the slugified version. +`name` will almost always come from a variable but in case you want to do it manually, +the value should be the same as the one in the front matter, not the slugified version. ### `get_taxonomy` Gets the whole taxonomy of a specific kind. @@ -160,7 +162,7 @@ Loads data from a file or URL. Supported file types include *toml*, *json* and * Any other file type will be loaded as plain text. The `path` argument specifies the path to the data file relative to your base directory, where your `config.toml` is. -As a security precaution, If this file is outside of the main site directory, your site will fail to build. +As a security precaution, if this file is outside the main site directory, your site will fail to build. ```jinja2 {% set data = load_data(path="content/blog/story/data.toml") %} @@ -168,7 +170,7 @@ As a security precaution, If this file is outside of the main site directory, yo The optional `format` argument allows you to specify and override which data type is contained within the file specified in the `path` argument. Valid entries are `toml`, `json`, `csv` -or `plain`. If the `format` argument isn't specified, then the paths extension is used. +or `plain`. If the `format` argument isn't specified, then the path extension is used. ```jinja2 {% set data = load_data(path="content/blog/story/data.txt", format="json") %} @@ -176,8 +178,8 @@ or `plain`. If the `format` argument isn't specified, then the paths extension i Use the `plain` format for when your file has a toml/json/csv extension but you want to load it as plain text. -For *toml* and *json* the data is loaded into a structure matching the original data file, -however for *csv* there is no native notion of such a structure. Instead the data is separated +For *toml* and *json*, the data is loaded into a structure matching the original data file; +however, for *csv* there is no native notion of such a structure. Instead, the data is separated into a data structure containing *headers* and *records*. See the example below to see how this works. @@ -207,14 +209,16 @@ template: #### Remote content -Instead of using a file, you can load data from a remote URL. This can be done by specifying a `url` parameter to `load_data` rather than `path`. +Instead of using a file, you can load data from a remote URL. This can be done by specifying a `url` parameter +to `load_data` rather than `path`. ```jinja2 {% set response = load_data(url="https://api.github.com/repos/getzola/zola") %} {{ response }} ``` -By default, the response body will be returned with no parsing. This can be changed by using the `format` argument as below. +By default, the response body will be returned with no parsing. This can be changed by using the `format` argument +as below. ```jinja2 @@ -222,11 +226,13 @@ By default, the response body will be returned with no parsing. This can be chan {{ response }} ``` -#### Data Caching +#### Data caching -Data file loading and remote requests are cached in memory during build, so multiple requests aren't made to the same endpoint. -URLs are cached based on the URL, and data files are cached based on the files modified time. -The format is also taken into account when caching, so a request will be sent twice if it's loaded with 2 different formats. +Data file loading and remote requests are cached in memory during the build, so multiple requests aren't made +to the same endpoint. +URLs are cached based on the URL, and data files are cached based on the file modified time. +The format is also taken into account when caching, so a request will be sent twice if it's loaded with two +different formats. ### `trans` Gets the translation of the given `key`, for the `default_language` or the `lang`uage given diff --git a/docs/content/documentation/templates/pages-sections.md b/docs/content/documentation/templates/pages-sections.md index bbcf46a..15751a1 100644 --- a/docs/content/documentation/templates/pages-sections.md +++ b/docs/content/documentation/templates/pages-sections.md @@ -3,11 +3,11 @@ title = "Sections and Pages" weight = 20 +++ -Pages and sections are actually very similar. +Templates for pages and sections are very similar. ## Page variables Zola will try to load the `templates/page.html` template, the `page.html` template of the theme if one is used -or will render the built-in template: a blank page. +or render the built-in template (a blank page). Whichever template you decide to render, you will get a `page` variable in your template with the following fields: @@ -27,6 +27,7 @@ permalink: String; summary: String?; taxonomies: HashMap>; extra: HashMap; +toc: Array
, // Naive word count, will not work for languages without whitespace word_count: Number; // Based on https://help.medium.com/hc/en-us/articles/214991667-Read-time @@ -59,8 +60,8 @@ translations: Array; ## Section variables By default, Zola will try to load `templates/index.html` for `content/_index.md` -and `templates/section.html` for others `_index.md` files. If there isn't -one, it will render the built-in template: a blank page. +and `templates/section.html` for other `_index.md` files. If there isn't +one, it will render the built-in template (a blank page). Whichever template you decide to render, you will get a `section` variable in your template with the following fields: @@ -81,6 +82,7 @@ pages: Array; // This only contains the path to use in the `get_section` Tera function to get // the actual section object if you need it subsections: Array; +toc: Array
, // Unicode word count word_count: Number; // Based on https://help.medium.com/hc/en-us/articles/214991667-Read-time @@ -101,7 +103,7 @@ translations: Array; ## Table of contents -Both page and section templates have a `toc` variable which corresponds to an array of `Header`. +Both page and section templates have a `toc` variable that corresponds to an array of `Header`. A `Header` has the following fields: ```ts @@ -119,9 +121,9 @@ children: Array
; ## Translated content -Both page and section have a `translations` field which corresponds to an array of `TranslatedContent`. If your site is not using multiple languages, -this will always be an empty array. -A `TranslatedContent` has the following fields: +Both pages and sections have a `translations` field that corresponds to an array of `TranslatedContent`. If your +site is not using multiple languages, this will always be an empty array. +`TranslatedContent` has the following fields: ```ts // The language code for that content, empty if it is the default language @@ -130,5 +132,8 @@ lang: String?; title: String?; // A permalink to that content permalink: String; +// The path to the markdown file; useful for retrieving the full page through +// the `get_page` function. +path: String; ``` diff --git a/docs/content/documentation/templates/pagination.md b/docs/content/documentation/templates/pagination.md index d6d4ed1..3308b45 100644 --- a/docs/content/documentation/templates/pagination.md +++ b/docs/content/documentation/templates/pagination.md @@ -28,10 +28,12 @@ next: String?; pages: Array; // Which pager are we on current_index: Number; +// Total number of pages accross all the pagers +total_pages: Number; ``` -A pager is a page of the pagination: if you have 100 pages and are paginating 10 by 10, you will have 10 pagers containing -each 10 pages. +A pager is a page of the pagination; if you have 100 pages and paginate_by is set to 10, you will have 10 pagers each +containing 10 pages. ## Section diff --git a/docs/content/documentation/templates/robots.md b/docs/content/documentation/templates/robots.md index caa3d57..a6041f9 100644 --- a/docs/content/documentation/templates/robots.md +++ b/docs/content/documentation/templates/robots.md @@ -6,8 +6,8 @@ weight = 70 Zola will look for a `robots.txt` file in the `templates` directory or use the built-in one. -Robots.txt is the simplest of all templates: it only gets the config -and the default is what most site want: +Robots.txt is the simplest of all templates: it only gets `config` +and the default is what most sites want: ```jinja2 User-agent: * diff --git a/docs/content/documentation/templates/rss.md b/docs/content/documentation/templates/rss.md index 8be0a24..d2e89f7 100644 --- a/docs/content/documentation/templates/rss.md +++ b/docs/content/documentation/templates/rss.md @@ -5,14 +5,14 @@ weight = 50 If the site `config.toml` file sets `generate_rss = true`, then Zola will generate an `rss.xml` page for the site, which will live at `base_url/rss.xml`. To -generate the `rss.xml` page, Zola will look for a `rss.xml` file in the `templates` -directory or, if one does not exist, will use the use the built-in rss template. +generate the `rss.xml` page, Zola will look for an `rss.xml` file in the `templates` +directory or, if one does not exist, it will use the use the built-in rss template. **Only pages with a date will be available.** -The RSS template gets three variables in addition of the config: +The RSS template gets three variables in addition to `config`: - `feed_url`: the full url to that specific feed - `last_build_date`: the date of the latest post -- `pages`: see [the page variables](@/documentation/templates/pages-sections.md#page-variables) for +- `pages`: see [page variables](@/documentation/templates/pages-sections.md#page-variables) for a detailed description of what this contains diff --git a/docs/content/documentation/templates/sitemap.md b/docs/content/documentation/templates/sitemap.md index 74f0f5a..decd397 100644 --- a/docs/content/documentation/templates/sitemap.md +++ b/docs/content/documentation/templates/sitemap.md @@ -7,11 +7,12 @@ Zola will look for a `sitemap.xml` file in the `templates` directory or use the built-in one. If your site has more than 30 000 pages, it will automatically split -the links into multiple sitemaps as recommended by [Google](https://support.google.com/webmasters/answer/183668?hl=en): +the links into multiple sitemaps, as recommended by [Google](https://support.google.com/webmasters/answer/183668?hl=en): > All formats limit a single sitemap to 50MB (uncompressed) and 50,000 URLs. > If you have a larger file or more URLs, you will have to break your list into multiple sitemaps. -> You can optionally create a sitemap index file (a file that points to a list of sitemaps) and submit that single index file to Google. +> You can optionally create a sitemap index file (a file that points to a list of sitemaps) and submit +> that single index file to Google. In such a case, Zola will use a template called `split_sitemap_index.xml` to render the index sitemap. diff --git a/docs/content/documentation/templates/taxonomies.md b/docs/content/documentation/templates/taxonomies.md index 9b8a70f..cfebf88 100644 --- a/docs/content/documentation/templates/taxonomies.md +++ b/docs/content/documentation/templates/taxonomies.md @@ -8,7 +8,7 @@ Zola will look up the following files in the `templates` directory: - `$TAXONOMY_NAME/single.html` - `$TAXONOMY_NAME/list.html` -First, a `TaxonomyTerm` has the following fields: +First, `TaxonomyTerm` has the following fields: ```ts name: String; @@ -17,7 +17,7 @@ permalink: String; pages: Array; ``` -and a `TaxonomyConfig`: +and `TaxonomyConfig` has the following fields: ```ts name: String, @@ -30,7 +30,7 @@ rss: Bool; ### Taxonomy list (`list.html`) -This template is never paginated and therefore get the following variables in all cases. +This template is never paginated and therefore gets the following variables in all cases. ```ts // The site config @@ -64,5 +64,5 @@ term: TaxonomyTerm; lang: String; ``` -A paginated taxonomy term will also get a `paginator` variable, see the [pagination page](@/documentation/templates/pagination.md) -for more details on that. +A paginated taxonomy term will also get a `paginator` variable; see the [pagination page] +(@/documentation/templates/pagination.md) for more details. diff --git a/docs/content/documentation/themes/creating-a-theme.md b/docs/content/documentation/themes/creating-a-theme.md index 32bf10a..05b9368 100644 --- a/docs/content/documentation/themes/creating-a-theme.md +++ b/docs/content/documentation/themes/creating-a-theme.md @@ -8,9 +8,9 @@ will want to use many [Tera blocks](https://tera.netlify.com/docs#inheritance) t allow users to easily modify it. ## Getting started -As mentioned, a theme is just like any site: start with running `zola init MY_THEME_NAME`. +As mentioned, a theme is just like any site; start by running `zola init MY_THEME_NAME`. -The only thing needed to turn that site into a theme is to add `theme.toml` configuration file with the +The only thing needed to turn that site into a theme is to add a `theme.toml` configuration file with the following fields: ```toml @@ -42,11 +42,11 @@ homepage = "http://markdotto.com/" repo = "https://www.github.com/mdo/hyde" ``` -A simple theme you can use as example is [Hyde](https://github.com/Keats/hyde). +A simple theme you can use as an example is [Hyde](https://github.com/Keats/hyde). ## Working on a theme As a theme is just a site, you can simply use `zola serve` and make changes to your -theme, with live reloading working as expected. +theme, with live reload working as expected. Make sure to commit every directory (including `content`) in order for other people to be able to build the theme from your repository. @@ -65,7 +65,7 @@ of this site, the theme will require two more things: - `README.md`: a thorough README explaining how to use the theme and any other information of importance -The first step is to make sure the theme is fulfilling those three requirements: +The first step is to make sure that the theme meets the following three requirements: - have a `screenshot.png` of the theme in action with a max size of around 2000x1000 - have a thorough `README.md` explaining how to use the theme and any other information diff --git a/docs/content/documentation/themes/installing-and-using-themes.md b/docs/content/documentation/themes/installing-and-using-themes.md index f7552d9..977da4e 100644 --- a/docs/content/documentation/themes/installing-and-using-themes.md +++ b/docs/content/documentation/themes/installing-and-using-themes.md @@ -15,24 +15,24 @@ $ git clone THEME_REPO_URL ``` Cloning the repository using Git or another VCS will allow you to easily -update it but you can also simply download the files manually and paste +update. Alternatively, you can download the files manually and place them in a folder. -You can find a list of themes [on this very website](@/themes/_index.md). +You can find a list of themes [here](@/themes/_index.md). ## Using a theme -Now that you have the theme in your `themes` directory, you only need to tell -Zola to use it to get started by setting the `theme` variable of the +Now that you have the theme in your `themes` directory, you need to tell +Zola to use it by setting the `theme` variable in the [configuration file](@/documentation/getting-started/configuration.md). The theme -name has to be name of the directory you cloned the theme in. +name has to be the name of the directory you cloned the theme in. For example, if you cloned a theme in `themes/simple-blog`, the theme name to use in the configuration file is `simple-blog`. ## Customizing a theme Any file from the theme can be overriden by creating a file with the same path and name in your `templates` or `static` -directory. Here are a few examples of that, assuming the theme name is `simple-blog`: +directory. Here are a few examples of that, assuming that the theme name is `simple-blog`: ```plain templates/pages/post.html -> replace themes/simple-blog/templates/pages/post.html @@ -40,7 +40,7 @@ templates/macros.html -> replace themes/simple-blog/templates/macros.html static/js/site.js -> replace themes/simple-blog/static/js/site.js ``` -You can also choose to only override parts of a page if a theme define some blocks by extending it. If we wanted +You can also choose to only override parts of a page if a theme defines some blocks by extending it. If we wanted to only change a single block from the `post.html` page in the example above, we could do the following: ``` @@ -51,7 +51,7 @@ Some custom data {% endblock %} ``` -Most themes will also provide some variables that are meant to be overriden: this happens in the `extra` section +Most themes will also provide some variables that are meant to be overriden. This happens in the `extra` section of the [configuration file](@/documentation/getting-started/configuration.md). Let's say a theme uses a `show_twitter` variable and sets it to `false` by default. If you want to set it to `true`, you can update your `config.toml` like so: @@ -61,5 +61,5 @@ you can update your `config.toml` like so: show_twitter = false ``` -You can modify files directly in the `themes` directory but this will make updating the theme harder and live reload won't work with those -files. +You can modify files directly in the `themes` directory but this will make updating the theme harder and live reload +won't work with these files. diff --git a/docs/content/documentation/themes/overview.md b/docs/content/documentation/themes/overview.md index 46abeb3..0006684 100644 --- a/docs/content/documentation/themes/overview.md +++ b/docs/content/documentation/themes/overview.md @@ -3,10 +3,9 @@ title = "Overview" weight = 10 +++ -Zola has built-in support for themes in a way that are easy to customise -but still easy to update if needed. +Zola has built-in support for themes that makes it easy to customise and update them. All themes can use the full power of Zola, from shortcodes to Sass compilation. -A list of themes is available [on this very website](@/themes/_index.md). +A list of themes is available [here](@/themes/_index.md). diff --git a/docs/sass/_docs.scss b/docs/sass/_docs.scss index 02478b5..e73956d 100644 --- a/docs/sass/_docs.scss +++ b/docs/sass/_docs.scss @@ -49,6 +49,7 @@ font-size: 1.25rem; visibility: hidden; margin-left: -2rem; + margin-right: 0.75rem; text-decoration: none; border-bottom-color: transparent; cursor: pointer; diff --git a/snapcraft.yaml b/snapcraft.yaml index f099c8f..8964bde 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1,5 +1,5 @@ name: zola -version: 0.9.0 +version: 0.10.0 summary: A fast static site generator in a single binary with everything built-in. description: | A fast static site generator in a single binary with everything built-in. @@ -21,7 +21,7 @@ parts: zola: source-type: git source: https://github.com/getzola/zola.git - source-tag: v0.9.0 + source-tag: v0.10.0 plugin: rust rust-channel: stable build-packages: diff --git a/src/cli.rs b/src/cli.rs index 0598e75..975bb88 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,4 +1,4 @@ -use clap::{App, AppSettings, Arg, SubCommand}; +use clap::{crate_authors, crate_description, crate_version, App, AppSettings, Arg, SubCommand}; pub fn build_cli() -> App<'static, 'static> { App::new("zola") @@ -6,6 +6,14 @@ pub fn build_cli() -> App<'static, 'static> { .author(crate_authors!()) .about(crate_description!()) .setting(AppSettings::SubcommandRequiredElseHelp) + .arg( + Arg::with_name("root") + .short("r") + .long("root") + .takes_value(true) + .default_value(".") + .help("Directory to use as root of project") + ) .arg( Arg::with_name("config") .short("c") diff --git a/src/cmd/build.rs b/src/cmd/build.rs index 7ac1edc..44d5e4b 100644 --- a/src/cmd/build.rs +++ b/src/cmd/build.rs @@ -1,17 +1,18 @@ -use std::env; +use std::path::Path; use errors::Result; use site::Site; -use console; +use crate::console; pub fn build( + root_dir: &Path, config_file: &str, base_url: Option<&str>, output_dir: &str, include_drafts: bool, ) -> Result<()> { - let mut site = Site::new(env::current_dir().unwrap(), config_file)?; + let mut site = Site::new(root_dir, config_file)?; site.set_output_path(output_dir); if let Some(b) = base_url { site.set_base_url(b.to_string()); diff --git a/src/cmd/check.rs b/src/cmd/check.rs index 29fba3a..e354e7b 100644 --- a/src/cmd/check.rs +++ b/src/cmd/check.rs @@ -1,18 +1,18 @@ -use std::env; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use errors::Result; use site::Site; -use console; +use crate::console; pub fn check( + root_dir: &Path, config_file: &str, base_path: Option<&str>, base_url: Option<&str>, include_drafts: bool, ) -> Result<()> { - let bp = base_path.map(PathBuf::from).unwrap_or_else(|| env::current_dir().unwrap()); + let bp = base_path.map(PathBuf::from).unwrap_or_else(|| PathBuf::from(root_dir)); let mut site = Site::new(bp, config_file)?; // Force the checking of external links site.config.enable_check_mode(); diff --git a/src/cmd/init.rs b/src/cmd/init.rs index 92c0556..ad22bb4 100644 --- a/src/cmd/init.rs +++ b/src/cmd/init.rs @@ -1,11 +1,11 @@ use std::fs::{canonicalize, create_dir}; use std::path::Path; -use errors::Result; +use errors::{bail, Result}; use utils::fs::create_file; -use console; -use prompt::{ask_bool, ask_url}; +use crate::console; +use crate::prompt::{ask_bool, ask_url}; const CONFIG: &str = r#" # The URL the site will be built for @@ -86,9 +86,23 @@ pub fn create_new_project(name: &str) -> Result<()> { .replace("%SEARCH%", &format!("{}", search)) .replace("%HIGHLIGHT%", &format!("{}", highlight)); - create_dir(path)?; - create_file(&path.join("config.toml"), &config)?; + populate(&path, compile_sass, &config)?; + println!(); + console::success(&format!("Done! Your site was created in {:?}", canonicalize(path).unwrap())); + println!(); + console::info( + "Get started by moving into the directory and using the built-in server: `zola serve`", + ); + println!("Visit https://www.getzola.org for the full documentation."); + Ok(()) +} + +fn populate(path: &Path, compile_sass: bool, config: &str) -> Result<()> { + if !path.exists() { + create_dir(path)?; + } + create_file(&path.join("config.toml"), &config)?; create_dir(path.join("content"))?; create_dir(path.join("templates"))?; create_dir(path.join("static"))?; @@ -97,13 +111,6 @@ pub fn create_new_project(name: &str) -> Result<()> { create_dir(path.join("sass"))?; } - println!(); - console::success(&format!("Done! Your site was created in {:?}", canonicalize(path).unwrap())); - println!(); - console::info( - "Get started by moving into the directory and using the built-in server: `zola serve`", - ); - println!("Visit https://www.getzola.org for the full documentation."); Ok(()) } @@ -162,4 +169,59 @@ mod tests { remove_dir(&dir).unwrap(); assert_eq!(true, allowed); } + + #[test] + fn populate_existing_directory() { + let mut dir = temp_dir(); + dir.push("test_existing_dir"); + if dir.exists() { + remove_dir_all(&dir).expect("Could not free test directory"); + } + create_dir(&dir).expect("Could not create test directory"); + populate(&dir, true, "").expect("Could not populate zola directories"); + + assert_eq!(true, dir.join("config.toml").exists()); + assert_eq!(true, dir.join("content").exists()); + assert_eq!(true, dir.join("templates").exists()); + assert_eq!(true, dir.join("static").exists()); + assert_eq!(true, dir.join("themes").exists()); + assert_eq!(true, dir.join("sass").exists()); + + remove_dir_all(&dir).unwrap(); + } + + #[test] + fn populate_non_existing_directory() { + let mut dir = temp_dir(); + dir.push("test_non_existing_dir"); + if dir.exists() { + remove_dir_all(&dir).expect("Could not free test directory"); + } + populate(&dir, true, "").expect("Could not populate zola directories"); + + assert_eq!(true, dir.exists()); + assert_eq!(true, dir.join("config.toml").exists()); + assert_eq!(true, dir.join("content").exists()); + assert_eq!(true, dir.join("templates").exists()); + assert_eq!(true, dir.join("static").exists()); + assert_eq!(true, dir.join("themes").exists()); + assert_eq!(true, dir.join("sass").exists()); + + remove_dir_all(&dir).unwrap(); + } + + #[test] + fn populate_without_sass() { + let mut dir = temp_dir(); + dir.push("test_wihout_sass_dir"); + if dir.exists() { + remove_dir_all(&dir).expect("Could not free test directory"); + } + create_dir(&dir).expect("Could not create test directory"); + populate(&dir, false, "").expect("Could not populate zola directories"); + + assert_eq!(false, dir.join("sass").exists()); + + remove_dir_all(&dir).unwrap(); + } } diff --git a/src/cmd/livereload.js b/src/cmd/livereload.js index ae58083..01066a6 100644 --- a/src/cmd/livereload.js +++ b/src/cmd/livereload.js @@ -1 +1 @@ -!function(){return function e(t,o,n){function r(s,c){if(!o[s]){if(!t[s]){var a="function"==typeof require&&require;if(!c&&a)return a(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var h=o[s]={exports:{}};t[s][0].call(h.exports,function(e){return r(t[s][1][e]||e)},h,h.exports,e,t,o,n)}return o[s].exports}for(var i="function"==typeof require&&require,s=0;sh;)if((c=a[h++])!=c)return!0}else for(;l>h;h++)if((e||h in a)&&a[h]===o)return e||h||0;return!e&&-1}}},{"./_to-absolute-index":38,"./_to-iobject":40,"./_to-length":41}],5:[function(e,t,o){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],6:[function(e,t,o){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},{}],7:[function(e,t,o){var n=e("./_a-function");t.exports=function(e,t,o){if(n(e),void 0===t)return e;switch(o){case 1:return function(o){return e.call(t,o)};case 2:return function(o,n){return e.call(t,o,n)};case 3:return function(o,n,r){return e.call(t,o,n,r)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":1}],8:[function(e,t,o){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],9:[function(e,t,o){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":13}],10:[function(e,t,o){var n=e("./_is-object"),r=e("./_global").document,i=n(r)&&n(r.createElement);t.exports=function(e){return i?r.createElement(e):{}}},{"./_global":15,"./_is-object":21}],11:[function(e,t,o){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],12:[function(e,t,o){var n=e("./_global"),r=e("./_core"),i=e("./_hide"),s=e("./_redefine"),c=e("./_ctx"),a=function(e,t,o){var l,h,u,d,f=e&a.F,p=e&a.G,_=e&a.S,m=e&a.P,g=e&a.B,y=p?n:_?n[t]||(n[t]={}):(n[t]||{}).prototype,v=p?r:r[t]||(r[t]={}),w=v.prototype||(v.prototype={});for(l in p&&(o=t),o)u=((h=!f&&y&&void 0!==y[l])?y:o)[l],d=g&&h?c(u,n):m&&"function"==typeof u?c(Function.call,u):u,y&&s(y,l,u,e&a.U),v[l]!=u&&i(v,l,d),m&&w[l]!=u&&(w[l]=u)};n.core=r,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},{"./_core":6,"./_ctx":7,"./_global":15,"./_hide":17,"./_redefine":34}],13:[function(e,t,o){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],14:[function(e,t,o){t.exports=e("./_shared")("native-function-to-string",Function.toString)},{"./_shared":37}],15:[function(e,t,o){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],16:[function(e,t,o){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],17:[function(e,t,o){var n=e("./_object-dp"),r=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,o){return n.f(e,t,r(1,o))}:function(e,t,o){return e[t]=o,e}},{"./_descriptors":9,"./_object-dp":28,"./_property-desc":33}],18:[function(e,t,o){var n=e("./_global").document;t.exports=n&&n.documentElement},{"./_global":15}],19:[function(e,t,o){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":9,"./_dom-create":10,"./_fails":13}],20:[function(e,t,o){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":5}],21:[function(e,t,o){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],22:[function(e,t,o){"use strict";var n=e("./_object-create"),r=e("./_property-desc"),i=e("./_set-to-string-tag"),s={};e("./_hide")(s,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,o){e.prototype=n(s,{next:r(1,o)}),i(e,t+" Iterator")}},{"./_hide":17,"./_object-create":27,"./_property-desc":33,"./_set-to-string-tag":35,"./_wks":45}],23:[function(e,t,o){"use strict";var n=e("./_library"),r=e("./_export"),i=e("./_redefine"),s=e("./_hide"),c=e("./_iterators"),a=e("./_iter-create"),l=e("./_set-to-string-tag"),h=e("./_object-gpo"),u=e("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(e,t,o,p,_,m,g){a(o,t,p);var y,v,w,b=function(e){if(!d&&e in L)return L[e];switch(e){case"keys":case"values":return function(){return new o(this,e)}}return function(){return new o(this,e)}},S=t+" Iterator",R="values"==_,k=!1,L=e.prototype,x=L[u]||L["@@iterator"]||_&&L[_],j=x||b(_),C=_?R?b("entries"):j:void 0,O="Array"==t&&L.entries||x;if(O&&(w=h(O.call(new e)))!==Object.prototype&&w.next&&(l(w,S,!0),n||"function"==typeof w[u]||s(w,u,f)),R&&x&&"values"!==x.name&&(k=!0,j=function(){return x.call(this)}),n&&!g||!d&&!k&&L[u]||s(L,u,j),c[t]=j,c[S]=f,_)if(y={values:R?j:b("values"),keys:m?j:b("keys"),entries:C},g)for(v in y)v in L||i(L,v,y[v]);else r(r.P+r.F*(d||k),t,y);return y}},{"./_export":12,"./_hide":17,"./_iter-create":22,"./_iterators":25,"./_library":26,"./_object-gpo":30,"./_redefine":34,"./_set-to-string-tag":35,"./_wks":45}],24:[function(e,t,o){t.exports=function(e,t){return{value:t,done:!!e}}},{}],25:[function(e,t,o){t.exports={}},{}],26:[function(e,t,o){t.exports=!1},{}],27:[function(e,t,o){var n=e("./_an-object"),r=e("./_object-dps"),i=e("./_enum-bug-keys"),s=e("./_shared-key")("IE_PROTO"),c=function(){},a=function(){var t,o=e("./_dom-create")("iframe"),n=i.length;for(o.style.display="none",e("./_html").appendChild(o),o.src="javascript:",(t=o.contentWindow.document).open(),t.write("