Some intellij reformatting
This commit is contained in:
parent
be439d7bfb
commit
60a52fd2cc
188
Cargo.lock
generated
188
Cargo.lock
generated
|
@ -1,9 +1,9 @@
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix"
|
name = "actix"
|
||||||
version = "0.7.1"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"crossbeam-channel 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"crossbeam-channel 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -28,15 +28,15 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-web"
|
name = "actix-web"
|
||||||
version = "0.7.1"
|
version = "0.7.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -44,7 +44,7 @@ dependencies = [
|
||||||
"futures-cpupool 0.1.8 (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.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"h2 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"htmlescape 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"htmlescape 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"http 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"http 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -77,13 +77,12 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix_derive"
|
name = "actix_derive"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quote 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"syn 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -178,7 +177,7 @@ name = "base64"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -187,7 +186,7 @@ name = "base64"
|
||||||
version = "0.9.2"
|
version = "0.9.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -196,7 +195,7 @@ name = "bincode"
|
||||||
version = "1.0.1"
|
version = "1.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -227,7 +226,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byteorder"
|
name = "byteorder"
|
||||||
version = "1.2.3"
|
version = "1.2.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -240,7 +239,7 @@ name = "bytes"
|
||||||
version = "0.4.9"
|
version = "0.4.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (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.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -256,7 +255,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chrono"
|
name = "chrono"
|
||||||
version = "0.4.4"
|
version = "0.4.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -286,14 +285,6 @@ dependencies = [
|
||||||
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cmake"
|
|
||||||
version = "0.1.31"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "color_quant"
|
name = "color_quant"
|
||||||
version = "1.0.1"
|
version = "1.0.1"
|
||||||
|
@ -303,9 +294,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
name = "config"
|
name = "config"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"errors 0.1.0",
|
"errors 0.1.0",
|
||||||
"globset 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"globset 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"highlighting 0.1.0",
|
"highlighting 0.1.0",
|
||||||
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -316,11 +307,11 @@ dependencies = [
|
||||||
name = "content"
|
name = "content"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"config 0.1.0",
|
"config 0.1.0",
|
||||||
"errors 0.1.0",
|
"errors 0.1.0",
|
||||||
"front_matter 0.1.0",
|
"front_matter 0.1.0",
|
||||||
"globset 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"globset 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rendering 0.1.0",
|
"rendering 0.1.0",
|
||||||
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -333,7 +324,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cookie"
|
name = "cookie"
|
||||||
version = "0.10.1"
|
version = "0.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -480,7 +471,7 @@ version = "0.7.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -488,17 +479,6 @@ name = "dtoa"
|
||||||
version = "0.4.3"
|
version = "0.4.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "duct"
|
|
||||||
version = "0.10.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"os_pipe 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "either"
|
name = "either"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
|
@ -678,7 +658,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
name = "front_matter"
|
name = "front_matter"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"errors 0.1.0",
|
"errors 0.1.0",
|
||||||
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -777,22 +757,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "globset"
|
name = "globset"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.6 (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.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gutenberg"
|
name = "gutenberg"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-web 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-web 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"content 0.1.0",
|
"content 0.1.0",
|
||||||
"ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -813,11 +793,11 @@ name = "h2"
|
||||||
version = "0.1.10"
|
version = "0.1.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.6 (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.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"http 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"http 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -862,7 +842,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http"
|
name = "http"
|
||||||
version = "0.1.7"
|
version = "0.1.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -935,7 +915,7 @@ name = "image"
|
||||||
version = "0.19.0"
|
version = "0.19.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1012,7 +992,7 @@ name = "jpeg-decoder"
|
||||||
version = "0.1.15"
|
version = "0.1.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1061,7 +1041,7 @@ version = "0.1.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1299,19 +1279,6 @@ dependencies = [
|
||||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nix"
|
|
||||||
version = "0.10.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
version = "0.11.0"
|
version = "0.11.0"
|
||||||
|
@ -1404,16 +1371,15 @@ dependencies = [
|
||||||
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"onig_sys 68.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"onig_sys 68.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "onig_sys"
|
name = "onig_sys"
|
||||||
version = "68.0.1"
|
version = "68.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"duct 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
@ -1441,15 +1407,6 @@ dependencies = [
|
||||||
"vcpkg 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"vcpkg 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "os_pipe"
|
|
||||||
version = "0.6.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"nix 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "owning_ref"
|
name = "owning_ref"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
|
@ -1553,7 +1510,7 @@ name = "phf_shared"
|
||||||
version = "0.7.22"
|
version = "0.7.22"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1568,8 +1525,8 @@ version = "0.2.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
@ -1725,18 +1682,6 @@ dependencies = [
|
||||||
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "regex"
|
|
||||||
version = "0.2.11"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
|
@ -1754,14 +1699,6 @@ name = "regex-syntax"
|
||||||
version = "0.4.2"
|
version = "0.4.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "regex-syntax"
|
|
||||||
version = "0.5.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-syntax"
|
name = "regex-syntax"
|
||||||
version = "0.6.2"
|
version = "0.6.2"
|
||||||
|
@ -1983,19 +1920,9 @@ name = "sha1"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "shared_child"
|
|
||||||
version = "0.3.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "siphasher"
|
name = "siphasher"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2268,7 +2195,7 @@ name = "tera"
|
||||||
version = "0.11.9"
|
version = "0.11.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2535,7 +2462,7 @@ name = "trust-dns-proto"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"error-chain 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"error-chain 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"idna 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)",
|
||||||
|
@ -2778,7 +2705,7 @@ name = "ws"
|
||||||
version = "0.7.6"
|
version = "0.7.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2815,9 +2742,9 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
"checksum actix 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28b4c697e6e63280f874c1d3e30c476de1cc589efd91b32b748a17808cb4adc3"
|
"checksum actix 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0470f5163ac229ed0329f6abbd6f775591b06ec5ecbf2f2589c16ab8bd6f76b8"
|
||||||
"checksum actix-web 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1bf2bc88dea9c852b9e2fc1c509a422907e05e83d06bef510e8f493b3396f01a"
|
"checksum actix-web 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2b79aac53ea4922b114768413037f2d75d4ab039646bbf700ce152bb2678b6eb"
|
||||||
"checksum actix_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4b1dc922654b9aca7a8a31eab875fde804fa9fbd67f220f2e457787b23590f2"
|
"checksum actix_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b9d1525ef45e5e021f0b93dace157dcab5d792acb4cc78f3213787d65e2bb92"
|
||||||
"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c"
|
"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c"
|
||||||
"checksum aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c6d463cbe7ed28720b5b489e7c083eeb8f90d08be2a0d6bb9e1ffea9ce1afa"
|
"checksum aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c6d463cbe7ed28720b5b489e7c083eeb8f90d08be2a0d6bb9e1ffea9ce1afa"
|
||||||
"checksum ammonia 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8b93ecb80665873703bf3b0a77f369c96b183d8e0afaf30a3ff5ff07dfc6409"
|
"checksum ammonia 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8b93ecb80665873703bf3b0a77f369c96b183d8e0afaf30a3ff5ff07dfc6409"
|
||||||
|
@ -2835,17 +2762,16 @@ dependencies = [
|
||||||
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
|
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
|
||||||
"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789"
|
"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789"
|
||||||
"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39"
|
"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39"
|
||||||
"checksum byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "74c0b906e9446b0a2e4f760cdb3fa4b2c48cdc6db8766a845c54b6ff063fd2e9"
|
"checksum byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8389c509ec62b9fe8eca58c502a0acaf017737355615243496cde4994f8fa4f9"
|
||||||
"checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27"
|
"checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27"
|
||||||
"checksum bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e178b8e0e239e844b083d5a0d4a156b2654e67f9f80144d48398fcd736a24fb8"
|
"checksum bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e178b8e0e239e844b083d5a0d4a156b2654e67f9f80144d48398fcd736a24fb8"
|
||||||
"checksum cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "2119ea4867bd2b8ed3aecab467709720b2d55b1bcfe09f772fd68066eaf15275"
|
"checksum cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "2119ea4867bd2b8ed3aecab467709720b2d55b1bcfe09f772fd68066eaf15275"
|
||||||
"checksum cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efe5c877e17a9c717a0bf3613b2709f723202c4e4675cc8f12926ded29bcb17e"
|
"checksum cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efe5c877e17a9c717a0bf3613b2709f723202c4e4675cc8f12926ded29bcb17e"
|
||||||
"checksum chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6962c635d530328acc53ac6a955e83093fedc91c5809dfac1fa60fa470830a37"
|
"checksum chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e48d85528df61dc964aa43c5f6ca681a19cfa74939b2348d204bd08a981f2fb0"
|
||||||
"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
|
"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
|
||||||
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
||||||
"checksum cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "95470235c31c726d72bf2e1f421adc1e65b9d561bf5529612cbe1a72da1467b3"
|
|
||||||
"checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd"
|
"checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd"
|
||||||
"checksum cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "746858cae4eae40fff37e1998320068df317bc247dc91a67c6cfa053afdc2abb"
|
"checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf"
|
||||||
"checksum core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67"
|
"checksum core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67"
|
||||||
"checksum core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "065a5d7ffdcbc8fa145d6f0746f3555025b9097a9e9cda59f7467abae670c78d"
|
"checksum core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "065a5d7ffdcbc8fa145d6f0746f3555025b9097a9e9cda59f7467abae670c78d"
|
||||||
"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb"
|
"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb"
|
||||||
|
@ -2862,7 +2788,6 @@ dependencies = [
|
||||||
"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
|
"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
|
||||||
"checksum deflate 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)" = "32c8120d981901a9970a3a1c97cf8b630e0fa8c3ca31e75b6fd6fd5f9f427b31"
|
"checksum deflate 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)" = "32c8120d981901a9970a3a1c97cf8b630e0fa8c3ca31e75b6fd6fd5f9f427b31"
|
||||||
"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd"
|
"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd"
|
||||||
"checksum duct 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "166298c17c5b4fe5997b962c2f22e887c7c5adc44308eb9103ce5b66af45a423"
|
|
||||||
"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0"
|
"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0"
|
||||||
"checksum elasticlunr-rs 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4837d77a1e157489a3933b743fd774ae75074e0e390b2b7f071530048a0d87ee"
|
"checksum elasticlunr-rs 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4837d77a1e157489a3933b743fd774ae75074e0e390b2b7f071530048a0d87ee"
|
||||||
"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
|
"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
|
||||||
|
@ -2895,12 +2820,12 @@ dependencies = [
|
||||||
"checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797"
|
"checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797"
|
||||||
"checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c"
|
"checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c"
|
||||||
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
|
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
|
||||||
"checksum globset 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "142754da2c9b3722affd909f9e27f2a6700a7a303f362971e0a74c652005a43d"
|
"checksum globset 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8e49edbcc9c7fc5beb8c0a54e7319ff8bed353a2b55e85811c6281188c2a6c84"
|
||||||
"checksum h2 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6229ac66d3392dd83288fe04defd4b353354b15bbe07820d53dda063a736afcc"
|
"checksum h2 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6229ac66d3392dd83288fe04defd4b353354b15bbe07820d53dda063a736afcc"
|
||||||
"checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e"
|
"checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e"
|
||||||
"checksum html5ever 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b04478cf718862650a0bf66acaf8f2f8c906fbc703f35c916c1f4211b069a364"
|
"checksum html5ever 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b04478cf718862650a0bf66acaf8f2f8c906fbc703f35c916c1f4211b069a364"
|
||||||
"checksum htmlescape 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163"
|
"checksum htmlescape 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163"
|
||||||
"checksum http 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "4fbced8864b04c030eebcb7d0dc3a81ba5231ac559f5116a29a8ba83ecee22cd"
|
"checksum http 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0d7f7b919d476c052ff46833ac89aaf205726da8133dae61facad50ec4c9eaec"
|
||||||
"checksum httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7b6288d7db100340ca12873fd4d08ad1b8f206a9457798dfb17c018a33fee540"
|
"checksum httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7b6288d7db100340ca12873fd4d08ad1b8f206a9457798dfb17c018a33fee540"
|
||||||
"checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e"
|
"checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e"
|
||||||
"checksum hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)" = "34a590ca09d341e94cddf8e5af0bbccde205d5fbc2fa3c09dd67c7f85cea59d7"
|
"checksum hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)" = "34a590ca09d341e94cddf8e5af0bbccde205d5fbc2fa3c09dd67c7f85cea59d7"
|
||||||
|
@ -2946,7 +2871,6 @@ dependencies = [
|
||||||
"checksum native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0"
|
"checksum native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0"
|
||||||
"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
|
"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
|
||||||
"checksum new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0cdc457076c78ab54d5e0d6fa7c47981757f1e34dc39ff92787f217dede586c4"
|
"checksum new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0cdc457076c78ab54d5e0d6fa7c47981757f1e34dc39ff92787f217dede586c4"
|
||||||
"checksum nix 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b7fd5681d13fda646462cfbd4e5f2051279a89a544d50eb98c365b507246839f"
|
|
||||||
"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17"
|
"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17"
|
||||||
"checksum nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb3ddedaa14746434a02041940495bf11325c22f6d36125d3bdd56090d50a79"
|
"checksum nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb3ddedaa14746434a02041940495bf11325c22f6d36125d3bdd56090d50a79"
|
||||||
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
|
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
|
||||||
|
@ -2958,10 +2882,9 @@ dependencies = [
|
||||||
"checksum num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "630de1ef5cc79d0cdd78b7e33b81f083cbfe90de0f4b2b2f07f905867c70e9fe"
|
"checksum num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "630de1ef5cc79d0cdd78b7e33b81f083cbfe90de0f4b2b2f07f905867c70e9fe"
|
||||||
"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
|
"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
|
||||||
"checksum onig 3.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f5eeb268a4620c74ea5768c6d2ccd492d60a47a8754666b91a46bfc35cd4d1ba"
|
"checksum onig 3.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f5eeb268a4620c74ea5768c6d2ccd492d60a47a8754666b91a46bfc35cd4d1ba"
|
||||||
"checksum onig_sys 68.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c6be7c4f985508684e54f18dd37f71e66f3e1ad9318336a520d7e42f0d3ea8e"
|
"checksum onig_sys 68.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48b1fc88a091cf46a8ec67a3cd3ffd55f75d3bed741c76f253d78746ec43602b"
|
||||||
"checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985"
|
"checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985"
|
||||||
"checksum openssl-sys 0.9.33 (registry+https://github.com/rust-lang/crates.io-index)" = "d8abc04833dcedef24221a91852931df2f63e3369ae003134e70aff3645775cc"
|
"checksum openssl-sys 0.9.33 (registry+https://github.com/rust-lang/crates.io-index)" = "d8abc04833dcedef24221a91852931df2f63e3369ae003134e70aff3645775cc"
|
||||||
"checksum os_pipe 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934868c3f86ed7a39ef63d88edeac5bd49a0c843192651900e9ce1178cbbf157"
|
|
||||||
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
|
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
|
||||||
"checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac"
|
"checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac"
|
||||||
"checksum parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "69376b761943787ebd5cc85a5bc95958651a22609c5c1c2b65de21786baec72b"
|
"checksum parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "69376b761943787ebd5cc85a5bc95958651a22609c5c1c2b65de21786baec72b"
|
||||||
|
@ -2992,10 +2915,8 @@ dependencies = [
|
||||||
"checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356"
|
"checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356"
|
||||||
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
|
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
|
||||||
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
|
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
|
||||||
"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384"
|
|
||||||
"checksum regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5bbbea44c5490a1e84357ff28b7d518b4619a159fed5d25f6c1de2d19cc42814"
|
"checksum regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5bbbea44c5490a1e84357ff28b7d518b4619a159fed5d25f6c1de2d19cc42814"
|
||||||
"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e"
|
"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e"
|
||||||
"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7"
|
|
||||||
"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d"
|
"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d"
|
||||||
"checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a"
|
"checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a"
|
||||||
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
|
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
|
||||||
|
@ -3018,8 +2939,7 @@ dependencies = [
|
||||||
"checksum serde_json 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c6908c7b925cd6c590358a4034de93dbddb20c45e1d021931459fd419bf0e2"
|
"checksum serde_json 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c6908c7b925cd6c590358a4034de93dbddb20c45e1d021931459fd419bf0e2"
|
||||||
"checksum serde_urlencoded 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e703cef904312097cfceab9ce131ff6bbe09e8c964a0703345a5f49238757bc1"
|
"checksum serde_urlencoded 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e703cef904312097cfceab9ce131ff6bbe09e8c964a0703345a5f49238757bc1"
|
||||||
"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
|
"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
|
||||||
"checksum shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bcd5e483b3475af9bc2a35311c2f3bbf0bd98fde91410ab15a0d4ba3c3127b4e"
|
"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac"
|
||||||
"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
|
|
||||||
"checksum slab 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d807fd58c4181bbabed77cb3b891ba9748241a552bcc5be698faaebefc54f46e"
|
"checksum slab 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d807fd58c4181bbabed77cb3b891ba9748241a552bcc5be698faaebefc54f46e"
|
||||||
"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
|
"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
|
||||||
"checksum slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d"
|
"checksum slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d"
|
||||||
|
|
|
@ -12,7 +12,7 @@ use std::fs::File;
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use toml::{Value as Toml};
|
use toml::Value as Toml;
|
||||||
use chrono::Utc;
|
use chrono::Utc;
|
||||||
use globset::{Glob, GlobSet, GlobSetBuilder};
|
use globset::{Glob, GlobSet, GlobSetBuilder};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ use std::fs::File;
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use toml::{Value as Toml};
|
use toml::Value as Toml;
|
||||||
|
|
||||||
use errors::{Result, ResultExt};
|
use errors::{Result, ResultExt};
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ impl Theme {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Ok(Theme {extra})
|
Ok(Theme { extra })
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parses a theme file from the given path
|
/// Parses a theme file from the given path
|
||||||
|
|
|
@ -23,8 +23,8 @@ fn create_pages(number: usize, sort_by: SortBy) -> Vec<Page> {
|
||||||
for i in 0..number {
|
for i in 0..number {
|
||||||
let mut page = Page::default();
|
let mut page = Page::default();
|
||||||
match sort_by {
|
match sort_by {
|
||||||
SortBy::Weight => { page.meta.weight = Some(i); },
|
SortBy::Weight => { page.meta.weight = Some(i); }
|
||||||
SortBy::Order => { page.meta.order = Some(i); },
|
SortBy::Order => { page.meta.order = Some(i); }
|
||||||
_ => (),
|
_ => (),
|
||||||
};
|
};
|
||||||
page.raw_content = r#"
|
page.raw_content = r#"
|
||||||
|
|
|
@ -162,7 +162,6 @@ impl Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(page)
|
Ok(page)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// We need access to all pages url to render links relative to content
|
/// We need access to all pages url to render links relative to content
|
||||||
|
@ -173,14 +172,14 @@ impl Page {
|
||||||
config,
|
config,
|
||||||
&self.permalink,
|
&self.permalink,
|
||||||
permalinks,
|
permalinks,
|
||||||
anchor_insert
|
anchor_insert,
|
||||||
);
|
);
|
||||||
|
|
||||||
context.tera_context.add("page", self);
|
context.tera_context.add("page", self);
|
||||||
|
|
||||||
let res = render_content(
|
let res = render_content(
|
||||||
&self.raw_content.replacen("<!-- more -->", "<a name=\"continue-reading\"></a>", 1),
|
&self.raw_content.replacen("<!-- more -->", "<a name=\"continue-reading\"></a>", 1),
|
||||||
&context
|
&context,
|
||||||
).chain_err(|| format!("Failed to render content of {}", self.file.path.display()))?;
|
).chain_err(|| format!("Failed to render content of {}", self.file.path.display()))?;
|
||||||
self.content = res.0;
|
self.content = res.0;
|
||||||
self.toc = res.1;
|
self.toc = res.1;
|
||||||
|
@ -437,7 +436,7 @@ Hello world
|
||||||
|
|
||||||
let res = Page::from_file(
|
let res = Page::from_file(
|
||||||
nested_path.join("index.md").as_path(),
|
nested_path.join("index.md").as_path(),
|
||||||
&Config::default()
|
&Config::default(),
|
||||||
);
|
);
|
||||||
assert!(res.is_ok());
|
assert!(res.is_ok());
|
||||||
let page = res.unwrap();
|
let page = res.unwrap();
|
||||||
|
@ -463,7 +462,7 @@ Hello world
|
||||||
|
|
||||||
let res = Page::from_file(
|
let res = Page::from_file(
|
||||||
nested_path.join("index.md").as_path(),
|
nested_path.join("index.md").as_path(),
|
||||||
&Config::default()
|
&Config::default(),
|
||||||
);
|
);
|
||||||
assert!(res.is_ok());
|
assert!(res.is_ok());
|
||||||
let page = res.unwrap();
|
let page = res.unwrap();
|
||||||
|
@ -494,7 +493,7 @@ Hello world
|
||||||
|
|
||||||
let res = Page::from_file(
|
let res = Page::from_file(
|
||||||
nested_path.join("index.md").as_path(),
|
nested_path.join("index.md").as_path(),
|
||||||
&config
|
&config,
|
||||||
);
|
);
|
||||||
|
|
||||||
assert!(res.is_ok());
|
assert!(res.is_ok());
|
||||||
|
|
|
@ -91,7 +91,7 @@ impl Section {
|
||||||
return "index.html".to_string();
|
return "index.html".to_string();
|
||||||
}
|
}
|
||||||
"section.html".to_string()
|
"section.html".to_string()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ pub fn sort_pages(pages: Vec<Page>, sort_by: SortBy) -> (Vec<Page>, Vec<Page>) {
|
||||||
ord
|
ord
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
SortBy::Weight => {
|
SortBy::Weight => {
|
||||||
can_be_sorted.par_sort_unstable_by(|a, b| {
|
can_be_sorted.par_sort_unstable_by(|a, b| {
|
||||||
let ord = a.meta.weight().cmp(&b.meta.weight());
|
let ord = a.meta.weight().cmp(&b.meta.weight());
|
||||||
|
@ -44,7 +44,7 @@ pub fn sort_pages(pages: Vec<Page>, sort_by: SortBy) -> (Vec<Page>, Vec<Page>) {
|
||||||
ord
|
ord
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
_ => unreachable!()
|
_ => unreachable!()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -86,13 +86,13 @@ pub fn populate_siblings(input: &[Page], sort_by: SortBy) -> Vec<Page> {
|
||||||
next_page.lighter = None;
|
next_page.lighter = None;
|
||||||
next_page.heavier = None;
|
next_page.heavier = None;
|
||||||
new_page.lighter = Some(Box::new(next_page));
|
new_page.lighter = Some(Box::new(next_page));
|
||||||
},
|
}
|
||||||
SortBy::Date => {
|
SortBy::Date => {
|
||||||
next_page.earlier = None;
|
next_page.earlier = None;
|
||||||
next_page.later = None;
|
next_page.later = None;
|
||||||
new_page.later = Some(Box::new(next_page));
|
new_page.later = Some(Box::new(next_page));
|
||||||
},
|
}
|
||||||
SortBy::None => {}
|
SortBy::None => ()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -118,14 +118,13 @@ pub fn populate_siblings(input: &[Page], sort_by: SortBy) -> Vec<Page> {
|
||||||
previous_page.lighter = None;
|
previous_page.lighter = None;
|
||||||
previous_page.heavier = None;
|
previous_page.heavier = None;
|
||||||
new_page.heavier = Some(Box::new(previous_page));
|
new_page.heavier = Some(Box::new(previous_page));
|
||||||
},
|
}
|
||||||
SortBy::Date => {
|
SortBy::Date => {
|
||||||
previous_page.earlier = None;
|
previous_page.earlier = None;
|
||||||
previous_page.later = None;
|
previous_page.later = None;
|
||||||
new_page.earlier = Some(Box::new(previous_page));
|
new_page.earlier = Some(Box::new(previous_page));
|
||||||
},
|
|
||||||
SortBy::None => {
|
|
||||||
}
|
}
|
||||||
|
SortBy::None => {}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,5 +149,4 @@ date = 2002-10-12"#;
|
||||||
let res = split_page_content(Path::new(""), content);
|
let res = split_page_content(Path::new(""), content);
|
||||||
assert!(res.is_err());
|
assert!(res.is_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::result::{Result as StdResult};
|
use std::result::Result as StdResult;
|
||||||
|
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
use tera::{Map, Value};
|
use tera::{Map, Value};
|
||||||
|
@ -35,7 +35,7 @@ fn convert_toml_date(table: Map<String, Value>) -> Value {
|
||||||
return Value::Object(new);
|
return Value::Object(new);
|
||||||
}
|
}
|
||||||
new.insert(k, convert_toml_date(o));
|
new.insert(k, convert_toml_date(o));
|
||||||
},
|
}
|
||||||
_ => { new.insert(k, v); }
|
_ => { new.insert(k, v); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,8 +52,8 @@ fn fix_toml_dates(table: Map<String, Value>) -> Value {
|
||||||
match value {
|
match value {
|
||||||
Value::Object(mut o) => {
|
Value::Object(mut o) => {
|
||||||
new.insert(key, convert_toml_date(o));
|
new.insert(key, convert_toml_date(o));
|
||||||
},
|
}
|
||||||
_ => { new.insert(key, value); },
|
_ => { new.insert(key, value); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use syntect::parsing::SyntaxSet;
|
||||||
use syntect::highlighting::{ThemeSet, Theme};
|
use syntect::highlighting::{ThemeSet, Theme};
|
||||||
use syntect::easy::HighlightLines;
|
use syntect::easy::HighlightLines;
|
||||||
|
|
||||||
thread_local!{
|
thread_local! {
|
||||||
pub static SYNTAX_SET: SyntaxSet = {
|
pub static SYNTAX_SET: SyntaxSet = {
|
||||||
let mut ss: SyntaxSet = from_binary(include_bytes!("../../../sublime_syntaxes/newlines.packdump"));
|
let mut ss: SyntaxSet = from_binary(include_bytes!("../../../sublime_syntaxes/newlines.packdump"));
|
||||||
ss.link_syntaxes();
|
ss.link_syntaxes();
|
||||||
|
@ -15,7 +15,7 @@ thread_local!{
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
lazy_static!{
|
lazy_static! {
|
||||||
pub static ref THEME_SET: ThemeSet = from_binary(include_bytes!("../../../sublime_themes/all.themedump"));
|
pub static ref THEME_SET: ThemeSet = from_binary(include_bytes!("../../../sublime_themes/all.themedump"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ use errors::{Result, ResultExt};
|
||||||
|
|
||||||
static RESIZED_SUBDIR: &'static str = "_processed_images";
|
static RESIZED_SUBDIR: &'static str = "_processed_images";
|
||||||
|
|
||||||
lazy_static!{
|
lazy_static! {
|
||||||
pub static ref RESIZED_FILENAME: Regex = Regex::new(r#"([0-9a-f]{16})([0-9a-f]{2})[.]jpg"#).unwrap();
|
pub static ref RESIZED_FILENAME: Regex = Regex::new(r#"([0-9a-f]{16})([0-9a-f]{2})[.]jpg"#).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,13 +58,13 @@ impl ResizeOp {
|
||||||
// Validate args:
|
// Validate args:
|
||||||
match op {
|
match op {
|
||||||
"fit_width" => if width.is_none() {
|
"fit_width" => if width.is_none() {
|
||||||
return Err("op=\"fit_width\" requires a `width` argument".to_string().into())
|
return Err("op=\"fit_width\" requires a `width` argument".to_string().into());
|
||||||
},
|
},
|
||||||
"fit_height" => if height.is_none() {
|
"fit_height" => if height.is_none() {
|
||||||
return Err("op=\"fit_height\" requires a `height` argument".to_string().into())
|
return Err("op=\"fit_height\" requires a `height` argument".to_string().into());
|
||||||
},
|
},
|
||||||
"scale" | "fit" | "fill" => if width.is_none() || height.is_none() {
|
"scale" | "fit" | "fill" => if width.is_none() || height.is_none() {
|
||||||
return Err(format!("op={} requires a `width` and `height` argument", op).into())
|
return Err(format!("op={} requires a `width` and `height` argument", op).into());
|
||||||
},
|
},
|
||||||
_ => return Err(format!("Invalid image resize operation: {}", op).into())
|
_ => return Err(format!("Invalid image resize operation: {}", op).into())
|
||||||
};
|
};
|
||||||
|
@ -168,7 +168,7 @@ impl ImageOp {
|
||||||
|
|
||||||
let src_path = content_path.join(&self.source);
|
let src_path = content_path.join(&self.source);
|
||||||
if !ufs::file_stale(&src_path, target_path) {
|
if !ufs::file_stale(&src_path, target_path) {
|
||||||
return Ok(())
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut img = image::open(&src_path)?;
|
let mut img = image::open(&src_path)?;
|
||||||
|
@ -210,7 +210,7 @@ impl ImageOp {
|
||||||
img.crop(offset_w, offset_h, crop_w, crop_h)
|
img.crop(offset_w, offset_h, crop_w, crop_h)
|
||||||
.resize_exact(w, h, RESIZE_FILTER)
|
.resize_exact(w, h, RESIZE_FILTER)
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut f = File::create(target_path)?;
|
let mut f = File::create(target_path)?;
|
||||||
|
@ -275,7 +275,7 @@ impl Processor {
|
||||||
HEntry::Vacant(entry) => {
|
HEntry::Vacant(entry) => {
|
||||||
entry.insert(img_op);
|
entry.insert(img_op);
|
||||||
return 0;
|
return 0;
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we get here, that means a hash collision.
|
// If we get here, that means a hash collision.
|
||||||
|
@ -342,7 +342,7 @@ impl Processor {
|
||||||
if let Some(capts) = RESIZED_FILENAME.captures(filename.as_ref()) {
|
if let Some(capts) = RESIZED_FILENAME.captures(filename.as_ref()) {
|
||||||
let hash = u64::from_str_radix(capts.get(1).unwrap().as_str(), 16).unwrap();
|
let hash = u64::from_str_radix(capts.get(1).unwrap().as_str(), 16).unwrap();
|
||||||
let collision_id = u32::from_str_radix(
|
let collision_id = u32::from_str_radix(
|
||||||
capts.get(2).unwrap().as_str(), 16
|
capts.get(2).unwrap().as_str(), 16,
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
||||||
if collision_id > 0 || !self.img_ops.contains_key(&hash) {
|
if collision_id > 0 || !self.img_ops.contains_key(&hash) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ extern crate lazy_static;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
use reqwest::{StatusCode};
|
use reqwest::StatusCode;
|
||||||
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
|
|
|
@ -39,7 +39,7 @@ pub struct Pager<'a> {
|
||||||
/// Path to that page
|
/// Path to that page
|
||||||
path: String,
|
path: String,
|
||||||
/// All pages for the pager
|
/// All pages for the pager
|
||||||
pages: Vec<&'a Page>
|
pages: Vec<&'a Page>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Pager<'a> {
|
impl<'a> Pager<'a> {
|
||||||
|
@ -187,7 +187,7 @@ impl<'a> Paginator<'a> {
|
||||||
"pagers",
|
"pagers",
|
||||||
to_value(
|
to_value(
|
||||||
&self.pagers.iter().map(|p| p.clone_without_pages()).collect::<Vec<_>>()
|
&self.pagers.iter().map(|p| p.clone_without_pages()).collect::<Vec<_>>()
|
||||||
).unwrap()
|
).unwrap(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Variables for this specific page
|
// Variables for this specific page
|
||||||
|
@ -217,11 +217,11 @@ impl<'a> Paginator<'a> {
|
||||||
PaginationRoot::Section(s) => {
|
PaginationRoot::Section(s) => {
|
||||||
context.add("section", &s);
|
context.add("section", &s);
|
||||||
s.get_template_name()
|
s.get_template_name()
|
||||||
},
|
}
|
||||||
PaginationRoot::Taxonomy(t) => {
|
PaginationRoot::Taxonomy(t) => {
|
||||||
context.add("taxonomy", &t.kind);
|
context.add("taxonomy", &t.kind);
|
||||||
format!("{}/single.html", t.kind.name)
|
format!("{}/single.html", t.kind.name)
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
context.add("current_url", &pager.permalink);
|
context.add("current_url", &pager.permalink);
|
||||||
context.add("current_path", &pager.path);
|
context.add("current_path", &pager.path);
|
||||||
|
@ -238,7 +238,7 @@ mod tests {
|
||||||
|
|
||||||
use front_matter::SectionFrontMatter;
|
use front_matter::SectionFrontMatter;
|
||||||
use content::{Page, Section};
|
use content::{Page, Section};
|
||||||
use config::{Taxonomy as TaxonomyConfig};
|
use config::Taxonomy as TaxonomyConfig;
|
||||||
use taxonomies::{Taxonomy, TaxonomyItem};
|
use taxonomies::{Taxonomy, TaxonomyItem};
|
||||||
|
|
||||||
use super::Paginator;
|
use super::Paginator;
|
||||||
|
@ -348,7 +348,7 @@ mod tests {
|
||||||
permalink: "https://vincent.is/tags/something/".to_string(),
|
permalink: "https://vincent.is/tags/something/".to_string(),
|
||||||
pages,
|
pages,
|
||||||
};
|
};
|
||||||
let taxonomy = Taxonomy {kind: taxonomy_def, items: vec![taxonomy_item.clone()]};
|
let taxonomy = Taxonomy { kind: taxonomy_def, items: vec![taxonomy_item.clone()] };
|
||||||
let paginator = Paginator::from_taxonomy(&taxonomy, &taxonomy_item);
|
let paginator = Paginator::from_taxonomy(&taxonomy, &taxonomy_item);
|
||||||
assert_eq!(paginator.pagers.len(), 2);
|
assert_eq!(paginator.pagers.len(), 2);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ use front_matter::{PageFrontMatter, SectionFrontMatter};
|
||||||
pub fn find_parent_section<'a>(site: &'a Site, page: &Page) -> Option<&'a Section> {
|
pub fn find_parent_section<'a>(site: &'a Site, page: &Page) -> Option<&'a Section> {
|
||||||
for section in site.sections.values() {
|
for section in site.sections.values() {
|
||||||
if section.is_child_page(&page.file.path) {
|
if section.is_child_page(&page.file.path) {
|
||||||
return Some(section)
|
return Some(section);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,18 +149,18 @@ fn handle_section_editing(site: &mut Site, path: &Path) -> Result<()> {
|
||||||
SectionChangesNeeded::Sort => {
|
SectionChangesNeeded::Sort => {
|
||||||
site.sort_sections_pages(Some(path));
|
site.sort_sections_pages(Some(path));
|
||||||
site.register_tera_global_fns();
|
site.register_tera_global_fns();
|
||||||
},
|
}
|
||||||
SectionChangesNeeded::Render => site.render_section(&site.sections[path], false)?,
|
SectionChangesNeeded::Render => site.render_section(&site.sections[path], false)?,
|
||||||
SectionChangesNeeded::RenderWithPages => site.render_section(&site.sections[path], true)?,
|
SectionChangesNeeded::RenderWithPages => site.render_section(&site.sections[path], true)?,
|
||||||
// not a common enough operation to make it worth optimizing
|
// not a common enough operation to make it worth optimizing
|
||||||
SectionChangesNeeded::Delete => {
|
SectionChangesNeeded::Delete => {
|
||||||
site.populate_sections();
|
site.populate_sections();
|
||||||
site.build()?;
|
site.build()?;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return Ok(());
|
return Ok(());
|
||||||
},
|
}
|
||||||
// New section, only render that one
|
// New section, only render that one
|
||||||
None => {
|
None => {
|
||||||
site.populate_sections();
|
site.populate_sections();
|
||||||
|
@ -198,7 +198,7 @@ fn handle_page_editing(site: &mut Site, path: &Path) -> Result<()> {
|
||||||
// I can't think of a valid usecase where you would need the content
|
// I can't think of a valid usecase where you would need the content
|
||||||
// of a page through a global fn so it's commented out for now
|
// of a page through a global fn so it's commented out for now
|
||||||
// site.register_tera_global_fns();
|
// site.register_tera_global_fns();
|
||||||
return site.render_page(& site.pages[path]);
|
return site.render_page(&site.pages[path]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Front matter changed
|
// Front matter changed
|
||||||
|
@ -210,7 +210,7 @@ fn handle_page_editing(site: &mut Site, path: &Path) -> Result<()> {
|
||||||
site.populate_taxonomies()?;
|
site.populate_taxonomies()?;
|
||||||
site.register_tera_global_fns();
|
site.register_tera_global_fns();
|
||||||
site.render_taxonomies()?;
|
site.render_taxonomies()?;
|
||||||
},
|
}
|
||||||
PageChangesNeeded::Sort => {
|
PageChangesNeeded::Sort => {
|
||||||
let section_path = match find_parent_section(site, &site.pages[path]) {
|
let section_path = match find_parent_section(site, &site.pages[path]) {
|
||||||
Some(s) => s.file.path.clone(),
|
Some(s) => s.file.path.clone(),
|
||||||
|
@ -223,7 +223,7 @@ fn handle_page_editing(site: &mut Site, path: &Path) -> Result<()> {
|
||||||
site.sort_sections_pages(Some(§ion_path));
|
site.sort_sections_pages(Some(§ion_path));
|
||||||
site.register_tera_global_fns();
|
site.register_tera_global_fns();
|
||||||
site.render_index()?;
|
site.render_index()?;
|
||||||
},
|
}
|
||||||
PageChangesNeeded::Render => {
|
PageChangesNeeded::Render => {
|
||||||
if !sections_populated {
|
if !sections_populated {
|
||||||
site.populate_sections();
|
site.populate_sections();
|
||||||
|
@ -232,11 +232,11 @@ fn handle_page_editing(site: &mut Site, path: &Path) -> Result<()> {
|
||||||
site.register_tera_global_fns();
|
site.register_tera_global_fns();
|
||||||
render_parent_section!(site, path);
|
render_parent_section!(site, path);
|
||||||
site.render_page(&site.pages[path])?;
|
site.render_page(&site.pages[path])?;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
}
|
||||||
// It's a new page!
|
// It's a new page!
|
||||||
None => {
|
None => {
|
||||||
site.populate_sections();
|
site.populate_sections();
|
||||||
|
@ -310,7 +310,7 @@ pub fn after_template_change(site: &mut Site, path: &Path) -> Result<()> {
|
||||||
"page.html" => {
|
"page.html" => {
|
||||||
site.render_sections()?;
|
site.render_sections()?;
|
||||||
site.render_orphan_pages()
|
site.render_orphan_pages()
|
||||||
},
|
}
|
||||||
"section.html" => site.render_sections(),
|
"section.html" => site.render_sections(),
|
||||||
// Either the index or some unknown template changed
|
// Either the index or some unknown template changed
|
||||||
// We can't really know what this change affects so rebuild all
|
// We can't really know what this change affects so rebuild all
|
||||||
|
@ -327,7 +327,7 @@ pub fn after_template_change(site: &mut Site, path: &Path) -> Result<()> {
|
||||||
site.render_sections()?;
|
site.render_sections()?;
|
||||||
site.render_orphan_pages()?;
|
site.render_orphan_pages()?;
|
||||||
site.render_taxonomies()
|
site.render_taxonomies()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ mod tests {
|
||||||
use front_matter::{PageFrontMatter, SectionFrontMatter, SortBy};
|
use front_matter::{PageFrontMatter, SectionFrontMatter, SortBy};
|
||||||
use super::{
|
use super::{
|
||||||
find_page_front_matter_changes, find_section_front_matter_changes,
|
find_page_front_matter_changes, find_section_front_matter_changes,
|
||||||
PageChangesNeeded, SectionChangesNeeded
|
PageChangesNeeded, SectionChangesNeeded,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -35,5 +35,4 @@ impl<'a> RenderContext<'a> {
|
||||||
config,
|
config,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ pub fn markdown_to_html(content: &str, context: &RenderContext) -> Result<(Strin
|
||||||
|
|
||||||
// Business as usual
|
// Business as usual
|
||||||
Event::Text(text)
|
Event::Text(text)
|
||||||
},
|
}
|
||||||
Event::Start(Tag::CodeBlock(ref info)) => {
|
Event::Start(Tag::CodeBlock(ref info)) => {
|
||||||
if !context.config.highlight_code {
|
if !context.config.highlight_code {
|
||||||
return Event::Html(Owned("<pre><code>".to_string()));
|
return Event::Html(Owned("<pre><code>".to_string()));
|
||||||
|
@ -100,15 +100,15 @@ pub fn markdown_to_html(content: &str, context: &RenderContext) -> Result<(Strin
|
||||||
highlighter = Some(get_highlighter(&theme, info));
|
highlighter = Some(get_highlighter(&theme, info));
|
||||||
let snippet = start_coloured_html_snippet(theme);
|
let snippet = start_coloured_html_snippet(theme);
|
||||||
Event::Html(Owned(snippet))
|
Event::Html(Owned(snippet))
|
||||||
},
|
}
|
||||||
Event::End(Tag::CodeBlock(_)) => {
|
Event::End(Tag::CodeBlock(_)) => {
|
||||||
if !context.config.highlight_code {
|
if !context.config.highlight_code {
|
||||||
return Event::Html(Owned("</code></pre>\n".to_string()))
|
return Event::Html(Owned("</code></pre>\n".to_string()));
|
||||||
}
|
}
|
||||||
// reset highlight and close the code block
|
// reset highlight and close the code block
|
||||||
highlighter = None;
|
highlighter = None;
|
||||||
Event::Html(Owned("</pre>".to_string()))
|
Event::Html(Owned("</pre>".to_string()))
|
||||||
},
|
}
|
||||||
Event::Start(Tag::Image(src, title)) => {
|
Event::Start(Tag::Image(src, title)) => {
|
||||||
if is_colocated_asset_link(&src) {
|
if is_colocated_asset_link(&src) {
|
||||||
return Event::Start(
|
return Event::Start(
|
||||||
|
@ -120,7 +120,7 @@ pub fn markdown_to_html(content: &str, context: &RenderContext) -> Result<(Strin
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::Start(Tag::Image(src, title))
|
Event::Start(Tag::Image(src, title))
|
||||||
},
|
}
|
||||||
Event::Start(Tag::Link(link, title)) => {
|
Event::Start(Tag::Link(link, title)) => {
|
||||||
// A few situations here:
|
// A few situations here:
|
||||||
// - it could be a relative link (starting with `./`)
|
// - it could be a relative link (starting with `./`)
|
||||||
|
@ -166,33 +166,33 @@ pub fn markdown_to_html(content: &str, context: &RenderContext) -> Result<(Strin
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::Start(Tag::Link(Owned(fixed_link), title))
|
Event::Start(Tag::Link(Owned(fixed_link), title))
|
||||||
},
|
}
|
||||||
Event::End(Tag::Link(_, _)) => {
|
Event::End(Tag::Link(_, _)) => {
|
||||||
if in_header {
|
if in_header {
|
||||||
temp_header.push("</a>");
|
temp_header.push("</a>");
|
||||||
return Event::Html(Owned(String::new()));
|
return Event::Html(Owned(String::new()));
|
||||||
}
|
}
|
||||||
event
|
event
|
||||||
},
|
}
|
||||||
Event::Start(Tag::Code) => {
|
Event::Start(Tag::Code) => {
|
||||||
if in_header {
|
if in_header {
|
||||||
temp_header.push("<code>");
|
temp_header.push("<code>");
|
||||||
return Event::Html(Owned(String::new()));
|
return Event::Html(Owned(String::new()));
|
||||||
}
|
}
|
||||||
event
|
event
|
||||||
},
|
}
|
||||||
Event::End(Tag::Code) => {
|
Event::End(Tag::Code) => {
|
||||||
if in_header {
|
if in_header {
|
||||||
temp_header.push("</code>");
|
temp_header.push("</code>");
|
||||||
return Event::Html(Owned(String::new()));
|
return Event::Html(Owned(String::new()));
|
||||||
}
|
}
|
||||||
event
|
event
|
||||||
},
|
}
|
||||||
Event::Start(Tag::Header(num)) => {
|
Event::Start(Tag::Header(num)) => {
|
||||||
in_header = true;
|
in_header = true;
|
||||||
temp_header = TempHeader::new(num);
|
temp_header = TempHeader::new(num);
|
||||||
Event::Html(Owned(String::new()))
|
Event::Html(Owned(String::new()))
|
||||||
},
|
}
|
||||||
Event::End(Tag::Header(_)) => {
|
Event::End(Tag::Header(_)) => {
|
||||||
// End of a header, reset all the things and return the stringified
|
// End of a header, reset all the things and return the stringified
|
||||||
// version of the header
|
// version of the header
|
||||||
|
@ -202,7 +202,7 @@ pub fn markdown_to_html(content: &str, context: &RenderContext) -> Result<(Strin
|
||||||
headers.push(temp_header.clone());
|
headers.push(temp_header.clone());
|
||||||
temp_header = TempHeader::default();
|
temp_header = TempHeader::default();
|
||||||
Event::Html(Owned(val))
|
Event::Html(Owned(val))
|
||||||
},
|
}
|
||||||
_ => event,
|
_ => event,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,7 +7,7 @@ use ::context::RenderContext;
|
||||||
|
|
||||||
// This include forces recompiling this source file if the grammar file changes.
|
// This include forces recompiling this source file if the grammar file changes.
|
||||||
// Uncomment it when doing changes to the .pest file
|
// Uncomment it when doing changes to the .pest file
|
||||||
const _GRAMMAR: &str = include_str!("content.pest");
|
const _GRAMMAR: &str = include_str!("content.pest");
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
#[grammar = "content.pest"]
|
#[grammar = "content.pest"]
|
||||||
|
@ -35,10 +35,10 @@ fn parse_literal(pair: Pair<Rule>) -> Value {
|
||||||
Rule::string => val = Some(Value::String(replace_string_markers(p.as_str()))),
|
Rule::string => val = Some(Value::String(replace_string_markers(p.as_str()))),
|
||||||
Rule::float => {
|
Rule::float => {
|
||||||
val = Some(to_value(p.as_str().parse::<f64>().unwrap()).unwrap());
|
val = Some(to_value(p.as_str().parse::<f64>().unwrap()).unwrap());
|
||||||
},
|
}
|
||||||
Rule::int => {
|
Rule::int => {
|
||||||
val = Some(to_value(p.as_str().parse::<i64>().unwrap()).unwrap());
|
val = Some(to_value(p.as_str().parse::<i64>().unwrap()).unwrap());
|
||||||
},
|
}
|
||||||
_ => unreachable!("Unknown literal: {:?}", p)
|
_ => unreachable!("Unknown literal: {:?}", p)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -53,14 +53,14 @@ fn parse_shortcode_call(pair: Pair<Rule>) -> (String, Map<String, Value>) {
|
||||||
|
|
||||||
for p in pair.into_inner() {
|
for p in pair.into_inner() {
|
||||||
match p.as_rule() {
|
match p.as_rule() {
|
||||||
Rule::ident => { name = Some(p.into_span().as_str().to_string()); },
|
Rule::ident => { name = Some(p.into_span().as_str().to_string()); }
|
||||||
Rule::kwarg => {
|
Rule::kwarg => {
|
||||||
let mut arg_name = None;
|
let mut arg_name = None;
|
||||||
let mut arg_val = None;
|
let mut arg_val = None;
|
||||||
for p2 in p.into_inner() {
|
for p2 in p.into_inner() {
|
||||||
match p2.as_rule() {
|
match p2.as_rule() {
|
||||||
Rule::ident => { arg_name = Some(p2.into_span().as_str().to_string()); },
|
Rule::ident => { arg_name = Some(p2.into_span().as_str().to_string()); }
|
||||||
Rule::literal => { arg_val = Some(parse_literal(p2)); },
|
Rule::literal => { arg_val = Some(parse_literal(p2)); }
|
||||||
Rule::array => {
|
Rule::array => {
|
||||||
let mut vals = vec![];
|
let mut vals = vec![];
|
||||||
for p3 in p2.into_inner() {
|
for p3 in p2.into_inner() {
|
||||||
|
@ -70,13 +70,13 @@ fn parse_shortcode_call(pair: Pair<Rule>) -> (String, Map<String, Value>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arg_val = Some(Value::Array(vals));
|
arg_val = Some(Value::Array(vals));
|
||||||
},
|
}
|
||||||
_ => unreachable!("Got something unexpected in a kwarg: {:?}", p2),
|
_ => unreachable!("Got something unexpected in a kwarg: {:?}", p2),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
args.insert(arg_name.unwrap(), arg_val.unwrap());
|
args.insert(arg_name.unwrap(), arg_val.unwrap());
|
||||||
},
|
}
|
||||||
_ => unreachable!("Got something unexpected in a shortcode: {:?}", p)
|
_ => unreachable!("Got something unexpected in a shortcode: {:?}", p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ pub fn render_shortcodes(content: &str, context: &RenderContext) -> Result<Strin
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
bail!("{}", fancy_e);
|
bail!("{}", fancy_e);
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// We have at least a `page` pair
|
// We have at least a `page` pair
|
||||||
|
@ -139,7 +139,7 @@ pub fn render_shortcodes(content: &str, context: &RenderContext) -> Result<Strin
|
||||||
Rule::inline_shortcode => {
|
Rule::inline_shortcode => {
|
||||||
let (name, args) = parse_shortcode_call(p);
|
let (name, args) = parse_shortcode_call(p);
|
||||||
res.push_str(&render_shortcode(name, args, context, None)?);
|
res.push_str(&render_shortcode(name, args, context, None)?);
|
||||||
},
|
}
|
||||||
Rule::shortcode_with_body => {
|
Rule::shortcode_with_body => {
|
||||||
let mut inner = p.into_inner();
|
let mut inner = p.into_inner();
|
||||||
// 3 items in inner: call, body, end
|
// 3 items in inner: call, body, end
|
||||||
|
@ -147,14 +147,14 @@ pub fn render_shortcodes(content: &str, context: &RenderContext) -> Result<Strin
|
||||||
let (name, args) = parse_shortcode_call(inner.next().unwrap());
|
let (name, args) = parse_shortcode_call(inner.next().unwrap());
|
||||||
let body = inner.next().unwrap().into_span().as_str();
|
let body = inner.next().unwrap().into_span().as_str();
|
||||||
res.push_str(&render_shortcode(name, args, context, Some(body))?);
|
res.push_str(&render_shortcode(name, args, context, Some(body))?);
|
||||||
},
|
}
|
||||||
Rule::ignored_inline_shortcode => {
|
Rule::ignored_inline_shortcode => {
|
||||||
res.push_str(
|
res.push_str(
|
||||||
&p.into_span().as_str()
|
&p.into_span().as_str()
|
||||||
.replacen("{{/*", "{{", 1)
|
.replacen("{{/*", "{{", 1)
|
||||||
.replacen("*/}}", "}}", 1)
|
.replacen("*/}}", "}}", 1)
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
Rule::ignored_shortcode_with_body => {
|
Rule::ignored_shortcode_with_body => {
|
||||||
for p2 in p.into_inner() {
|
for p2 in p.into_inner() {
|
||||||
match p2.as_rule() {
|
match p2.as_rule() {
|
||||||
|
@ -164,12 +164,12 @@ pub fn render_shortcodes(content: &str, context: &RenderContext) -> Result<Strin
|
||||||
.replacen("{%/*", "{%", 1)
|
.replacen("{%/*", "{%", 1)
|
||||||
.replacen("*/%}", "%}", 1)
|
.replacen("*/%}", "%}", 1)
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
Rule::text_in_ignored_body_sc => res.push_str(p2.into_span().as_str()),
|
Rule::text_in_ignored_body_sc => res.push_str(p2.into_span().as_str()),
|
||||||
_ => unreachable!("Got something weird in an ignored shortcode: {:?}", p2),
|
_ => unreachable!("Got something weird in an ignored shortcode: {:?}", p2),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
_ => unreachable!("unexpected page rule: {:?}", p.as_rule()),
|
_ => unreachable!("unexpected page rule: {:?}", p.as_rule()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,6 @@ mod tests {
|
||||||
r#"{% youtube() %}
|
r#"{% youtube() %}
|
||||||
Some text
|
Some text
|
||||||
{% end %}"#,
|
{% end %}"#,
|
||||||
|
|
||||||
r#"{% youtube(id=1,
|
r#"{% youtube(id=1,
|
||||||
autoplay=true, url='hey') %}
|
autoplay=true, url='hey') %}
|
||||||
Some text
|
Some text
|
||||||
|
@ -261,7 +260,6 @@ mod tests {
|
||||||
r#"{%/* youtube() */%}
|
r#"{%/* youtube() */%}
|
||||||
Some text
|
Some text
|
||||||
{%/* end */%}"#,
|
{%/* end */%}"#,
|
||||||
|
|
||||||
r#"{%/* youtube(id=1,
|
r#"{%/* youtube(id=1,
|
||||||
autoplay=true, url='hey') */%}
|
autoplay=true, url='hey') */%}
|
||||||
Some text
|
Some text
|
||||||
|
|
|
@ -58,9 +58,9 @@ impl TempHeader {
|
||||||
};
|
};
|
||||||
|
|
||||||
match insert_anchor {
|
match insert_anchor {
|
||||||
InsertAnchor::None => format!("<h{lvl} id=\"{id}\">{t}</h{lvl}>\n", lvl=self.level, t=self.title, id=self.id),
|
InsertAnchor::None => format!("<h{lvl} id=\"{id}\">{t}</h{lvl}>\n", lvl = self.level, t = self.title, id = self.id),
|
||||||
InsertAnchor::Left => format!("<h{lvl} id=\"{id}\">{a}{t}</h{lvl}>\n", lvl=self.level, a=anchor_link, t=self.title, id=self.id),
|
InsertAnchor::Left => format!("<h{lvl} id=\"{id}\">{a}{t}</h{lvl}>\n", lvl = self.level, a = anchor_link, t = self.title, id = self.id),
|
||||||
InsertAnchor::Right => format!("<h{lvl} id=\"{id}\">{t}{a}</h{lvl}>\n", lvl=self.level, a=anchor_link, t=self.title, id=self.id),
|
InsertAnchor::Right => format!("<h{lvl} id=\"{id}\">{t}{a}</h{lvl}>\n", lvl = self.level, a = anchor_link, t = self.title, id = self.id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,10 +287,10 @@ impl Site {
|
||||||
/// Adds global fns that are to be available to shortcodes while rendering markdown
|
/// Adds global fns that are to be available to shortcodes while rendering markdown
|
||||||
pub fn register_early_global_fns(&mut self) {
|
pub fn register_early_global_fns(&mut self) {
|
||||||
self.tera.register_global_function(
|
self.tera.register_global_function(
|
||||||
"get_url", global_fns::make_get_url(self.permalinks.clone(), self.config.clone())
|
"get_url", global_fns::make_get_url(self.permalinks.clone(), self.config.clone()),
|
||||||
);
|
);
|
||||||
self.tera.register_global_function(
|
self.tera.register_global_function(
|
||||||
"resize_image", global_fns::make_resize_image(self.imageproc.clone())
|
"resize_image", global_fns::make_resize_image(self.imageproc.clone()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ impl Site {
|
||||||
self.tera.register_global_function("get_section", global_fns::make_get_section(&self.sections));
|
self.tera.register_global_function("get_section", global_fns::make_get_section(&self.sections));
|
||||||
self.tera.register_global_function(
|
self.tera.register_global_function(
|
||||||
"get_taxonomy",
|
"get_taxonomy",
|
||||||
global_fns::make_get_taxonomy(self.taxonomies.clone())
|
global_fns::make_get_taxonomy(self.taxonomies.clone()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -419,7 +419,7 @@ impl Site {
|
||||||
.filter(|p| !p.is_draft())
|
.filter(|p| !p.is_draft())
|
||||||
.cloned()
|
.cloned()
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.as_slice()
|
.as_slice(),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -430,7 +430,7 @@ impl Site {
|
||||||
if let Some(port) = self.live_reload {
|
if let Some(port) = self.live_reload {
|
||||||
return html.replace(
|
return html.replace(
|
||||||
"</body>",
|
"</body>",
|
||||||
&format!(r#"<script src="/livereload.js?port={}&mindelay=10"></script></body>"#, port)
|
&format!(r#"<script src="/livereload.js?port={}&mindelay=10"></script></body>"#, port),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,7 +443,7 @@ impl Site {
|
||||||
if let Some(ref theme) = self.config.theme {
|
if let Some(ref theme) = self.config.theme {
|
||||||
copy_directory(
|
copy_directory(
|
||||||
&self.base_path.join("themes").join(theme).join("static"),
|
&self.base_path.join("themes").join(theme).join("static"),
|
||||||
&self.output_path
|
&self.output_path,
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
// We're fine with missing static folders
|
// We're fine with missing static folders
|
||||||
|
@ -656,7 +656,7 @@ impl Site {
|
||||||
context.insert("config", &self.config);
|
context.insert("config", &self.config);
|
||||||
create_file(
|
create_file(
|
||||||
&self.output_path.join("404.html"),
|
&self.output_path.join("404.html"),
|
||||||
&render_template("404.html", &self.tera, &context, &self.config.theme)?
|
&render_template("404.html", &self.tera, &context, &self.config.theme)?,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -665,7 +665,7 @@ impl Site {
|
||||||
ensure_directory_exists(&self.output_path)?;
|
ensure_directory_exists(&self.output_path)?;
|
||||||
create_file(
|
create_file(
|
||||||
&self.output_path.join("robots.txt"),
|
&self.output_path.join("robots.txt"),
|
||||||
&render_template("robots.txt", &self.tera, &Context::new(), &self.config.theme)?
|
&render_template("robots.txt", &self.tera, &Context::new(), &self.config.theme)?,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,7 +681,7 @@ impl Site {
|
||||||
|
|
||||||
fn render_taxonomy(&self, taxonomy: &Taxonomy) -> Result<()> {
|
fn render_taxonomy(&self, taxonomy: &Taxonomy) -> Result<()> {
|
||||||
if taxonomy.items.is_empty() {
|
if taxonomy.items.is_empty() {
|
||||||
return Ok(())
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure_directory_exists(&self.output_path)?;
|
ensure_directory_exists(&self.output_path)?;
|
||||||
|
@ -698,7 +698,7 @@ impl Site {
|
||||||
// TODO: can we get rid of `clone()`?
|
// TODO: can we get rid of `clone()`?
|
||||||
self.render_rss_feed(
|
self.render_rss_feed(
|
||||||
Some(item.pages.clone()),
|
Some(item.pages.clone()),
|
||||||
Some(&PathBuf::from(format!("{}/{}", taxonomy.kind.name, item.slug)))
|
Some(&PathBuf::from(format!("{}/{}", taxonomy.kind.name, item.slug))),
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -866,7 +866,7 @@ impl Site {
|
||||||
pub fn render_index(&self) -> Result<()> {
|
pub fn render_index(&self) -> Result<()> {
|
||||||
self.render_section(
|
self.render_section(
|
||||||
&self.sections[&self.content_path.join("_index.md")],
|
&self.sections[&self.content_path.join("_index.md")],
|
||||||
false
|
false,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,9 +164,9 @@ mod tests {
|
||||||
fn can_make_taxonomies() {
|
fn can_make_taxonomies() {
|
||||||
let mut config = Config::default();
|
let mut config = Config::default();
|
||||||
config.taxonomies = vec![
|
config.taxonomies = vec![
|
||||||
Taxonomy {name: "categories".to_string(), ..Taxonomy::default()},
|
Taxonomy { name: "categories".to_string(), ..Taxonomy::default() },
|
||||||
Taxonomy {name: "tags".to_string(), ..Taxonomy::default()},
|
Taxonomy { name: "tags".to_string(), ..Taxonomy::default() },
|
||||||
Taxonomy {name: "authors".to_string(), ..Taxonomy::default()},
|
Taxonomy { name: "authors".to_string(), ..Taxonomy::default() },
|
||||||
];
|
];
|
||||||
let mut page1 = Page::default();
|
let mut page1 = Page::default();
|
||||||
let mut taxo_page1 = HashMap::new();
|
let mut taxo_page1 = HashMap::new();
|
||||||
|
@ -234,7 +234,7 @@ mod tests {
|
||||||
fn errors_on_unknown_taxonomy() {
|
fn errors_on_unknown_taxonomy() {
|
||||||
let mut config = Config::default();
|
let mut config = Config::default();
|
||||||
config.taxonomies = vec![
|
config.taxonomies = vec![
|
||||||
Taxonomy {name: "authors".to_string(), ..Taxonomy::default()},
|
Taxonomy { name: "authors".to_string(), ..Taxonomy::default() },
|
||||||
];
|
];
|
||||||
let mut page1 = Page::default();
|
let mut page1 = Page::default();
|
||||||
let mut taxo_page1 = HashMap::new();
|
let mut taxo_page1 = HashMap::new();
|
||||||
|
|
|
@ -51,7 +51,7 @@ pub fn base64_decode(value: Value, _: HashMap<String, Value>) -> TeraResult<Valu
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use tera::{to_value};
|
use tera::to_value;
|
||||||
|
|
||||||
use super::{markdown, base64_decode, base64_encode};
|
use super::{markdown, base64_decode, base64_encode};
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,7 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn can_get_taxonomy() {
|
fn can_get_taxonomy() {
|
||||||
let taxo_config = TaxonomyConfig {name: "tags".to_string(), ..TaxonomyConfig::default()};
|
let taxo_config = TaxonomyConfig { name: "tags".to_string(), ..TaxonomyConfig::default() };
|
||||||
let tag = TaxonomyItem::new(
|
let tag = TaxonomyItem::new(
|
||||||
"Prog amming",
|
"Prog amming",
|
||||||
"tags",
|
"tags",
|
||||||
|
|
|
@ -99,7 +99,7 @@ pub fn file_stale<PS, PT>(p_source: PS, p_target: PT) -> bool where PS: AsRef<Pa
|
||||||
let p_source = p_source.as_ref();
|
let p_source = p_source.as_ref();
|
||||||
let p_target = p_target.as_ref();
|
let p_target = p_target.as_ref();
|
||||||
|
|
||||||
if ! p_target.exists() {
|
if !p_target.exists() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ mod tests {
|
||||||
|
|
||||||
use tempfile::tempdir;
|
use tempfile::tempdir;
|
||||||
|
|
||||||
use super::{find_related_assets};
|
use super::find_related_assets;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn can_find_related_assets() {
|
fn can_find_related_assets() {
|
||||||
|
|
|
@ -26,7 +26,7 @@ pub fn resolve_internal_link(link: &str, permalinks: &HashMap<String, String>) -
|
||||||
} else {
|
} else {
|
||||||
Ok(p.to_string())
|
Ok(p.to_string())
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
None => bail!(format!("Relative link {} not found.", link)),
|
None => bail!(format!("Relative link {} not found.", link)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,13 +37,13 @@ pub fn render_template(name: &str, tera: &Tera, context: &Context, theme: &Optio
|
||||||
match name {
|
match name {
|
||||||
"index.html" | "section.html" => {
|
"index.html" | "section.html" => {
|
||||||
render_default_tpl!(name, "https://www.getgutenberg.io/documentation/templates/pages-sections/#section-variables")
|
render_default_tpl!(name, "https://www.getgutenberg.io/documentation/templates/pages-sections/#section-variables")
|
||||||
},
|
}
|
||||||
"page.html" => {
|
"page.html" => {
|
||||||
render_default_tpl!(name, "https://www.getgutenberg.io/documentation/templates/pages-sections/#page-variables")
|
render_default_tpl!(name, "https://www.getgutenberg.io/documentation/templates/pages-sections/#page-variables")
|
||||||
},
|
}
|
||||||
"single.html" | "list.html" => {
|
"single.html" | "list.html" => {
|
||||||
render_default_tpl!(name, "https://www.getgutenberg.io/documentation/templates/taxonomies/")
|
render_default_tpl!(name, "https://www.getgutenberg.io/documentation/templates/taxonomies/")
|
||||||
},
|
}
|
||||||
_ => bail!("Tried to render `{}` but the template wasn't found", name)
|
_ => bail!("Tried to render `{}` but the template wasn't found", name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue