From bb5cdc0b6cd37cc71fadfde93917d6b7d3d0f088 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 12 Mar 2018 18:31:11 +0100 Subject: [PATCH 01/30] Update deps --- Cargo.lock | 188 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 124 insertions(+), 64 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e933f480..b2959dc7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,8 +8,11 @@ dependencies = [ [[package]] name = "ansi_term" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "arrayvec" @@ -21,7 +24,7 @@ dependencies = [ [[package]] name = "atty" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", @@ -46,7 +49,7 @@ name = "backtrace-sys" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -83,7 +86,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -127,7 +130,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -146,11 +149,11 @@ dependencies = [ [[package]] name = "clap" -version = "2.30.0" +version = "2.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -163,7 +166,7 @@ name = "cmake" version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -174,8 +177,8 @@ dependencies = [ "errors 0.1.0", "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "highlighting 0.1.0", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -189,7 +192,7 @@ dependencies = [ "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rendering 0.1.0", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -307,9 +310,9 @@ dependencies = [ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -375,7 +378,7 @@ dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.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.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -383,7 +386,7 @@ name = "gutenberg" version = "0.3.2" dependencies = [ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)", "content 0.1.0", "ctrlc 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", @@ -586,7 +589,7 @@ name = "miniz-sys" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -608,7 +611,7 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -617,10 +620,10 @@ dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -792,8 +795,8 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -866,7 +869,7 @@ dependencies = [ "base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -878,6 +881,14 @@ dependencies = [ "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pulldown-cmark" version = "0.1.2" @@ -892,6 +903,14 @@ name = "quote" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "quote" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand" version = "0.3.22" @@ -961,12 +980,12 @@ dependencies = [ [[package]] name = "regex" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.4 (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.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.5.2 (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)", ] @@ -976,6 +995,14 @@ name = "regex-syntax" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "regex-syntax" +version = "0.5.2" +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]] name = "remove_dir_all" version = "0.3.0" @@ -994,9 +1021,9 @@ dependencies = [ "highlighting 0.1.0", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", @@ -1028,12 +1055,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "sass-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sass-sys" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1053,37 +1080,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.27" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.27" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive_internals 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive_internals" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1118,8 +1146,8 @@ dependencies = [ "pagination 0.1.0", "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sass-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "taxonomies 0.1.0", "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", @@ -1138,6 +1166,11 @@ name = "slab" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "slab" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "slug" version = "0.1.2" @@ -1172,6 +1205,16 @@ dependencies = [ "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syn" +version = "0.12.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "synom" version = "0.11.3" @@ -1193,9 +1236,9 @@ dependencies = [ "onig 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1208,8 +1251,8 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", @@ -1251,9 +1294,9 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1317,7 +1360,7 @@ name = "toml" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1338,6 +1381,11 @@ dependencies = [ "unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ucd-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicase" version = "1.4.2" @@ -1369,6 +1417,11 @@ name = "unicode-xid" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unidecode" version = "0.2.0" @@ -1476,7 +1529,7 @@ dependencies = [ "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1510,9 +1563,9 @@ dependencies = [ [metadata] "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" -"checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" -"checksum atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8352656fd42c30a0c3c89d26dea01e3b77c0ab2af18230835c15e2e13cd51859" +"checksum atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "af80143d6f7608d746df1520709e5d141c96f240b0e62b0aa41bdfb53374d9d4" "checksum backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2" "checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" "checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" @@ -1526,10 +1579,10 @@ dependencies = [ "checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" "checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27" "checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" -"checksum cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9be26b24e988625409b19736d130f0c7d224f01d06454b5f81d8d23d6c1a618f" +"checksum cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fedf677519ac9e865c4ff43ef8f930773b37ed6e6ea61b6b83b400a7b5787f49" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" -"checksum clap 2.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1c07b9257a00f3fc93b7f3c417fc15607ec7a56823bc2c37ec744e266387de5b" +"checksum clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dc18f6f4005132120d9711636b32c46a233fad94df6217fa1d81c5e97a9f200" "checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59796cc6cbbdc6bb319161349db0c3250ec73ec7fcb763a51065ec4e2e158552" @@ -1576,7 +1629,7 @@ dependencies = [ "checksum mime_guess 1.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b7e2b09d08313f84e0fb82d13a4d859109a17543fe9af3b6d941dc1431f7de79" "checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" "checksum mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a637d1ca14eacae06296a008fa7ad955347e34efcb5891cfd8ba05491a37907e" -"checksum mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7da01a5e23070d92d99b1ecd1cd0af36447c6fd44b0fe283c2db199fa136724f" +"checksum mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "6d771e3ef92d58a8da8df7d6976bfca9371ed1de6619d9d5a5ce5b1f29b85bfe" "checksum miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3e690c5df6b2f60acd45d56378981e827ff8295562fc8d34f573deb267a59cd1" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" @@ -1604,37 +1657,42 @@ dependencies = [ "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" "checksum plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c61ac2afed2856590ae79d6f358a24b85ece246d2aa134741a66d589519b7503" "checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" +"checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" "checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" +"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" "checksum rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "485541959c8ecc49865526fe6c4de9653dd6e60d829d6edf0be228167b60372d" "checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8" "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5be5347bde0c48cfd8c3fdc0766cdfe9d8a755ef84d620d6794c778c91de8b2b" +"checksum regex 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0a33e44e4f5dbeb5619910f68b874d85b01e15f86fa7bb0fbc41bbd148883a48" "checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" +"checksum regex-syntax 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d8337992c33b62cf49462a1ce4d0eedbb021f48de017e40ec307cca445df0ca9" "checksum remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d2f806b0fcdabd98acd380dc8daef485e22bcb7cddc811d1337967f2528cf5" "checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" "checksum sass-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90f8cf6e645aa843ffffcbdc1e8752b1f221dfa314c81895aeb229a77aea7e05" -"checksum sass-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8bc8cb11c6906ced0e62751f93fa1f30216612a182d4e9a7d8ace302834b1742" +"checksum sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a71105d35ea2c3622fceb9128897115932c698561940a453452744413faf3561" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sequence_trie 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "32157204e5c9d3c04007bd7e56e96e987635ce0e8e23c085b1e403861b76c351" -"checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526" -"checksum serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ba7591cfe93755e89eeecdbcc668885624829b020050e6aec99c2a03bd3fd0" -"checksum serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e03f1c9530c3fb0a0a5c9b826bdd9246a5921ae995d75f512ac917fc4dd55b5" -"checksum serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "57781ed845b8e742fc2bf306aba8e3b408fe8c366b900e3769fbc39f49eb8b39" +"checksum serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4763b773978e495252615e814d2ad04773b2c1f85421c7913869a537f35cb406" +"checksum serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8ab31f00ae5574bb643c196d5e302961c122da1c768604c6d16a35c5d551948a" +"checksum serde_derive_internals 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc848d073be32cd982380c06587ea1d433bc1a4c4a111de07ec2286a3ddade8" +"checksum serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "fab6c4d75bedcf880711c85e39ebf8ccc70d0eba259899047ec5d7436643ee17" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bcd5e483b3475af9bc2a35311c2f3bbf0bd98fde91410ab15a0d4ba3c3127b4e" "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.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 slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f5ff4b43cb07b86c5f9236c92714a22cdf9e5a27a7d85e398e2c9403328cb8" "checksum staticfile 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "babd3fa68bb7e3994ce181c5f21ff3ff5fffef7b18b8a10163b45e4dafc6fb86" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" +"checksum syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "8c5bc2d6ff27891209efa5f63e9de78648d7801f085e4653701a692ce938d6fd" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db9fffcb25a761118df53811bd1cfcd54cf57fcbc51e1ea3167ae263477129ad" "checksum tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f73eebdb68c14bcb24aef74ea96079830e7fa7b31a6106e42ea7ee887c1e134e" @@ -1649,11 +1707,13 @@ dependencies = [ "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" "checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" +"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unidecode 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2adb95ee07cd579ed18131f2d9e7a17c25a4b76022935c7f2460d2bfae89fd2" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" From b3b2527c5da0c63f9ffdc66d41d3b4959d2db19b Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 12 Mar 2018 20:11:03 +0100 Subject: [PATCH 02/30] TIL about serde default --- components/config/src/lib.rs | 173 ++++++++++++------------- components/content/src/page.rs | 40 +++--- components/content/src/section.rs | 4 +- components/site/src/lib.rs | 10 +- components/site/tests/site.rs | 4 +- components/templates/src/global_fns.rs | 4 +- src/cmd/init.rs | 6 + src/cmd/serve.rs | 2 +- 8 files changed, 121 insertions(+), 122 deletions(-) diff --git a/components/config/src/lib.rs b/components/config/src/lib.rs index 3f11428c..00dc1bc0 100644 --- a/components/config/src/lib.rs +++ b/components/config/src/lib.rs @@ -24,7 +24,12 @@ mod theme; use theme::Theme; +// We want a default base url for tests +static DEFAULT_BASE_URL: &'static str = "http://a-website.com"; + + #[derive(Clone, Debug, Serialize, Deserialize)] +#[serde(default)] pub struct Config { /// Base URL of the site, the only required config argument pub base_url: String, @@ -33,48 +38,47 @@ pub struct Config { pub theme: Option, /// Title of the site. Defaults to None pub title: Option, - /// Whether to highlight all code blocks found in markdown files. Defaults to false - pub highlight_code: Option, - /// Which themes to use for code highlighting. See Readme for supported themes - pub highlight_theme: Option, /// Description of the site pub description: Option, + /// The language used in the site. Defaults to "en" - pub default_language: Option, + pub default_language: String, + /// Languages list and translated strings + pub translations: HashMap, + + /// Whether to highlight all code blocks found in markdown files. Defaults to false + pub highlight_code: bool, + /// Which themes to use for code highlighting. See Readme for supported themes + /// Defaults to "base16-ocean-dark" + pub highlight_theme: String, + /// Whether to generate RSS. Defaults to false - pub generate_rss: Option, - /// The number of articles to include in the RSS feed. Defaults to unlimited - pub rss_limit: Option, + pub generate_rss: bool, + /// The number of articles to include in the RSS feed. Defaults to 10_000 + pub rss_limit: usize, /// Whether to generate tags and individual tag pages if some pages have them. Defaults to true - pub generate_tags_pages: Option, + pub generate_tags_pages: bool, /// Whether to generate categories and individual tag categories if some pages have them. Defaults to true - pub generate_categories_pages: Option, + pub generate_categories_pages: bool, + /// Whether to compile the `sass` directory and output the css files into the static folder - pub compile_sass: Option, + pub compile_sass: bool, + /// Whether to build the search index for the content + pub build_search_index: bool, /// A list of file glob patterns to ignore when processing the content folder. Defaults to none. /// Had to remove the PartialEq derive because GlobSet does not implement it. No impact /// because it's unused anyway (who wants to sort Configs?). - pub ignored_content: Option>, + pub ignored_content: Vec, #[serde(skip_serializing, skip_deserializing)] // not a typo, 2 are needed - pub ignored_content_globber: Option, - - /// Languages list and translated strings - pub translations: Option>, + pub ignored_content_globset: Option, /// All user params set in [extra] in the config - pub extra: Option>, + pub extra: HashMap, /// Set automatically when instantiating the config. Used for cachebusting pub build_timestamp: Option, } -macro_rules! set_default { - ($key: expr, $default: expr) => { - if $key.is_none() { - $key = Some($default); - } - } -} impl Config { /// Parses a string containing TOML to our Config struct @@ -85,45 +89,33 @@ impl Config { Err(e) => bail!(e) }; - set_default!(config.default_language, "en".to_string()); - set_default!(config.highlight_code, false); - set_default!(config.generate_rss, false); - set_default!(config.rss_limit, 20); - set_default!(config.generate_tags_pages, false); - set_default!(config.generate_categories_pages, false); - set_default!(config.compile_sass, false); - set_default!(config.ignored_content, Vec::new()); - set_default!(config.translations, HashMap::new()); - set_default!(config.extra, HashMap::new()); + if config.base_url.is_empty() || config.base_url == DEFAULT_BASE_URL { + bail!("A base URL is required in config.toml with key `base_url`"); + } - match config.highlight_theme { - Some(ref t) => { - if !THEME_SET.themes.contains_key(t) { - bail!("Theme {} not available", t) - } - } - None => config.highlight_theme = Some("base16-ocean-dark".to_string()) - }; + if !THEME_SET.themes.contains_key(&config.highlight_theme) { + bail!("Highlight theme {} not available", config.highlight_theme) + } config.build_timestamp = Some(Utc::now().timestamp()); - // Convert the file glob strings into a compiled glob set matcher. We want to do this once, - // at program initialization, rather than for every page, for example. We arrange for the - // globset matcher to always exist (even though it has to be an inside an Option at the - // moment because of the TOML serializer); if the glob set is empty the `is_match` function - // of the globber always returns false. - let mut glob_set_builder = GlobSetBuilder::new(); - if let Some(ref v) = config.ignored_content { - for pat in v { + if !config.ignored_content.is_empty() { + // Convert the file glob strings into a compiled glob set matcher. We want to do this once, + // at program initialization, rather than for every page, for example. We arrange for the + // globset matcher to always exist (even though it has to be an inside an Option at the + // moment because of the TOML serializer); if the glob set is empty the `is_match` function + // of the globber always returns false. + let mut glob_set_builder = GlobSetBuilder::new(); + for pat in &config.ignored_content { let glob = match Glob::new(pat) { Ok(g) => g, Err(e) => bail!("Invalid ignored_content glob pattern: {}, error = {}", pat, e) }; glob_set_builder.add(glob); } + config.ignored_content_globset = Some(glob_set_builder.build().expect("Bad ignored_content in config file.")); } - config.ignored_content_globber = Some(glob_set_builder.build().expect("Bad ignored_content in config file.")); Ok(config) } @@ -161,19 +153,17 @@ impl Config { /// Merges the extra data from the theme with the config extra data fn add_theme_extra(&mut self, theme: &Theme) -> Result<()> { - if let Some(ref mut config_extra) = self.extra { - // 3 pass merging - // 1. save config to preserve user - let original = config_extra.clone(); - // 2. inject theme extra values - for (key, val) in &theme.extra { - config_extra.entry(key.to_string()).or_insert_with(|| val.clone()); - } + // 3 pass merging + // 1. save config to preserve user + let original = self.extra.clone(); + // 2. inject theme extra values + for (key, val) in &theme.extra { + self.extra.entry(key.to_string()).or_insert_with(|| val.clone()); + } - // 3. overwrite with original config - for (key, val) in &original { - config_extra.entry(key.to_string()).or_insert_with(|| val.clone()); - } + // 3. overwrite with original config + for (key, val) in &original { + self.extra.entry(key.to_string()).or_insert_with(|| val.clone()); } Ok(()) @@ -187,27 +177,26 @@ impl Config { } } -/// Exists only for testing purposes -#[doc(hidden)] impl Default for Config { fn default() -> Config { Config { - title: Some("".to_string()), - theme: None, - base_url: "http://a-website.com/".to_string(), - highlight_code: Some(true), - highlight_theme: Some("base16-ocean-dark".to_string()), + base_url: DEFAULT_BASE_URL.to_string(), + title: None, description: None, - default_language: Some("en".to_string()), - generate_rss: Some(false), - rss_limit: Some(10_000), - generate_tags_pages: Some(true), - generate_categories_pages: Some(true), - compile_sass: Some(false), - ignored_content: Some(Vec::new()), - ignored_content_globber: Some(GlobSetBuilder::new().build().unwrap()), - translations: None, - extra: None, + theme: None, + highlight_code: true, + highlight_theme: "base16-ocean-dark".to_string(), + default_language: "en".to_string(), + generate_rss: false, + rss_limit: 10_000, + generate_tags_pages: true, + generate_categories_pages: true, + compile_sass: false, + build_search_index: false, + ignored_content: Vec::new(), + ignored_content_globset: None, + translations: HashMap::new(), + extra: HashMap::new(), build_timestamp: Some(1), } } @@ -277,7 +266,7 @@ hello = "world" let config = Config::parse(config); assert!(config.is_ok()); - assert_eq!(config.unwrap().extra.unwrap().get("hello").unwrap().as_str().unwrap(), "world"); + assert_eq!(config.unwrap().extra.get("hello").unwrap().as_str().unwrap(), "world"); } #[test] @@ -333,7 +322,7 @@ a_value = 10 "#; let theme = Theme::parse(theme_str).unwrap(); assert!(config.add_theme_extra(&theme).is_ok()); - let extra = config.extra.unwrap(); + let extra = config.extra; assert_eq!(extra["hello"].as_str().unwrap(), "world".to_string()); assert_eq!(extra["a_value"].as_integer().unwrap(), 10); } @@ -355,26 +344,26 @@ title = "A title" let config = Config::parse(config); assert!(config.is_ok()); - let translations = config.unwrap().translations.unwrap(); + let translations = config.unwrap().translations; assert_eq!(translations["fr"]["title"].as_str().unwrap(), "Un titre"); assert_eq!(translations["en"]["title"].as_str().unwrap(), "A title"); } #[test] - fn missing_ignored_content_results_in_empty_vector_and_empty_globber() { + fn missing_ignored_content_results_in_empty_vector_and_empty_globset() { let config_str = r#" title = "My site" base_url = "example.com" "#; let config = Config::parse(config_str).unwrap(); - let v = config.ignored_content.unwrap(); + let v = config.ignored_content; assert_eq!(v.len(), 0); - assert!(config.ignored_content_globber.unwrap().is_empty()); + assert!(config.ignored_content_globset.is_none()); } #[test] - fn empty_ignored_content_results_in_empty_vector_and_empty_globber() { + fn empty_ignored_content_results_in_empty_vector_and_empty_globset() { let config_str = r#" title = "My site" base_url = "example.com" @@ -382,12 +371,12 @@ ignored_content = [] "#; let config = Config::parse(config_str).unwrap(); - assert_eq!(config.ignored_content.unwrap().len(), 0); - assert!(config.ignored_content_globber.unwrap().is_empty()); + assert_eq!(config.ignored_content.len(), 0); + assert!(config.ignored_content_globset.is_none()); } #[test] - fn non_empty_ignored_content_results_in_vector_of_patterns_and_configured_globber() { + fn non_empty_ignored_content_results_in_vector_of_patterns_and_configured_globset() { let config_str = r#" title = "My site" base_url = "example.com" @@ -395,10 +384,10 @@ ignored_content = ["*.{graphml,iso}", "*.py?"] "#; let config = Config::parse(config_str).unwrap(); - let v = config.ignored_content.unwrap(); + let v = config.ignored_content; assert_eq!(v, vec!["*.{graphml,iso}", "*.py?"]); - let g = config.ignored_content_globber.unwrap(); + let g = config.ignored_content_globset.unwrap(); assert_eq!(g.len(), 2); assert!(g.is_match("foo.graphml")); assert!(g.is_match("foo.iso")); diff --git a/components/content/src/page.rs b/components/content/src/page.rs index 220a0198..c02680d2 100644 --- a/components/content/src/page.rs +++ b/components/content/src/page.rs @@ -130,23 +130,27 @@ impl Page { let mut page = Page::parse(path, &content, config)?; if page.file.name == "index" { - // `find_related_assets` only scans the immediate directory (it is not recursive) so our - // filtering only needs to work against the file_name component, not the full suffix. If - // `find_related_assets` was changed to also return files in subdirectories, we could - // use `PathBuf.strip_prefix` to remove the parent directory and then glob-filter - // against the remaining path. Note that the current behaviour effectively means that - // the `ignored_content` setting in the config file is limited to single-file glob - // patterns (no "**" patterns). - let globber = config.ignored_content_globber.as_ref().unwrap(); let parent_dir = path.parent().unwrap(); - page.assets = find_related_assets(parent_dir).into_iter() - .filter(|path| - match path.file_name() { - None => true, - Some(file) => !globber.is_match(file) - } - ).collect(); + let assets = find_related_assets(parent_dir); + if let Some(ref globset) = config.ignored_content_globset { + // `find_related_assets` only scans the immediate directory (it is not recursive) so our + // filtering only needs to work against the file_name component, not the full suffix. If + // `find_related_assets` was changed to also return files in subdirectories, we could + // use `PathBuf.strip_prefix` to remove the parent directory and then glob-filter + // against the remaining path. Note that the current behaviour effectively means that + // the `ignored_content` setting in the config file is limited to single-file glob + // patterns (no "**" patterns). + page.assets = assets.into_iter() + .filter(|path| + match path.file_name() { + None => true, + Some(file) => !globset.is_match(file) + } + ).collect(); + } else { + page.assets = assets; + } } else { page.assets = vec![]; } @@ -160,8 +164,8 @@ impl Page { pub fn render_markdown(&mut self, permalinks: &HashMap, tera: &Tera, config: &Config, anchor_insert: InsertAnchor) -> Result<()> { let context = Context::new( tera, - config.highlight_code.unwrap(), - config.highlight_theme.clone().unwrap(), + config.highlight_code, + config.highlight_theme.clone(), &self.permalink, permalinks, anchor_insert @@ -450,7 +454,7 @@ Hello world let mut gsb = GlobSetBuilder::new(); gsb.add(Glob::new("*.{js,png}").unwrap()); let mut config = Config::default(); - config.ignored_content_globber = Some(gsb.build().unwrap()); + config.ignored_content_globset = Some(gsb.build().unwrap()); let res = Page::from_file( nested_path.join("index.md").as_path(), diff --git a/components/content/src/section.rs b/components/content/src/section.rs index df94d328..8ce6dfea 100644 --- a/components/content/src/section.rs +++ b/components/content/src/section.rs @@ -100,8 +100,8 @@ impl Section { pub fn render_markdown(&mut self, permalinks: &HashMap, tera: &Tera, config: &Config) -> Result<()> { let context = Context::new( tera, - config.highlight_code.unwrap(), - config.highlight_theme.clone().unwrap(), + config.highlight_code, + config.highlight_theme.clone(), &self.permalink, permalinks, self.meta.insert_anchor_links.unwrap() diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 1e776b96..661adb8c 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -376,8 +376,8 @@ impl Site { /// Find all the tags and categories if it's asked in the config pub fn populate_tags_and_categories(&mut self) { - let generate_tags_pages = self.config.generate_tags_pages.unwrap(); - let generate_categories_pages = self.config.generate_categories_pages.unwrap(); + let generate_tags_pages = self.config.generate_tags_pages; + let generate_categories_pages = self.config.generate_categories_pages; if !generate_tags_pages && !generate_categories_pages { return; } @@ -505,7 +505,7 @@ impl Site { self.render_sections()?; self.render_orphan_pages()?; self.render_sitemap()?; - if self.config.generate_rss.unwrap() { + if self.config.generate_rss { self.render_rss_feed()?; } self.render_robots()?; @@ -521,7 +521,7 @@ impl Site { } } - if self.config.compile_sass.unwrap() { + if self.config.compile_sass { self.compile_sass(&self.base_path)?; } @@ -703,7 +703,7 @@ impl Site { let (sorted_pages, _) = sort_pages(pages, SortBy::Date); context.add("last_build_date", &sorted_pages[0].meta.date.clone().map(|d| d.to_string())); // limit to the last n elements) - context.add("pages", &sorted_pages.iter().take(self.config.rss_limit.unwrap()).collect::>()); + context.add("pages", &sorted_pages.iter().take(self.config.rss_limit).collect::>()); context.add("config", &self.config); let rss_feed_url = if self.config.base_url.ends_with('/') { diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index af82538d..efef8567 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -193,7 +193,7 @@ fn can_build_site_with_categories() { let mut path = env::current_dir().unwrap().parent().unwrap().parent().unwrap().to_path_buf(); path.push("test_site"); let mut site = Site::new(&path, "config.toml").unwrap(); - site.config.generate_categories_pages = Some(true); + site.config.generate_categories_pages = true; site.load().unwrap(); for (i, page) in site.pages.values_mut().enumerate() { @@ -247,7 +247,7 @@ fn can_build_site_with_tags() { let mut path = env::current_dir().unwrap().parent().unwrap().parent().unwrap().to_path_buf(); path.push("test_site"); let mut site = Site::new(&path, "config.toml").unwrap(); - site.config.generate_tags_pages = Some(true); + site.config.generate_tags_pages = true; site.load().unwrap(); for (i, page) in site.pages.values_mut().enumerate() { diff --git a/components/templates/src/global_fns.rs b/components/templates/src/global_fns.rs index dd149c76..468c910c 100644 --- a/components/templates/src/global_fns.rs +++ b/components/templates/src/global_fns.rs @@ -23,8 +23,8 @@ macro_rules! required_string_arg { pub fn make_trans(config: Config) -> GlobalFn { - let translations_config = config.translations.unwrap(); - let default_lang = to_value(config.default_language.unwrap()).unwrap(); + let translations_config = config.translations; + let default_lang = to_value(config.default_language).unwrap(); Box::new(move |args| -> Result { let key = required_string_arg!(args.get("key"), "`trans` requires a `key` argument."); diff --git a/src/cmd/init.rs b/src/cmd/init.rs index 5afd75e0..8aae24a0 100644 --- a/src/cmd/init.rs +++ b/src/cmd/init.rs @@ -19,6 +19,9 @@ compile_sass = %COMPILE_SASS% # Theme can be customised by setting the `highlight_theme` variable to a theme supported by Gutenberg highlight_code = %HIGHLIGHT% +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = %SEARCH% + [extra] # Put all your custom variables here "#; @@ -37,11 +40,13 @@ pub fn create_new_project(name: &str) -> Result<()> { let base_url = ask_url("> What is the URL of your site?", "https://example.com")?; let compile_sass = ask_bool("> Do you want to enable Sass compilation?", true)?; let highlight = ask_bool("> Do you want to enable syntax highlighting?", false)?; + let search = ask_bool("> Do you want to build a search index of the content?", false)?; let config = CONFIG .trim_left() .replace("%BASE_URL%", &base_url) .replace("%COMPILE_SASS%", &format!("{}", compile_sass)) + .replace("%SEARCH%", &format!("{}", search)) .replace("%HIGHLIGHT%", &format!("{}", highlight)); create_file(&path.join("config.toml"), &config)?; @@ -53,6 +58,7 @@ pub fn create_new_project(name: &str) -> Result<()> { if compile_sass { create_dir(path.join("sass"))?; } + // TODO: if search == true, copy a lunr js file embedded in gutenberg println!(); console::success(&format!("Done! Your site was created in {:?}", canonicalize(path).unwrap())); diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index dac394a7..edf6806f 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -163,7 +163,7 @@ pub fn serve(interface: &str, port: &str, output_dir: &str, base_url: &str, conf if watching_static { watchers.push("static"); } - if site.config.compile_sass.unwrap() { + if site.config.compile_sass { watchers.push("sass"); } From 2eacb8247b36f415ef57258ffcd95862e1dca657 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Fri, 16 Mar 2018 19:11:08 +0100 Subject: [PATCH 03/30] Fix config CLI option Closes #254 --- CHANGELOG.md | 5 + Cargo.lock | 2 +- Cargo.toml | 4 +- completions/_gutenberg | 4 +- completions/_gutenberg.ps1 | 141 +++++++++--------- completions/gutenberg.bash | 34 +++-- components/config/src/lib.rs | 4 +- .../getting-started/cli-usage.md | 16 +- src/cli.rs | 2 + src/main.rs | 2 +- 10 files changed, 125 insertions(+), 89 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4109564a..7cd97140 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.3.3 (unreleased) + +- Fixed config flag in CLI + + ## 0.3.2 (2018-03-05) - Fix `serve` command trying to read all files as markdown diff --git a/Cargo.lock b/Cargo.lock index b2959dc7..c3389d39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -383,7 +383,7 @@ dependencies = [ [[package]] name = "gutenberg" -version = "0.3.2" +version = "0.3.3" dependencies = [ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 8cf708c2..4448eb26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "gutenberg" -version = "0.3.2" +version = "0.3.3" authors = ["Vincent Prouillet "] license = "MIT" readme = "README.md" -description = "A static site generator with everything built-in" +description = "A fast static site generator with everything built-in" homepage = "https://github.com/Keats/gutenberg" repository = "https://github.com/Keats/gutenberg" keywords = ["static", "site", "generator", "blog"] diff --git a/completions/_gutenberg b/completions/_gutenberg index 465719fd..39ead5c7 100644 --- a/completions/_gutenberg +++ b/completions/_gutenberg @@ -15,8 +15,8 @@ _gutenberg() { local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ -'-c[Path to a config file other than config.toml]' \ -'--config[Path to a config file other than config.toml]' \ +'-c+[Path to a config file other than config.toml]' \ +'--config=[Path to a config file other than config.toml]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ diff --git a/completions/_gutenberg.ps1 b/completions/_gutenberg.ps1 index 8448a770..da561007 100644 --- a/completions/_gutenberg.ps1 +++ b/completions/_gutenberg.ps1 @@ -1,74 +1,79 @@ -@('gutenberg', './gutenberg') | %{ - Register-ArgumentCompleter -Native -CommandName $_ -ScriptBlock { - param($wordToComplete, $commandAst, $cursorPosition) +using namespace System.Management.Automation +using namespace System.Management.Automation.Language - $command = '_gutenberg' - $commandAst.CommandElements | - Select-Object -Skip 1 | - %{ - switch ($_.ToString()) { - - 'gutenberg' { - $command += '_gutenberg' - break - } - - 'init' { - $command += '_init' - break - } - - 'build' { - $command += '_build' - break - } - - 'serve' { - $command += '_serve' - break - } - - 'help' { - $command += '_help' - break - } - - default { - break - } - } - } - - $completions = @() - - switch ($command) { - - '_gutenberg' { - $completions = @('init', 'build', 'serve', 'help', '-c', '-h', '-V', '--config', '--help', '--version') - } - - '_gutenberg_init' { - $completions = @('-h', '-V', '--help', '--version') - } - - '_gutenberg_build' { - $completions = @('-h', '-V', '-u', '-o', '--help', '--version', '--base-url', '--output-dir') - } - - '_gutenberg_serve' { - $completions = @('-h', '-V', '-i', '-p', '-o', '-u', '--help', '--version', '--interface', '--port', '--output-dir', '--base-url') - } - - '_gutenberg_help' { - $completions = @('-h', '-V', '--help', '--version') - } +Register-ArgumentCompleter -Native -CommandName 'gutenberg' -ScriptBlock { + param($wordToComplete, $commandAst, $cursorPosition) + $commandElements = $commandAst.CommandElements + $command = @( + 'gutenberg' + for ($i = 1; $i -lt $commandElements.Count; $i++) { + $element = $commandElements[$i] + if ($element -isnot [StringConstantExpressionAst] -or + $element.StringConstantType -ne [StringConstantType]::BareWord -or + $element.Value.StartsWith('-')) { + break } + $element.Value + }) -join ';' - $completions | - ?{ $_ -like "$wordToComplete*" } | - Sort-Object | - %{ New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ } - } + $completions = @(switch ($command) { + 'gutenberg' { + [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Path to a config file other than config.toml') + [CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'Path to a config file other than config.toml') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') + [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') + [CompletionResult]::new('init', 'init', [CompletionResultType]::ParameterValue, 'Create a new Gutenberg project') + [CompletionResult]::new('build', 'build', [CompletionResultType]::ParameterValue, 'Builds the site') + [CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Serve the site. Rebuild and reload on change automatically') + [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Prints this message or the help of the given subcommand(s)') + break + } + 'gutenberg;init' { + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') + [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') + break + } + 'gutenberg;build' { + [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Force the base URL to be that value (default to the one in config.toml)') + [CompletionResult]::new('--base-url', 'base-url', [CompletionResultType]::ParameterName, 'Force the base URL to be that value (default to the one in config.toml)') + [CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'Outputs the generated site in the given path') + [CompletionResult]::new('--output-dir', 'output-dir', [CompletionResultType]::ParameterName, 'Outputs the generated site in the given path') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') + [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') + break + } + 'gutenberg;serve' { + [CompletionResult]::new('-i', 'i', [CompletionResultType]::ParameterName, 'Interface to bind on') + [CompletionResult]::new('--interface', 'interface', [CompletionResultType]::ParameterName, 'Interface to bind on') + [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Which port to use') + [CompletionResult]::new('--port', 'port', [CompletionResultType]::ParameterName, 'Which port to use') + [CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'Outputs the generated site in the given path') + [CompletionResult]::new('--output-dir', 'output-dir', [CompletionResultType]::ParameterName, 'Outputs the generated site in the given path') + [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Changes the base_url') + [CompletionResult]::new('--base-url', 'base-url', [CompletionResultType]::ParameterName, 'Changes the base_url') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') + [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') + break + } + 'gutenberg;help' { + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') + [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') + break + } + }) + + $completions.Where{ $_.CompletionText -like "$wordToComplete*" } | + Sort-Object -Property ListItemText } diff --git a/completions/gutenberg.bash b/completions/gutenberg.bash index 23159a5c..a9da2449 100644 --- a/completions/gutenberg.bash +++ b/completions/gutenberg.bash @@ -32,13 +32,21 @@ _gutenberg() { case "${cmd}" in gutenberg) - opts=" -c -h -V --config --help --version init build serve help" + opts=" -h -V -c --help --version --config init build serve help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 fi case "${prev}" in + --config) + COMPREPLY=($(compgen -f ${cur})) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f ${cur})) + return 0 + ;; *) COMPREPLY=() ;; @@ -56,19 +64,19 @@ _gutenberg() { case "${prev}" in --base-url) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; -u) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; --output-dir) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; -o) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; *) @@ -117,35 +125,35 @@ _gutenberg() { case "${prev}" in --interface) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; -i) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; --port) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; -p) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; --output-dir) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; -o) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; --base-url) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; -u) - COMPREPLY=("") + COMPREPLY=($(compgen -f ${cur})) return 0 ;; *) diff --git a/components/config/src/lib.rs b/components/config/src/lib.rs index 00dc1bc0..6c6951e2 100644 --- a/components/config/src/lib.rs +++ b/components/config/src/lib.rs @@ -123,8 +123,10 @@ impl Config { /// Parses a config file from the given path pub fn from_file>(path: P) -> Result { let mut content = String::new(); + let path = path.as_ref(); + let file_name = path.file_name().unwrap(); File::open(path) - .chain_err(|| "No `config.toml` file found. Are you in the right directory?")? + .chain_err(|| format!("No `{:?}` file found. Are you in the right directory?", file_name))? .read_to_string(&mut content)?; Config::parse(&content) diff --git a/docs/content/documentation/getting-started/cli-usage.md b/docs/content/documentation/getting-started/cli-usage.md index 0671041d..9aa1af44 100644 --- a/docs/content/documentation/getting-started/cli-usage.md +++ b/docs/content/documentation/getting-started/cli-usage.md @@ -13,7 +13,7 @@ the command help by running `gutenberg --help`. Creates the directory structure used by Gutenberg at the given directory. ```bash -$ gutenberg init +$ gutenberg init my_site ``` will create a new folder named `my_site` and the files/folders needed by @@ -37,10 +37,17 @@ This is useful for example when you want to deploy previews of a site to a dynam deploy previews. +You can override the default output directory 'public' by passing a other value to the `output-dir` flag. + ```bash $ gutenberg build --output-dir $DOCUMENT_ROOT ``` +You can also point to another config file than `config.toml` like so - the position of the `config` option is important: + +```bash +$ gutenberg --config config.staging.toml build +``` + ## serve This will build and serve the site using a local server. You can also specify @@ -63,3 +70,10 @@ hard refresh if possible. Gutenberg does a best-effort to live reload but some changes cannot be handled automatically. If you fail to see your change, you will need to restart `gutenberg serve`. + + +You can also point to another config file than `config.toml` like so - the position of the `config` option is important: + +```bash +$ gutenberg --config config.staging.toml serve +``` diff --git a/src/cli.rs b/src/cli.rs index 70fcfd6e..f4fc5225 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -10,6 +10,8 @@ pub fn build_cli() -> App<'static, 'static> { Arg::with_name("config") .short("c") .long("config") + .default_value("config.toml") + .takes_value(true) .help("Path to a config file other than config.toml") ) .subcommands(vec![ diff --git a/src/main.rs b/src/main.rs index 5d0fa359..2c2ea23f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,7 +29,7 @@ mod prompt; fn main() { let matches = cli::build_cli().get_matches(); - let config_file = matches.value_of("config").unwrap_or("config.toml"); + let config_file = matches.value_of("config").unwrap(); match matches.subcommand() { ("init", Some(matches)) => { From 3a2dab59743e8d193a80ddb1aa1932e1b5462322 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sat, 17 Mar 2018 14:34:01 +0100 Subject: [PATCH 04/30] Sort sitemap elements by permalink Closes #257 --- CHANGELOG.md | 1 + components/site/src/lib.rs | 39 ++++++++++--------- .../documentation/templates/sitemap.md | 2 + 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cd97140..b85c41b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 0.3.3 (unreleased) - Fixed config flag in CLI +- Sitemap entries are now sorted by permalinks to avoid random ordering ## 0.3.2 (2018-03-05) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 661adb8c..109f7d22 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -632,27 +632,26 @@ impl Site { let mut context = Context::new(); - context.add( - "pages", - &self.pages - .values() - .filter(|p| !p.is_draft()) - .map(|p| { - let date = match p.meta.date { - Some(ref d) => Some(d.to_string()), - None => None, - }; - SitemapEntry::new(p.permalink.clone(), date) - }) - .collect::>() - ); - context.add( - "sections", - &self.sections + let mut pages = self.pages + .values() + .filter(|p| !p.is_draft()) + .map(|p| { + let date = match p.meta.date { + Some(ref d) => Some(d.to_string()), + None => None, + }; + SitemapEntry::new(p.permalink.clone(), date) + }) + .collect::>(); + pages.sort_by(|a, b| a.permalink.cmp(&b.permalink)); + context.add("pages", &pages); + + let mut sections = self.sections .values() .map(|s| SitemapEntry::new(s.permalink.clone(), None)) - .collect::>() - ); + .collect::>(); + sections.sort_by(|a, b| a.permalink.cmp(&b.permalink)); + context.add("sections", §ions); let mut categories = vec![]; if let Some(ref c) = self.categories { @@ -664,6 +663,7 @@ impl Site { ); } } + categories.sort_by(|a, b| a.permalink.cmp(&b.permalink)); context.add("categories", &categories); let mut tags = vec![]; @@ -676,6 +676,7 @@ impl Site { ); } } + tags.sort_by(|a, b| a.permalink.cmp(&b.permalink)); context.add("tags", &tags); context.add("config", &self.config); diff --git a/docs/content/documentation/templates/sitemap.md b/docs/content/documentation/templates/sitemap.md index a63f3f6e..641c1ff5 100644 --- a/docs/content/documentation/templates/sitemap.md +++ b/docs/content/documentation/templates/sitemap.md @@ -21,3 +21,5 @@ all the variables above are arrays of `SitemapEntry` with the following type: permalink: String; date: String?; ``` + +All `SitemapEntry` are sorted in each variable by their permalink. From 00729581f998fcc67e1d865033f334705660ccdf Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sat, 17 Mar 2018 18:07:59 +0100 Subject: [PATCH 05/30] Break sorting ties by a-z ordering Closes #259 --- components/content/src/sorting.rs | 91 ++++++++++++++----- docs/content/documentation/content/section.md | 3 + 2 files changed, 73 insertions(+), 21 deletions(-) diff --git a/components/content/src/sorting.rs b/components/content/src/sorting.rs index 95ea20b0..89ef9c90 100644 --- a/components/content/src/sorting.rs +++ b/components/content/src/sorting.rs @@ -1,3 +1,5 @@ +use std::cmp::Ordering; + use rayon::prelude::*; use page::Page; @@ -24,9 +26,36 @@ pub fn sort_pages(pages: Vec, sort_by: SortBy) -> (Vec, Vec) { }); match sort_by { - SortBy::Date => can_be_sorted.par_sort_unstable_by(|a, b| b.meta.date().unwrap().cmp(&a.meta.date().unwrap())), - SortBy::Order => can_be_sorted.par_sort_unstable_by(|a, b| b.meta.order().cmp(&a.meta.order())), - SortBy::Weight => can_be_sorted.par_sort_unstable_by(|a, b| a.meta.weight().cmp(&b.meta.weight())), + SortBy::Date => { + can_be_sorted.par_sort_unstable_by(|a, b| { + let ord = b.meta.date().unwrap().cmp(&a.meta.date().unwrap()); + if ord == Ordering::Equal { + a.permalink.cmp(&b.permalink) + } else { + ord + } + }) + }, + SortBy::Order => { + can_be_sorted.par_sort_unstable_by(|a, b| { + let ord = b.meta.order().cmp(&a.meta.order()); + if ord == Ordering::Equal { + a.permalink.cmp(&b.permalink) + } else { + ord + } + }) + }, + SortBy::Weight => { + can_be_sorted.par_sort_unstable_by(|a, b| { + let ord = a.meta.weight().cmp(&b.meta.weight()); + if ord == Ordering::Equal { + a.permalink.cmp(&b.permalink) + } else { + ord + } + }) + }, _ => unreachable!() }; @@ -108,10 +137,13 @@ mod tests { Page::new("content/hello.md", front_matter) } - fn create_page_with_order(order: usize) -> Page { + fn create_page_with_order(order: usize, filename: &str) -> Page { let mut front_matter = PageFrontMatter::default(); front_matter.order = Some(order); - Page::new("content/hello.md", front_matter) + let mut p = Page::new("content/".to_string() + filename, front_matter); + // Faking a permalink to test sorting with equal order + p.permalink = filename.to_string(); + p } fn create_draft_page_with_order(order: usize) -> Page { @@ -144,17 +176,34 @@ mod tests { #[test] fn can_sort_by_order() { let input = vec![ - create_page_with_order(2), - create_page_with_order(3), - create_page_with_order(1), + create_page_with_order(2, "hello.md"), + create_page_with_order(3, "hello2.md"), + create_page_with_order(1, "hello3.md"), ]; let (pages, _) = sort_pages(input, SortBy::Order); - // Should be sorted by date + // Should be sorted by order assert_eq!(pages[0].clone().meta.order.unwrap(), 3); assert_eq!(pages[1].clone().meta.order.unwrap(), 2); assert_eq!(pages[2].clone().meta.order.unwrap(), 1); } + #[test] + fn can_sort_by_order_uses_permalink_to_break_ties() { + let input = vec![ + create_page_with_order(3, "b.md"), + create_page_with_order(3, "a.md"), + create_page_with_order(3, "c.md"), + ]; + let (pages, _) = sort_pages(input, SortBy::Order); + // Should be sorted by order + assert_eq!(pages[0].clone().meta.order.unwrap(), 3); + assert_eq!(pages[0].clone().permalink, "a.md"); + assert_eq!(pages[1].clone().meta.order.unwrap(), 3); + assert_eq!(pages[1].clone().permalink, "b.md"); + assert_eq!(pages[2].clone().meta.order.unwrap(), 3); + assert_eq!(pages[2].clone().permalink, "c.md"); + } + #[test] fn can_sort_by_weight() { let input = vec![ @@ -163,7 +212,7 @@ mod tests { create_page_with_weight(1), ]; let (pages, _) = sort_pages(input, SortBy::Weight); - // Should be sorted by date + // Should be sorted by weight assert_eq!(pages[0].clone().meta.weight.unwrap(), 1); assert_eq!(pages[1].clone().meta.weight.unwrap(), 2); assert_eq!(pages[2].clone().meta.weight.unwrap(), 3); @@ -172,9 +221,9 @@ mod tests { #[test] fn can_sort_by_none() { let input = vec![ - create_page_with_order(2), - create_page_with_order(3), - create_page_with_order(1), + create_page_with_order(2, "a.md"), + create_page_with_order(3, "a.md"), + create_page_with_order(1, "a.md"), ]; let (pages, _) = sort_pages(input, SortBy::None); // Should be sorted by date @@ -186,8 +235,8 @@ mod tests { #[test] fn ignore_page_with_missing_field() { let input = vec![ - create_page_with_order(2), - create_page_with_order(3), + create_page_with_order(2, "a.md"), + create_page_with_order(3, "a.md"), create_page_with_date("2019-01-01"), ]; let (pages, unsorted) = sort_pages(input, SortBy::Order); @@ -198,9 +247,9 @@ mod tests { #[test] fn can_populate_previous_and_next_pages() { let input = vec![ - create_page_with_order(1), - create_page_with_order(2), - create_page_with_order(3), + create_page_with_order(1, "a.md"), + create_page_with_order(2, "b.md"), + create_page_with_order(3, "a.md"), ]; let pages = populate_previous_and_next_pages(&input); @@ -222,9 +271,9 @@ mod tests { fn can_populate_previous_and_next_pages_skip_drafts() { let input = vec![ create_draft_page_with_order(0), - create_page_with_order(1), - create_page_with_order(2), - create_page_with_order(3), + create_page_with_order(1, "a.md"), + create_page_with_order(2, "b.md"), + create_page_with_order(3, "c.md"), create_draft_page_with_order(4), ]; let pages = populate_previous_and_next_pages(&input); diff --git a/docs/content/documentation/content/section.md b/docs/content/documentation/content/section.md index d32baa32..00739877 100644 --- a/docs/content/documentation/content/section.md +++ b/docs/content/documentation/content/section.md @@ -78,6 +78,9 @@ is enabled by setting the `sort_by` front-matter variable. Any page that cannot be sorted, for example if missing the date variable while sorting by `date`, will be ignored and won't be rendered. The terminal will warn you if this is happening. +If several pages have the same date/weight/order, their permalink will be used to break the tie following +an alphabetical order. + ### `date` This will sort all pages by their `date` field, from the most recent to the oldest. From 9fbbcca3c63ef674fd24ed0b3cb066d056bf3adb Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 16 Mar 2018 15:20:03 -0600 Subject: [PATCH 06/30] Preserve folder structure of SCSS content --- components/site/src/lib.rs | 26 +++++++++++++++++--------- components/site/tests/site.rs | 12 +++++++++++- test_site/sass/nested_sass/sass.sass | 0 test_site/sass/nested_sass/scss.scss | 0 test_site/sass/sass.sass | 0 test_site/sass/scss.scss | 0 6 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 test_site/sass/nested_sass/sass.sass create mode 100644 test_site/sass/nested_sass/scss.scss create mode 100644 test_site/sass/sass.sass create mode 100644 test_site/sass/scss.scss diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 661adb8c..eaeabc59 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -528,11 +528,16 @@ impl Site { self.copy_static_directories() } - pub fn compile_sass(&self, base_path: &PathBuf) -> Result<()> { + pub fn compile_sass(&self, base_path: &Path) -> Result<()> { ensure_directory_exists(&self.output_path)?; - let base_path = base_path.to_string_lossy().replace("\\", "/"); - let sass_glob = format!("{}/{}", base_path, "sass/**/*.scss"); + let sass_path = { + let mut sass_path = PathBuf::from(base_path); + sass_path.push("sass"); + sass_path + }; + + let sass_glob = format!("{}/**/*.scss", sass_path.display()); let files = glob(&sass_glob) .unwrap() .filter_map(|e| e.ok()) @@ -542,13 +547,16 @@ impl Site { let mut sass_options = Options::default(); sass_options.output_style = OutputStyle::Compressed; for file in files { - let name = file.as_path().file_stem().unwrap().to_string_lossy(); - let css = match compile_file(file.as_path(), sass_options.clone()) { - Ok(c) => c, - Err(e) => bail!(e) - }; + let css = compile_file(&file, sass_options.clone())?; - create_file(&self.output_path.join(format!("{}.css", name)), &css)?; + let path_inside_sass = file.strip_prefix(&sass_path).unwrap(); + let parent_inside_sass = path_inside_sass.parent(); + let css_output_path = self.output_path.join(path_inside_sass).with_extension("css"); + + if parent_inside_sass.is_some() { + create_dir_all(&css_output_path.parent().unwrap())?; + } + create_file(&css_output_path, &css)?; } Ok(()) diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index efef8567..9470b116 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -100,7 +100,7 @@ fn can_build_site_without_live_reload() { site.set_output_path(&public); site.build().unwrap(); - assert!(Path::new(&public).exists()); + assert!(&public.exists()); assert!(file_exists!(public, "index.html")); assert!(file_exists!(public, "sitemap.xml")); assert!(file_exists!(public, "robots.txt")); @@ -140,6 +140,16 @@ fn can_build_site_without_live_reload() { assert!(file_exists!(public, "sample.css")); assert!(file_exists!(public, "some.js")); + // SASS and SCSS files compile correctly + assert!(file_exists!(public, "blog.css")); + assert!(file_contains!(public, "blog.css", "red")); + assert!(file_contains!(public, "blog.css", "blue")); + assert!(!file_contains!(public, "blog.css", "@import \"included\"")); + assert!(file_contains!(public, "blog.css", "2rem")); // check include + assert!(!file_exists!(public, "_included.css")); + assert!(file_exists!(public, "scss.css")); + assert!(file_exists!(public, "nested_sass/scss.css")); + // no live reload code assert_eq!(file_contains!(public, "index.html", "/livereload.js?port=1112&mindelay=10"), false); diff --git a/test_site/sass/nested_sass/sass.sass b/test_site/sass/nested_sass/sass.sass new file mode 100644 index 00000000..e69de29b diff --git a/test_site/sass/nested_sass/scss.scss b/test_site/sass/nested_sass/scss.scss new file mode 100644 index 00000000..e69de29b diff --git a/test_site/sass/sass.sass b/test_site/sass/sass.sass new file mode 100644 index 00000000..e69de29b diff --git a/test_site/sass/scss.scss b/test_site/sass/scss.scss new file mode 100644 index 00000000..e69de29b From ea4cc63aa990e6d916766f4915e8cca978c586a6 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Sat, 17 Mar 2018 12:57:03 -0600 Subject: [PATCH 07/30] Make indented syntax available for SASS via the "sass" file extension --- components/site/src/lib.rs | 31 +++++++++++++++++++++++++------ components/site/tests/site.rs | 2 ++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index eaeabc59..01fd050d 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -537,17 +537,34 @@ impl Site { sass_path }; - let sass_glob = format!("{}/**/*.scss", sass_path.display()); - let files = glob(&sass_glob) + let mut options = Options::default(); + options.output_style = OutputStyle::Compressed; + let mut compiled_paths = self.compile_sass_glob(&sass_path, "scss", options.clone())?; + + options.indented_syntax = true; + compiled_paths.extend(self.compile_sass_glob(&sass_path, "sass", options)?); + + compiled_paths.sort(); + for window in compiled_paths.windows(2) { + if window[0].1 == window[1].1 { + bail!("SASS path conflict: \"{}\" and \"{}\" both compile to \"{}\"", window[0].0.display(), window[1].0.display(), window[0].1.display()); + } + } + + Ok(()) + } + + fn compile_sass_glob(&self, sass_path: &Path, extension: &str, options: Options) -> Result> { + let glob_string = format!("{}/**/*.{}", sass_path.display(), extension); + let files = glob(&glob_string) .unwrap() .filter_map(|e| e.ok()) .filter(|entry| !entry.as_path().file_name().unwrap().to_string_lossy().starts_with('_')) .collect::>(); - let mut sass_options = Options::default(); - sass_options.output_style = OutputStyle::Compressed; + let mut compiled_paths = Vec::new(); for file in files { - let css = compile_file(&file, sass_options.clone())?; + let css = compile_file(&file, options.clone())?; let path_inside_sass = file.strip_prefix(&sass_path).unwrap(); let parent_inside_sass = path_inside_sass.parent(); @@ -556,10 +573,12 @@ impl Site { if parent_inside_sass.is_some() { create_dir_all(&css_output_path.parent().unwrap())?; } + create_file(&css_output_path, &css)?; + compiled_paths.push((path_inside_sass.to_owned(), css_output_path)); } - Ok(()) + Ok(compiled_paths) } pub fn render_aliases(&self) -> Result<()> { diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index 9470b116..598a4f4c 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -148,6 +148,8 @@ fn can_build_site_without_live_reload() { assert!(file_contains!(public, "blog.css", "2rem")); // check include assert!(!file_exists!(public, "_included.css")); assert!(file_exists!(public, "scss.css")); + assert!(file_exists!(public, "sass.css")); + assert!(file_exists!(public, "nested_sass/sass.css")); assert!(file_exists!(public, "nested_sass/scss.css")); // no live reload code From b558b51dff14743ce6f90d7286c6a63ce05e95c4 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sat, 17 Mar 2018 20:42:06 +0100 Subject: [PATCH 08/30] Mention sass folders in docs and changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b85c41b1..cb2650f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ - Fixed config flag in CLI - Sitemap entries are now sorted by permalinks to avoid random ordering - +- Preserve directory structure from sass folder when copying compiled css files +to the public directory ## 0.3.2 (2018-03-05) From 43db3a43ff80021d08af0f8894db5c2d422f4169 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sun, 18 Mar 2018 09:34:37 +0100 Subject: [PATCH 09/30] Do not require themes to have a static folder --- CHANGELOG.md | 1 + components/site/src/lib.rs | 5 +---- .../documentation/getting-started/directory-structure.md | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb2650f1..6d83091f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Sitemap entries are now sorted by permalinks to avoid random ordering - Preserve directory structure from sass folder when copying compiled css files to the public directory +- Do not require themes to have a static folder ## 0.3.2 (2018-03-05) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 2767ccc8..a10fdaeb 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -92,14 +92,11 @@ impl Site { // Grab data from the extra section of the theme config.merge_with_theme(&path.join("themes").join(&theme).join("theme.toml"))?; - // Test that the {templates,static} folder exist for that theme + // Test that the templates folder exist for that theme let theme_path = path.join("themes").join(&theme); if !theme_path.join("templates").exists() { bail!("Theme `{}` is missing a templates folder", theme); } - if !theme_path.join("static").exists() { - bail!("Theme `{}` is missing a static folder", theme); - } let theme_tpl_glob = format!("{}/{}", path.to_string_lossy().replace("\\", "/"), "themes/**/*.html"); let mut tera_theme = Tera::parse(&theme_tpl_glob).chain_err(|| "Error parsing templates from themes")?; diff --git a/docs/content/documentation/getting-started/directory-structure.md b/docs/content/documentation/getting-started/directory-structure.md index 7ce266f1..33006da1 100644 --- a/docs/content/documentation/getting-started/directory-structure.md +++ b/docs/content/documentation/getting-started/directory-structure.md @@ -33,6 +33,8 @@ To learn more, read [the content overview](./documentation/content/overview.md). ## `sass` Contains the [Sass](http://sass-lang.com) files to be compiled. Non-Sass files will be ignored. +The directory structure of the `sass` folder will be preserved when copying over the compiled files: a file at +`sass/something/site.scss` will be compiled to `public/something/site.css`. ## `static` Contains any kind of files. All the files/folders in the `static` folder will be copied as-is in the output directory. From 0d8dc656f18a64b603781674c4bec7f19e052667 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 19 Mar 2018 10:04:48 -0600 Subject: [PATCH 10/30] CR review: s/Options/SassOptions/, break bail args in compile_sass into multiple lines --- components/site/src/lib.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 01fd050d..b16a381f 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -28,7 +28,7 @@ use std::path::{Path, PathBuf}; use glob::glob; use tera::{Tera, Context}; use walkdir::WalkDir; -use sass_rs::{Options, OutputStyle, compile_file}; +use sass_rs::{Options as SassOptions, OutputStyle, compile_file}; use errors::{Result, ResultExt}; use config::{Config, get_config}; @@ -537,7 +537,7 @@ impl Site { sass_path }; - let mut options = Options::default(); + let mut options = SassOptions::default(); options.output_style = OutputStyle::Compressed; let mut compiled_paths = self.compile_sass_glob(&sass_path, "scss", options.clone())?; @@ -547,14 +547,19 @@ impl Site { compiled_paths.sort(); for window in compiled_paths.windows(2) { if window[0].1 == window[1].1 { - bail!("SASS path conflict: \"{}\" and \"{}\" both compile to \"{}\"", window[0].0.display(), window[1].0.display(), window[0].1.display()); + bail!( + "SASS path conflict: \"{}\" and \"{}\" both compile to \"{}\"", + window[0].0.display(), + window[1].0.display(), + window[0].1.display(), + ); } } Ok(()) } - fn compile_sass_glob(&self, sass_path: &Path, extension: &str, options: Options) -> Result> { + fn compile_sass_glob(&self, sass_path: &Path, extension: &str, options: SassOptions) -> Result> { let glob_string = format!("{}/**/*.{}", sass_path.display(), extension); let files = glob(&glob_string) .unwrap() From cbb2c59b91d7d18670943e0c359d20b775d63444 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 19 Mar 2018 18:50:04 +0100 Subject: [PATCH 11/30] Add indented Sass to changelog --- CHANGELOG.md | 1 + Cargo.lock | 116 +++++++++++++++++++++++++-------------------------- 2 files changed, 59 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d83091f..46dfb3ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Preserve directory structure from sass folder when copying compiled css files to the public directory - Do not require themes to have a static folder +- Now supports indented Sass syntax ## 0.3.2 (2018-03-05) diff --git a/Cargo.lock b/Cargo.lock index c3389d39..613da997 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,7 +49,7 @@ name = "backtrace-sys" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -86,7 +86,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -130,7 +130,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -166,7 +166,7 @@ name = "cmake" version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -177,8 +177,8 @@ dependencies = [ "errors 0.1.0", "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "highlighting 0.1.0", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -190,9 +190,9 @@ dependencies = [ "errors 0.1.0", "front_matter 0.1.0", "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rendering 0.1.0", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -310,9 +310,9 @@ dependencies = [ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -378,7 +378,7 @@ dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -484,7 +484,7 @@ dependencies = [ [[package]] name = "itoa" -version = "0.3.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -589,7 +589,7 @@ name = "miniz-sys" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -722,7 +722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -730,7 +730,7 @@ name = "num-integer" version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -739,12 +739,12 @@ version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -795,8 +795,8 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -869,7 +869,7 @@ dependencies = [ "base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -933,7 +933,7 @@ dependencies = [ [[package]] name = "rayon" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -980,12 +980,12 @@ dependencies = [ [[package]] name = "regex" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.4 (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.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.5.3 (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)", ] @@ -997,7 +997,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex-syntax" -version = "0.5.2" +version = "0.5.3" 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)", @@ -1021,9 +1021,9 @@ dependencies = [ "highlighting 0.1.0", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", @@ -1080,23 +1080,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive_internals 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive_internals" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1105,13 +1105,13 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1144,10 +1144,10 @@ dependencies = [ "front_matter 0.1.0", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "pagination 0.1.0", - "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "sass-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "taxonomies 0.1.0", "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", @@ -1236,9 +1236,9 @@ dependencies = [ "onig 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1251,8 +1251,8 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", @@ -1294,9 +1294,9 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1360,7 +1360,7 @@ name = "toml" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1579,7 +1579,7 @@ dependencies = [ "checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" "checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27" "checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" -"checksum cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fedf677519ac9e865c4ff43ef8f930773b37ed6e6ea61b6b83b400a7b5787f49" +"checksum cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d9324127e719125ec8a16e6e509abc4c641e773621b50aea695af3f005656d61" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" "checksum clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dc18f6f4005132120d9711636b32c46a233fad94df6217fa1d81c5e97a9f200" @@ -1611,7 +1611,7 @@ dependencies = [ "checksum inotify 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887fcc180136e77a85e6a6128579a719027b1bab9b1c38ea4444244fe262c20c" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d8e17268922834707e1c29e8badbf9c712c9c43378e1b6a3388946baff10be2" -"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" +"checksum itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92a9df60778f789c37f76778ae8d0a2471c41baa8b059d98a5873c978f549587" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" @@ -1642,7 +1642,7 @@ dependencies = [ "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" "checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" "checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" -"checksum num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3c2bd9b9d21e48e956b763c9f37134dc62d9e95da6edb3f672cacb6caf3cd3" +"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum onig 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c54a94ac4d9f3eec22b189b8a727e2ded82aee21e8ae7ffbba2468739161b" "checksum onig_sys 67.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34d894e8da3390097d99eb197eac2ec443277551388eff0f97c5f789933350ee" @@ -1663,13 +1663,13 @@ dependencies = [ "checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" -"checksum rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "485541959c8ecc49865526fe6c4de9653dd6e60d829d6edf0be228167b60372d" +"checksum rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80e811e76f1dbf68abf87a759083d34600017fc4e10b6bd5ad84a700f9dba4b1" "checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8" "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0a33e44e4f5dbeb5619910f68b874d85b01e15f86fa7bb0fbc41bbd148883a48" +"checksum regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "aec3f58d903a7d2a9dc2bf0e41a746f4530e0cab6b615494e058f67a3ef947fb" "checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" -"checksum regex-syntax 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d8337992c33b62cf49462a1ce4d0eedbb021f48de017e40ec307cca445df0ca9" +"checksum regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b2550876c31dc914696a6c2e01cbce8afba79a93c8ae979d2fe051c0230b3756" "checksum remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d2f806b0fcdabd98acd380dc8daef485e22bcb7cddc811d1337967f2528cf5" "checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" @@ -1678,10 +1678,10 @@ dependencies = [ "checksum sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a71105d35ea2c3622fceb9128897115932c698561940a453452744413faf3561" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sequence_trie 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "32157204e5c9d3c04007bd7e56e96e987635ce0e8e23c085b1e403861b76c351" -"checksum serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4763b773978e495252615e814d2ad04773b2c1f85421c7913869a537f35cb406" -"checksum serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8ab31f00ae5574bb643c196d5e302961c122da1c768604c6d16a35c5d551948a" -"checksum serde_derive_internals 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc848d073be32cd982380c06587ea1d433bc1a4c4a111de07ec2286a3ddade8" -"checksum serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "fab6c4d75bedcf880711c85e39ebf8ccc70d0eba259899047ec5d7436643ee17" +"checksum serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe95aa0d46f04ce5c3a88bdcd4114ecd6144ed0b2725ebca2f1127744357807" +"checksum serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "23b163a6ce7e1aa897919f9d8e40bd1f8a6f95342ed57727ae31387a01a7a356" +"checksum serde_derive_internals 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "370aa477297975243dc914d0b0e1234927520ec311de507a560fbd1c80f7ab8c" +"checksum serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "28556329a1d04efa036376c9588a0ed8655e202676d918733ca8a14740ee31be" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bcd5e483b3475af9bc2a35311c2f3bbf0bd98fde91410ab15a0d4ba3c3127b4e" "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" From bcf42a0c103c2039d1c08edab2e19ae49f6f0e82 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 14 Mar 2018 18:22:24 +0100 Subject: [PATCH 12/30] The wonders of serde default, take 2 --- components/config/Cargo.toml | 2 +- components/content/Cargo.toml | 2 +- components/content/src/section.rs | 2 +- components/errors/Cargo.toml | 2 +- components/front_matter/Cargo.toml | 2 +- components/front_matter/src/section.rs | 63 ++++++++------------------ components/highlighting/Cargo.toml | 2 +- components/pagination/Cargo.toml | 2 +- components/pagination/src/lib.rs | 10 ++-- components/rebuild/Cargo.toml | 2 +- components/rebuild/src/lib.rs | 6 +-- components/rendering/Cargo.toml | 2 +- components/site/Cargo.toml | 2 +- components/site/src/lib.rs | 15 ++---- components/taxonomies/Cargo.toml | 2 +- components/templates/Cargo.toml | 2 +- components/utils/Cargo.toml | 2 +- 17 files changed, 44 insertions(+), 76 deletions(-) diff --git a/components/config/Cargo.toml b/components/config/Cargo.toml index 298f8131..3515145a 100644 --- a/components/config/Cargo.toml +++ b/components/config/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "config" version = "0.1.0" -authors = ["Vincent Prouillet "] +authors = ["Vincent Prouillet "] [dependencies] toml = "0.4" diff --git a/components/content/Cargo.toml b/components/content/Cargo.toml index 07c21634..1aab5094 100644 --- a/components/content/Cargo.toml +++ b/components/content/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "content" version = "0.1.0" -authors = ["Vincent Prouillet "] +authors = ["Vincent Prouillet "] [dependencies] tera = "0.11" diff --git a/components/content/src/section.rs b/components/content/src/section.rs index 8ce6dfea..d8a9ae09 100644 --- a/components/content/src/section.rs +++ b/components/content/src/section.rs @@ -104,7 +104,7 @@ impl Section { config.highlight_theme.clone(), &self.permalink, permalinks, - self.meta.insert_anchor_links.unwrap() + self.meta.insert_anchor_links, ); let res = markdown_to_html(&self.raw_content, &context)?; self.content = res.0; diff --git a/components/errors/Cargo.toml b/components/errors/Cargo.toml index a43ee054..285bfeda 100644 --- a/components/errors/Cargo.toml +++ b/components/errors/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "errors" version = "0.1.0" -authors = ["Vincent Prouillet "] +authors = ["Vincent Prouillet "] [dependencies] error-chain = "0.11" diff --git a/components/front_matter/Cargo.toml b/components/front_matter/Cargo.toml index 564d08c7..a551ba31 100644 --- a/components/front_matter/Cargo.toml +++ b/components/front_matter/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "front_matter" version = "0.1.0" -authors = ["Vincent Prouillet "] +authors = ["Vincent Prouillet "] [dependencies] tera = "0.11" diff --git a/components/front_matter/src/section.rs b/components/front_matter/src/section.rs index 8ceedc1b..4d629ca1 100644 --- a/components/front_matter/src/section.rs +++ b/components/front_matter/src/section.rs @@ -12,6 +12,7 @@ static DEFAULT_PAGINATE_PATH: &'static str = "page"; /// The front matter of every section #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(default)] pub struct SectionFrontMatter { /// of the page pub title: Option<String>, @@ -19,11 +20,11 @@ pub struct SectionFrontMatter { pub description: Option<String>, /// Whether to sort by "date", "order", "weight" or "none". Defaults to `none`. #[serde(skip_serializing)] - pub sort_by: Option<SortBy>, + pub sort_by: SortBy, /// Used by the parent section to order its subsections. - /// Higher values means it will be at the end. + /// Higher values means it will be at the end. Defaults to `0` #[serde(skip_serializing)] - pub weight: Option<usize>, + pub weight: usize, /// Optional template, if we want to specify which template to render for that section #[serde(skip_serializing)] pub template: Option<String>, @@ -32,59 +33,38 @@ pub struct SectionFrontMatter { pub paginate_by: Option<usize>, /// Path to be used by pagination: the page number will be appended after it. Defaults to `page`. #[serde(skip_serializing)] - pub paginate_path: Option<String>, + pub paginate_path: String, /// Whether to insert a link for each header like the ones you can see in this site if you hover one /// The default template can be overridden by creating a `anchor-link.html` in the `templates` directory - pub insert_anchor_links: Option<InsertAnchor>, + pub insert_anchor_links: InsertAnchor, /// Whether to render that section or not. Defaults to `true`. /// Useful when the section is only there to organize things but is not meant /// to be used directly, like a posts section in a personal site #[serde(skip_serializing)] - pub render: Option<bool>, + pub render: bool, /// Whether to redirect when landing on that section. Defaults to `None`. /// Useful for the same reason as `render` but when you don't want a 404 when /// landing on the root section page #[serde(skip_serializing)] pub redirect_to: Option<String>, + /// Whether the section content and its pages/subsections are included in the index. + /// Defaults to `true` but is only used if search if explicitely enabled in the config. + #[serde(skip_serializing)] + pub in_search_index: bool, /// Any extra parameter present in the front matter - pub extra: Option<HashMap<String, Value>>, + pub extra: HashMap<String, Value>, } impl SectionFrontMatter { pub fn parse(toml: &str) -> Result<SectionFrontMatter> { - let mut f: SectionFrontMatter = match toml::from_str(toml) { + let f: SectionFrontMatter = match toml::from_str(toml) { Ok(d) => d, Err(e) => bail!(e), }; - if f.paginate_path.is_none() { - f.paginate_path = Some(DEFAULT_PAGINATE_PATH.to_string()); - } - - if f.render.is_none() { - f.render = Some(true); - } - - if f.sort_by.is_none() { - f.sort_by = Some(SortBy::None); - } - - if f.insert_anchor_links.is_none() { - f.insert_anchor_links = Some(InsertAnchor::None); - } - - if f.weight.is_none() { - f.weight = Some(0); - } - Ok(f) } - /// Returns the current sorting method, defaults to `None` (== no sorting) - pub fn sort_by(&self) -> SortBy { - self.sort_by.unwrap() - } - /// Only applies to section, whether it is paginated or not. pub fn is_paginated(&self) -> bool { match self.paginate_by { @@ -92,10 +72,6 @@ impl SectionFrontMatter { None => false } } - - pub fn should_render(&self) -> bool { - self.render.unwrap() - } } impl Default for SectionFrontMatter { @@ -103,15 +79,16 @@ impl Default for SectionFrontMatter { SectionFrontMatter { title: None, description: None, - sort_by: Some(SortBy::None), - weight: Some(0), + sort_by: SortBy::None, + weight: 0, template: None, paginate_by: None, - paginate_path: Some(DEFAULT_PAGINATE_PATH.to_string()), - render: Some(true), + paginate_path: DEFAULT_PAGINATE_PATH.to_string(), + render: true, redirect_to: None, - insert_anchor_links: Some(InsertAnchor::None), - extra: None, + insert_anchor_links: InsertAnchor::None, + in_search_index: true, + extra: HashMap::new(), } } } diff --git a/components/highlighting/Cargo.toml b/components/highlighting/Cargo.toml index 0f45a8eb..b2fed89a 100644 --- a/components/highlighting/Cargo.toml +++ b/components/highlighting/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "highlighting" version = "0.1.0" -authors = ["Vincent Prouillet <vincent@wearewizards.io>"] +authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] lazy_static = "1" diff --git a/components/pagination/Cargo.toml b/components/pagination/Cargo.toml index 313b85ba..0ee865f8 100644 --- a/components/pagination/Cargo.toml +++ b/components/pagination/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pagination" version = "0.1.0" -authors = ["Vincent Prouillet <vincent@wearewizards.io>"] +authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] tera = "0.11" diff --git a/components/pagination/src/lib.rs b/components/pagination/src/lib.rs index 2d8b2fc5..45bc3abf 100644 --- a/components/pagination/src/lib.rs +++ b/components/pagination/src/lib.rs @@ -72,13 +72,9 @@ impl<'a> Paginator<'a> { /// It will always at least create one pager (the first) even if there are no pages to paginate pub fn new(all_pages: &'a [Page], section: &'a Section) -> Paginator<'a> { let paginate_by = section.meta.paginate_by.unwrap(); - let paginate_path = match section.meta.paginate_path { - Some(ref p) => p, - None => unreachable!(), - }; - let mut pages = vec![]; let mut current_page = vec![]; + for page in all_pages { current_page.push(page); @@ -99,7 +95,7 @@ impl<'a> Paginator<'a> { continue; } - let page_path = format!("{}/{}/", paginate_path, index + 1); + let page_path = format!("{}/{}/", section.meta.paginate_path, index + 1); let permalink = format!("{}{}", section.permalink, page_path); let pager_path = if section.is_index() { page_path @@ -189,7 +185,7 @@ mod tests { fn create_section(is_index: bool) -> Section { let mut f = SectionFrontMatter::default(); f.paginate_by = Some(2); - f.paginate_path = Some("page".to_string()); + f.paginate_path = "page".to_string(); let mut s = Section::new("content/_index.md", f); if !is_index { s.path = "posts/".to_string(); diff --git a/components/rebuild/Cargo.toml b/components/rebuild/Cargo.toml index 1e001d78..a6ae5b70 100644 --- a/components/rebuild/Cargo.toml +++ b/components/rebuild/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rebuild" version = "0.1.0" -authors = ["Vincent Prouillet <vincent@wearewizards.io>"] +authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] errors = { path = "../errors" } diff --git a/components/rebuild/src/lib.rs b/components/rebuild/src/lib.rs index de1d3528..fac94802 100644 --- a/components/rebuild/src/lib.rs +++ b/components/rebuild/src/lib.rs @@ -60,7 +60,7 @@ fn find_section_front_matter_changes(current: &SectionFrontMatter, new: &Section // We want to hide the section // TODO: what to do on redirect_path change? - if current.should_render() && !new.should_render() { + if current.render && !new.render { changes_needed.push(SectionChangesNeeded::Delete); // Nothing else we can do return changes_needed; @@ -383,14 +383,14 @@ mod tests { #[test] fn can_find_sort_changes_in_section_frontmatter() { - let new = SectionFrontMatter { sort_by: Some(SortBy::Date), ..SectionFrontMatter::default() }; + let new = SectionFrontMatter { sort_by: SortBy::Date, ..SectionFrontMatter::default() }; let changes = find_section_front_matter_changes(&SectionFrontMatter::default(), &new); assert_eq!(changes, vec![SectionChangesNeeded::Sort, SectionChangesNeeded::Render]); } #[test] fn can_find_render_changes_in_section_frontmatter() { - let new = SectionFrontMatter { render: Some(false), ..SectionFrontMatter::default() }; + let new = SectionFrontMatter { render: false, ..SectionFrontMatter::default() }; let changes = find_section_front_matter_changes(&SectionFrontMatter::default(), &new); assert_eq!(changes, vec![SectionChangesNeeded::Delete]); } diff --git a/components/rendering/Cargo.toml b/components/rendering/Cargo.toml index 576016fc..6a19b2dd 100644 --- a/components/rendering/Cargo.toml +++ b/components/rendering/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rendering" version = "0.1.0" -authors = ["Vincent Prouillet <vincent@wearewizards.io>"] +authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] tera = "0.11" diff --git a/components/site/Cargo.toml b/components/site/Cargo.toml index 99c1abbe..55c52e61 100644 --- a/components/site/Cargo.toml +++ b/components/site/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "site" version = "0.1.0" -authors = ["Vincent Prouillet <vincent@wearewizards.io>"] +authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] tera = "0.11" diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 668bce70..1a0f6fb5 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -308,7 +308,7 @@ impl Site { /// Defaults to `AnchorInsert::None` if no parent section found pub fn find_parent_section_insert_anchor(&self, parent_path: &PathBuf) -> InsertAnchor { match self.sections.get(&parent_path.join("_index.md")) { - Some(s) => s.meta.insert_anchor_links.unwrap(), + Some(s) => s.meta.insert_anchor_links, None => InsertAnchor::None } } @@ -350,7 +350,7 @@ impl Site { .map(|p| sections[p].clone()) .collect::<Vec<_>>(); section.subsections - .sort_by(|a, b| a.meta.weight.unwrap().cmp(&b.meta.weight.unwrap())); + .sort_by(|a, b| a.meta.weight.cmp(&b.meta.weight)); } } } @@ -365,7 +365,7 @@ impl Site { } } let pages = mem::replace(&mut section.pages, vec![]); - let (sorted_pages, cannot_be_sorted_pages) = sort_pages(pages, section.meta.sort_by()); + let (sorted_pages, cannot_be_sorted_pages) = sort_pages(pages, section.meta.sort_by); section.pages = populate_previous_and_next_pages(&sorted_pages); section.ignored_pages = cannot_be_sorted_pages; } @@ -773,7 +773,7 @@ impl Site { .reduce(|| Ok(()), Result::and)?; } - if !section.meta.should_render() { + if !section.meta.render { return Ok(()); } @@ -827,13 +827,8 @@ impl Site { pub fn render_paginated(&self, output_path: &Path, section: &Section) -> Result<()> { ensure_directory_exists(&self.output_path)?; - let paginate_path = match section.meta.paginate_path { - Some(ref s) => s.clone(), - None => unreachable!() - }; - let paginator = Paginator::new(§ion.pages, section); - let folder_path = output_path.join(&paginate_path); + let folder_path = output_path.join(§ion.meta.paginate_path); create_directory(&folder_path)?; paginator diff --git a/components/taxonomies/Cargo.toml b/components/taxonomies/Cargo.toml index 1329965e..2298737d 100644 --- a/components/taxonomies/Cargo.toml +++ b/components/taxonomies/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "taxonomies" version = "0.1.0" -authors = ["Vincent Prouillet <vincent@wearewizards.io>"] +authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] tera = "0.11" diff --git a/components/templates/Cargo.toml b/components/templates/Cargo.toml index f53c4183..0d6ebe8a 100644 --- a/components/templates/Cargo.toml +++ b/components/templates/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "templates" version = "0.1.0" -authors = ["Vincent Prouillet <vincent@wearewizards.io>"] +authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] tera = "0.11" diff --git a/components/utils/Cargo.toml b/components/utils/Cargo.toml index 27ca4204..017a1eb7 100644 --- a/components/utils/Cargo.toml +++ b/components/utils/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "utils" version = "0.1.0" -authors = ["Vincent Prouillet <vincent@wearewizards.io>"] +authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] errors = { path = "../errors" } From f1abbd0860848c2d9e0088e0b4629c6811d52205 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Wed, 14 Mar 2018 22:03:06 +0100 Subject: [PATCH 13/30] Move copy utils to utils crate --- .gitignore | 2 +- Cargo.lock | 2 +- components/front_matter/src/page.rs | 5 +++ components/front_matter/src/section.rs | 2 +- components/site/Cargo.toml | 1 - components/site/src/lib.rs | 59 ++++++++++---------------- components/site/tests/site.rs | 7 +++ components/utils/Cargo.toml | 1 + components/utils/src/fs.rs | 35 ++++++++++++++- components/utils/src/lib.rs | 1 + src/cmd/serve.rs | 3 +- 11 files changed, 76 insertions(+), 42 deletions(-) diff --git a/.gitignore b/.gitignore index 5085055a..23e585f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ target .idea/ -components/site/test_site/public +test_site/public docs/public small-blog diff --git a/Cargo.lock b/Cargo.lock index 613da997..f61b97f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1153,7 +1153,6 @@ dependencies = [ "templates 0.1.0", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1465,6 +1464,7 @@ dependencies = [ "errors 0.1.0", "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] diff --git a/components/front_matter/src/page.rs b/components/front_matter/src/page.rs index ca2c95ac..935ba256 100644 --- a/components/front_matter/src/page.rs +++ b/components/front_matter/src/page.rs @@ -94,6 +94,10 @@ pub struct PageFrontMatter { /// Specify a template different from `page.html` to use for that page #[serde(skip_serializing)] pub template: Option<String>, + /// Whether the page is included in the search index + /// Defaults to `true` but is only used if search if explicitly enabled in the config. + #[serde(default, skip_serializing)] + pub in_search_index: bool, /// Any extra parameter present in the front matter #[serde(default)] pub extra: Map<String, Value>, @@ -174,6 +178,7 @@ impl Default for PageFrontMatter { order: None, weight: None, aliases: None, + in_search_index: true, template: None, extra: Map::new(), } diff --git a/components/front_matter/src/section.rs b/components/front_matter/src/section.rs index 4d629ca1..64eb27dc 100644 --- a/components/front_matter/src/section.rs +++ b/components/front_matter/src/section.rs @@ -48,7 +48,7 @@ pub struct SectionFrontMatter { #[serde(skip_serializing)] pub redirect_to: Option<String>, /// Whether the section content and its pages/subsections are included in the index. - /// Defaults to `true` but is only used if search if explicitely enabled in the config. + /// Defaults to `true` but is only used if search if explicitly enabled in the config. #[serde(skip_serializing)] pub in_search_index: bool, /// Any extra parameter present in the front matter diff --git a/components/site/Cargo.toml b/components/site/Cargo.toml index 55c52e61..5e3a83d6 100644 --- a/components/site/Cargo.toml +++ b/components/site/Cargo.toml @@ -6,7 +6,6 @@ authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] tera = "0.11" glob = "0.2" -walkdir = "2" rayon = "1" serde = "1" serde_derive = "1" diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 1a0f6fb5..547f91b9 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -1,7 +1,6 @@ extern crate tera; extern crate rayon; extern crate glob; -extern crate walkdir; extern crate serde; #[macro_use] extern crate serde_derive; @@ -21,7 +20,7 @@ extern crate content; extern crate tempdir; use std::collections::HashMap; -use std::fs::{remove_dir_all, copy, create_dir_all}; +use std::fs::{remove_dir_all, copy}; use std::mem; use std::path::{Path, PathBuf}; @@ -32,7 +31,7 @@ use sass_rs::{Options as SassOptions, OutputStyle, compile_file}; use errors::{Result, ResultExt}; use config::{Config, get_config}; -use utils::fs::{create_file, create_directory, ensure_directory_exists}; +use utils::fs::{create_file, copy_directory, create_directory, ensure_directory_exists}; use utils::templates::{render_template, rewrite_theme_paths}; use content::{Page, Section, populate_previous_and_next_pages, sort_pages}; use templates::{GUTENBERG_TERA, global_fns, render_redirect_template}; @@ -67,7 +66,7 @@ pub struct Site { pub sections: HashMap<PathBuf, Section>, pub tera: Tera, live_reload: bool, - output_path: PathBuf, + pub output_path: PathBuf, pub static_path: PathBuf, pub tags: Option<Taxonomy>, pub categories: Option<Taxonomy>, @@ -125,6 +124,11 @@ impl Site { Ok(site) } + /// The index section is ALWAYS at that path + pub fn index_section_path(&self) -> PathBuf { + self.base_path.join("content").join("_index.md") + } + /// What the function name says pub fn enable_live_reload(&mut self) { self.live_reload = true; @@ -198,7 +202,17 @@ impl Site { // Insert a default index section if necessary so we don't need to create // a _index.md to render the index page - let index_path = self.base_path.join("content").join("_index.md"); + let index_path = self.index_section_path(); + if let Some(ref index_section) = self.sections.get(&index_path) { + if self.config.build_search_index && index_section.meta.in_search_index { + bail!( + "You have enabled search in the config but disabled it in the index section: \ + either turn off the search in the config or remote `in_search_index = true` from the \ + section front-matter." + ) + } + } + // Not in else because of borrow checker if !self.sections.contains_key(&index_path) { let mut index_section = Section::default(); index_section.permalink = self.config.make_permalink(""); @@ -409,45 +423,18 @@ impl Site { html } - /// Copy the file at the given path into the public folder - pub fn copy_static_file<P: AsRef<Path>>(&self, path: P, base_path: &PathBuf) -> Result<()> { - let relative_path = path.as_ref().strip_prefix(base_path).unwrap(); - let target_path = self.output_path.join(relative_path); - if let Some(parent_directory) = target_path.parent() { - create_dir_all(parent_directory)?; - } - copy(path.as_ref(), &target_path)?; - Ok(()) - } - - /// Copy the content of the given folder into the `public` folder - fn copy_static_directory(&self, path: &PathBuf) -> Result<()> { - for entry in WalkDir::new(path).into_iter().filter_map(|e| e.ok()) { - let relative_path = entry.path().strip_prefix(path).unwrap(); - let target_path = self.output_path.join(relative_path); - if entry.path().is_dir() { - if !target_path.exists() { - create_directory(&target_path)?; - } - } else { - let entry_fullpath = self.base_path.join(entry.path()); - self.copy_static_file(entry_fullpath, path)?; - } - } - Ok(()) - } - /// Copy the main `static` folder and the theme `static` folder if a theme is used pub fn copy_static_directories(&self) -> Result<()> { // The user files will overwrite the theme files if let Some(ref theme) = self.config.theme { - self.copy_static_directory( - &self.base_path.join("themes").join(theme).join("static") + copy_directory( + &self.base_path.join("themes").join(theme).join("static"), + &self.output_path )?; } // We're fine with missing static folders if self.static_path.exists() { - self.copy_static_directory(&self.static_path)?; + copy_directory(&self.static_path, &self.output_path)?; } Ok(()) diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index 598a4f4c..516b4818 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -445,3 +445,10 @@ fn can_build_rss_feed() { // Next is posts/python.md assert!(file_contains!(public, "rss.xml", "Python in posts")); } + + +#[test] +fn can_build_search_index() { + // TODO: generate an index somehow and check for correctness with + // another one +} diff --git a/components/utils/Cargo.toml b/components/utils/Cargo.toml index 017a1eb7..ee330ee1 100644 --- a/components/utils/Cargo.toml +++ b/components/utils/Cargo.toml @@ -6,6 +6,7 @@ authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] errors = { path = "../errors" } tera = "0.11" +walkdir = "2" [dev-dependencies] diff --git a/components/utils/src/fs.rs b/components/utils/src/fs.rs index 7b5381cc..06cd80ce 100644 --- a/components/utils/src/fs.rs +++ b/components/utils/src/fs.rs @@ -1,9 +1,12 @@ use std::io::prelude::*; -use std::fs::{File, create_dir_all, read_dir}; +use std::fs::{File, create_dir_all, read_dir, copy}; use std::path::{Path, PathBuf}; +use walkdir::WalkDir; + use errors::{Result, ResultExt}; + /// Create a file with the content given pub fn create_file(path: &Path, content: &str) -> Result<()> { let mut file = File::create(&path)?; @@ -60,6 +63,36 @@ pub fn find_related_assets(path: &Path) -> Vec<PathBuf> { assets } +/// Copy a file but takes into account where to start the copy as +/// there might be folders we need to create on the way +pub fn copy_file(src: &Path, dest: &PathBuf, base_path: &PathBuf) -> Result<()> { + let relative_path = src.strip_prefix(base_path).unwrap(); + let target_path = dest.join(relative_path); + + if let Some(parent_directory) = target_path.parent() { + create_dir_all(parent_directory)?; + } + + copy(src, target_path)?; + Ok(()) +} + +pub fn copy_directory(src: &PathBuf, dest: &PathBuf) -> Result<()> { + for entry in WalkDir::new(src).into_iter().filter_map(|e| e.ok()) { + let relative_path = entry.path().strip_prefix(src).unwrap(); + let target_path = dest.join(relative_path); + + if entry.path().is_dir() { + if !target_path.exists() { + create_directory(&target_path)?; + } + } else { + copy_file(entry.path(), dest, src)?; + } + } + Ok(()) +} + #[cfg(test)] mod tests { use std::fs::File; diff --git a/components/utils/src/lib.rs b/components/utils/src/lib.rs index 6b447f24..b529aa45 100644 --- a/components/utils/src/lib.rs +++ b/components/utils/src/lib.rs @@ -4,6 +4,7 @@ extern crate errors; #[cfg(test)] extern crate tempdir; extern crate tera; +extern crate walkdir; pub mod fs; pub mod site; diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index edf6806f..67486d69 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -38,6 +38,7 @@ use ctrlc; use site::Site; use errors::{Result, ResultExt}; +use utils::fs::copy_file; use console; use rebuild; @@ -207,7 +208,7 @@ pub fn serve(interface: &str, port: &str, output_dir: &str, base_url: &str, conf (ChangeKind::StaticFiles, p) => { if path.is_file() { console::info(&format!("-> Static file changes detected {}", path.display())); - rebuild_done_handling(&broadcaster, site.copy_static_file(&path, &site.static_path), &p); + rebuild_done_handling(&broadcaster, copy_file(&path, &site.output_path, &site.static_path), &p); } }, (ChangeKind::Sass, p) => { From ddf8970ad81ee7e5ea3991c25a6ac6849fb77b48 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Thu, 15 Mar 2018 18:58:32 +0100 Subject: [PATCH 14/30] [WIP] Search --- Cargo.lock | 1734 ---------------------- Cargo.toml | 1 + components/front_matter/src/page.rs | 4 +- components/search/Cargo.toml | 12 + components/search/src/elasticlunr.min.js | 10 + components/search/src/lib.rs | 71 + components/site/Cargo.toml | 1 + components/site/src/lib.rs | 28 +- components/site/tests/site.rs | 15 +- docs/config.toml | 1 + docs/sass/_search.scss | 3 + docs/sass/site.scss | 1 + docs/static/search.js | 60 + docs/templates/index.html | 10 + 14 files changed, 212 insertions(+), 1739 deletions(-) delete mode 100644 Cargo.lock create mode 100644 components/search/Cargo.toml create mode 100644 components/search/src/elasticlunr.min.js create mode 100644 components/search/src/lib.rs create mode 100644 docs/sass/_search.scss create mode 100644 docs/static/search.js diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index f61b97f7..00000000 --- a/Cargo.lock +++ /dev/null @@ -1,1734 +0,0 @@ -[[package]] -name = "aho-corasick" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "arrayvec" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "atty" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "base64" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "base64" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "base64" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bincode" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bitflags" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byteorder" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bytes" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bytes" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cc" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "chrono" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "clap" -version = "2.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cmake" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "config" -version = "0.1.0" -dependencies = [ - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "errors 0.1.0", - "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "highlighting 0.1.0", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "content" -version = "0.1.0" -dependencies = [ - "config 0.1.0", - "errors 0.1.0", - "front_matter 0.1.0", - "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rendering 0.1.0", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "utils 0.1.0", -] - -[[package]] -name = "crossbeam-deque" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-utils" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ctrlc" -version = "3.1.0" -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)", - "nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "dtoa" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "duct" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "os_pipe 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "either" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "error-chain" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "errors" -version = "0.1.0" -dependencies = [ - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "filetime" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "flate2" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fnv" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "front_matter" -version = "0.1.0" -dependencies = [ - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "errors 0.1.0", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fs_extra" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fsevent" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fsevent-sys" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "gcc" -version = "0.3.54" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "getopts" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "glob" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "globset" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.4 (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.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.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "gutenberg" -version = "0.3.3" -dependencies = [ - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)", - "content 0.1.0", - "ctrlc 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "errors 0.1.0", - "front_matter 0.1.0", - "iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rebuild 0.1.0", - "site 0.1.0", - "staticfile 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "term-painter 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "utils 0.1.0", - "ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "highlighting" -version = "0.1.0" -dependencies = [ - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "httparse" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "humansize" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.10.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "inotify" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "iovec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "iron" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 1.8.4 (registry+https://github.com/rust-lang/crates.io-index)", - "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "itoa" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazycell" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazycell" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.39" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "linked-hash-map" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "log" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "matches" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "memoffset" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime_guess" -version = "1.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz-sys" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mio" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mio" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miow" -version = "0.1.5" -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)", - "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miow" -version = "0.2.1" -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)", - "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "modifier" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mount" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sequence_trie 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "net2" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nix" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nix" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nodrop" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "notify" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", - "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "inotify 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-integer" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-iter" -version = "0.1.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-traits" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "num_cpus" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "onig" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "onig_sys 67.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "onig_sys" -version = "67.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "duct 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "os_pipe" -version = "0.6.0" -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)", - "nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pagination" -version = "0.1.0" -dependencies = [ - "config 0.1.0", - "content 0.1.0", - "errors 0.1.0", - "front_matter 0.1.0", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "utils 0.1.0", -] - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "pest" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "pest_derive" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf" -version = "0.7.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_codegen" -version = "0.7.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_generator" -version = "0.7.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_shared" -version = "0.7.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pkg-config" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "plist" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "plugin" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro2" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pulldown-cmark" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "quote" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon-core" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rebuild" -version = "0.1.0" -dependencies = [ - "content 0.1.0", - "errors 0.1.0", - "front_matter 0.1.0", - "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "highlighting 0.1.0", - "site 0.1.0", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "redox_termios" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.4 (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.3 (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]] -name = "regex-syntax" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex-syntax" -version = "0.5.3" -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]] -name = "remove_dir_all" -version = "0.3.0" -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)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rendering" -version = "0.1.0" -dependencies = [ - "errors 0.1.0", - "front_matter 0.1.0", - "highlighting 0.1.0", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "templates 0.1.0", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "utils 0.1.0", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "safemem" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "same-file" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sass-rs" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sass-sys" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "sequence_trie" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde_derive" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive_internals" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_json" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sha1" -version = "0.2.0" -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.39 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "siphasher" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "site" -version = "0.1.0" -dependencies = [ - "config 0.1.0", - "content 0.1.0", - "errors 0.1.0", - "front_matter 0.1.0", - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "pagination 0.1.0", - "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sass-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "taxonomies 0.1.0", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "templates 0.1.0", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "utils 0.1.0", -] - -[[package]] -name = "slab" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "slab" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "slab" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "slug" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unidecode 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "staticfile" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "strsim" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "syn" -version = "0.11.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "synom" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syntect" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "onig 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "taxonomies" -version = "0.1.0" -dependencies = [ - "config 0.1.0", - "content 0.1.0", - "errors 0.1.0", - "front_matter 0.1.0", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "utils 0.1.0", -] - -[[package]] -name = "tempdir" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "templates" -version = "0.1.0" -dependencies = [ - "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "config 0.1.0", - "content 0.1.0", - "errors 0.1.0", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "taxonomies 0.1.0", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "utils 0.1.0", -] - -[[package]] -name = "tera" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.11.0 (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)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pest_derive 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "term" -version = "0.4.6" -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)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "term-painter" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "termion" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "textwrap" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "toml" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typemap" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ucd-util" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-width" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unidecode" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unsafe-any" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "url" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "utils" -version = "0.1.0" -dependencies = [ - "errors 0.1.0", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "vec_map" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "version_check" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "walkdir" -version = "2.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ws" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "xml-rs" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "yaml-rust" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" -"checksum atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "af80143d6f7608d746df1520709e5d141c96f240b0e62b0aa41bdfb53374d9d4" -"checksum backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2" -"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" -"checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" -"checksum base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c4a342b450b268e1be8036311e2c613d7f8a7ed31214dff1cc3b60852a3168d" -"checksum base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "229d032f1a99302697f10b27167ae6d03d49d032e6a8e2550e8d3fc13356d2b4" -"checksum bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9a6301db0b49fb63551bc15b5ae348147101cdf323242b93ec7546d5002ff1af" -"checksum bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3" -"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" -"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" -"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" -"checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27" -"checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" -"checksum cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d9324127e719125ec8a16e6e509abc4c641e773621b50aea695af3f005656d61" -"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" -"checksum clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dc18f6f4005132120d9711636b32c46a233fad94df6217fa1d81c5e97a9f200" -"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb" -"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" -"checksum crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59796cc6cbbdc6bb319161349db0c3250ec73ec7fcb763a51065ec4e2e158552" -"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" -"checksum ctrlc 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "653abc99aa905f693d89df4797fadc08085baee379db92be9f2496cefe8a6f2c" -"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" -"checksum duct 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8c553d79f40e74f7f611e49bf3429b6760cff79596b61818291c27cc0b18549d" -"checksum either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740178ddf48b1a9e878e6d6509a1442a2d42fd2928aae8e7a6f8a36fb01981b3" -"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" -"checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f" -"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" -"checksum fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c4bbbf71584aeed076100b5665ac14e3d85eeb31fdbb45fbd41ef9a682b5ec05" -"checksum fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a772d36c338d07a032d5375a36f15f9a7043bf0cb8ce7cee658e037c6032874" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" -"checksum getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05" -"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1e96ab92362c06811385ae9a34d2698e8a1160745e0c78fbb434a44c8de3fabc" -"checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" -"checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" -"checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2" -"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" -"checksum inotify 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887fcc180136e77a85e6a6128579a719027b1bab9b1c38ea4444244fe262c20c" -"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d8e17268922834707e1c29e8badbf9c712c9c43378e1b6a3388946baff10be2" -"checksum itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92a9df60778f789c37f76778ae8d0a2471c41baa8b059d98a5873c978f549587" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" -"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" -"checksum lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b585b7a6811fb03aa10e74b278a0f00f8dd9b45dc681f148bb29fa5cb61859b" -"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" -"checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff" -"checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" -"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" -"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" -"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" -"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" -"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -"checksum mime_guess 1.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b7e2b09d08313f84e0fb82d13a4d859109a17543fe9af3b6d941dc1431f7de79" -"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" -"checksum mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a637d1ca14eacae06296a008fa7ad955347e34efcb5891cfd8ba05491a37907e" -"checksum mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "6d771e3ef92d58a8da8df7d6976bfca9371ed1de6619d9d5a5ce5b1f29b85bfe" -"checksum miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3e690c5df6b2f60acd45d56378981e827ff8295562fc8d34f573deb267a59cd1" -"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" -"checksum mount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e25c06012941aaf8c75f2eaf7ec5c48cf69f9fc489ab3eb3589edc107e386f0b" -"checksum net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "9044faf1413a1057267be51b5afba8eb1090bd2231c693664aa1db716fe1eae0" -"checksum nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb3ddedaa14746434a02041940495bf11325c22f6d36125d3bdd56090d50a79" -"checksum nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2c5afeb0198ec7be8569d666644b574345aad2e95a53baf3a532da3e0f3fb32" -"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" -"checksum notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5c3812da3098f210a0bb440f9c008471a031aa4c1de07a264fdd75456c95a4eb" -"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" -"checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" -"checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" -"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" -"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" -"checksum onig 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c54a94ac4d9f3eec22b189b8a727e2ded82aee21e8ae7ffbba2468739161b" -"checksum onig_sys 67.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34d894e8da3390097d99eb197eac2ec443277551388eff0f97c5f789933350ee" -"checksum os_pipe 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f547689aea1f11fac90333d573854a8e3e52a9160df1c42aefa8cd16734a3c0" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0fce5d8b5cc33983fc74f78ad552b5522ab41442c4ca91606e4236eb4b5ceefc" -"checksum pest_derive 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6453faedc5c9980a3c278f28b1df33344a79cc6d4a2fd96e2b56288374dc822a" -"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" -"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f" -"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" -"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" -"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" -"checksum plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c61ac2afed2856590ae79d6f358a24b85ece246d2aa134741a66d589519b7503" -"checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" -"checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" -"checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" -"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" -"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" -"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" -"checksum rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80e811e76f1dbf68abf87a759083d34600017fc4e10b6bd5ad84a700f9dba4b1" -"checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8" -"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" -"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "aec3f58d903a7d2a9dc2bf0e41a746f4530e0cab6b615494e058f67a3ef947fb" -"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" -"checksum regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b2550876c31dc914696a6c2e01cbce8afba79a93c8ae979d2fe051c0230b3756" -"checksum remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d2f806b0fcdabd98acd380dc8daef485e22bcb7cddc811d1337967f2528cf5" -"checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb" -"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" -"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" -"checksum sass-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90f8cf6e645aa843ffffcbdc1e8752b1f221dfa314c81895aeb229a77aea7e05" -"checksum sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a71105d35ea2c3622fceb9128897115932c698561940a453452744413faf3561" -"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" -"checksum sequence_trie 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "32157204e5c9d3c04007bd7e56e96e987635ce0e8e23c085b1e403861b76c351" -"checksum serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe95aa0d46f04ce5c3a88bdcd4114ecd6144ed0b2725ebca2f1127744357807" -"checksum serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "23b163a6ce7e1aa897919f9d8e40bd1f8a6f95342ed57727ae31387a01a7a356" -"checksum serde_derive_internals 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "370aa477297975243dc914d0b0e1234927520ec311de507a560fbd1c80f7ab8c" -"checksum serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "28556329a1d04efa036376c9588a0ed8655e202676d918733ca8a14740ee31be" -"checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" -"checksum shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bcd5e483b3475af9bc2a35311c2f3bbf0bd98fde91410ab15a0d4ba3c3127b4e" -"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.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 slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f5ff4b43cb07b86c5f9236c92714a22cdf9e5a27a7d85e398e2c9403328cb8" -"checksum staticfile 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "babd3fa68bb7e3994ce181c5f21ff3ff5fffef7b18b8a10163b45e4dafc6fb86" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "8c5bc2d6ff27891209efa5f63e9de78648d7801f085e4653701a692ce938d6fd" -"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db9fffcb25a761118df53811bd1cfcd54cf57fcbc51e1ea3167ae263477129ad" -"checksum tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f73eebdb68c14bcb24aef74ea96079830e7fa7b31a6106e42ea7ee887c1e134e" -"checksum tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fc1a35d04c2444875b1319293fbc72c00215ae6220f8c70f9f14fefa5eaae0c6" -"checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1" -"checksum term-painter 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "dcaa948f0e3e38470cd8dc8dcfe561a75c9e43f28075bb183845be2b9b3c08cf" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" -"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" -"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" -"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" -"checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" -"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" -"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" -"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" -"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unidecode 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2adb95ee07cd579ed18131f2d9e7a17c25a4b76022935c7f2460d2bfae89fd2" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" -"checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" -"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" -"checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "89c48c53bf9dee34411a08993c10b879c36e105d609b46e25673befe3a5c1320" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" -"checksum yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57ab38ee1a4a266ed033496cf9af1828d8d6e6c1cfa5f643a2809effcae4d628" diff --git a/Cargo.toml b/Cargo.toml index 4448eb26..232ac49e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,4 +52,5 @@ members = [ "components/taxonomies", "components/templates", "components/utils", + "components/search", ] diff --git a/components/front_matter/src/page.rs b/components/front_matter/src/page.rs index 935ba256..a30b68e0 100644 --- a/components/front_matter/src/page.rs +++ b/components/front_matter/src/page.rs @@ -62,6 +62,7 @@ fn fix_toml_dates(table: Map<String, Value>) -> Value { /// The front matter of every page #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(default)] pub struct PageFrontMatter { /// <title> of the page pub title: Option<String>, @@ -96,10 +97,9 @@ pub struct PageFrontMatter { pub template: Option<String>, /// Whether the page is included in the search index /// Defaults to `true` but is only used if search if explicitly enabled in the config. - #[serde(default, skip_serializing)] + #[serde(skip_serializing)] pub in_search_index: bool, /// Any extra parameter present in the front matter - #[serde(default)] pub extra: Map<String, Value>, } diff --git a/components/search/Cargo.toml b/components/search/Cargo.toml new file mode 100644 index 00000000..de732278 --- /dev/null +++ b/components/search/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "search" +version = "0.1.0" +authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] + +[dependencies] +elasticlunr-rs = "1" +ammonia = "1" +lazy_static = "1" + +errors = { path = "../errors" } +content = { path = "../content" } diff --git a/components/search/src/elasticlunr.min.js b/components/search/src/elasticlunr.min.js new file mode 100644 index 00000000..06cc9b32 --- /dev/null +++ b/components/search/src/elasticlunr.min.js @@ -0,0 +1,10 @@ +/** + * elasticlunr - http://weixsong.github.io + * Lightweight full-text search engine in Javascript for browser search and offline search. - 0.9.5 + * + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + * MIT Licensed + * @license + */ +!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u<s.length;u++){var a=s[u];r[a]=this.pipeline.run(t.tokenizer(e[a]))}var l={};for(var c in o){var d=r[c]||r.any;if(d){var f=this.fieldSearch(d,c,o),h=o[c].boost;for(var p in f)f[p]=f[p]*h;for(var p in f)p in l?l[p]+=f[p]:l[p]=f[p]}}var v,g=[];for(var p in l)v={ref:p,score:l[p]},this.documentStore.hasDoc(p)&&(v.doc=this.documentStore.getDoc(p)),g.push(v);return g.sort(function(e,t){return t.score-e.score}),g},t.Index.prototype.fieldSearch=function(e,t,n){var i=n[t].bool,o=n[t].expand,r=n[t].boost,s=null,u={};return 0!==r?(e.forEach(function(e){var n=[e];1==o&&(n=this.index[t].expandToken(e));var r={};n.forEach(function(n){var o=this.index[t].getDocs(n),a=this.idf(n,t);if(s&&"AND"==i){var l={};for(var c in s)c in o&&(l[c]=o[c]);o=l}n==e&&this.fieldSearchStats(u,n,o);for(var c in o){var d=this.index[t].getTermFrequency(n,c),f=this.documentStore.getFieldLength(c,t),h=1;0!=f&&(h=1/Math.sqrt(f));var p=1;n!=e&&(p=.15*(1-(n.length-e.length)/n.length));var v=d*a*h*p;c in r?r[c]+=v:r[c]=v}},this),s=this.mergeScores(s,r,i)},this),s=this.coordNorm(s,u,e.length)):void 0},t.Index.prototype.mergeScores=function(e,t,n){if(!e)return t;if("AND"==n){var i={};for(var o in t)o in e&&(i[o]=e[o]+t[o]);return i}for(var o in t)o in e?e[o]+=t[o]:e[o]=t[o];return e},t.Index.prototype.fieldSearchStats=function(e,t,n){for(var i in n)i in e?e[i].push(t):e[i]=[t]},t.Index.prototype.coordNorm=function(e,t,n){for(var i in e)if(i in t){var o=t[i].length;e[i]=e[i]*o/n}return e},t.Index.prototype.toJSON=function(){var e={};return this._fields.forEach(function(t){e[t]=this.index[t].toJSON()},this),{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),index:e,pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},t.DocumentStore=function(e){this._save=null===e||void 0===e?!0:e,this.docs={},this.docInfo={},this.length=0},t.DocumentStore.load=function(e){var t=new this;return t.length=e.length,t.docs=e.docs,t.docInfo=e.docInfo,t._save=e.save,t},t.DocumentStore.prototype.isDocStored=function(){return this._save},t.DocumentStore.prototype.addDoc=function(t,n){this.hasDoc(t)||this.length++,this.docs[t]=this._save===!0?e(n):null},t.DocumentStore.prototype.getDoc=function(e){return this.hasDoc(e)===!1?null:this.docs[e]},t.DocumentStore.prototype.hasDoc=function(e){return e in this.docs},t.DocumentStore.prototype.removeDoc=function(e){this.hasDoc(e)&&(delete this.docs[e],delete this.docInfo[e],this.length--)},t.DocumentStore.prototype.addFieldLength=function(e,t,n){null!==e&&void 0!==e&&0!=this.hasDoc(e)&&(this.docInfo[e]||(this.docInfo[e]={}),this.docInfo[e][t]=n)},t.DocumentStore.prototype.updateFieldLength=function(e,t,n){null!==e&&void 0!==e&&0!=this.hasDoc(e)&&this.addFieldLength(e,t,n)},t.DocumentStore.prototype.getFieldLength=function(e,t){return null===e||void 0===e?0:e in this.docs&&t in this.docInfo[e]?this.docInfo[e][t]:0},t.DocumentStore.prototype.toJSON=function(){return{docs:this.docs,docInfo:this.docInfo,length:this.length,save:this._save}},t.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,u="^("+o+")?"+r+o+"("+r+")?$",a="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,c=new RegExp(s),d=new RegExp(a),f=new RegExp(u),h=new RegExp(l),p=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,x=new RegExp("([^aeiouylsz])\\1$"),w=new RegExp("^"+o+i+"[^aeiouwxy]$"),I=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,D=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,_=/^(.+?)e$/,P=/ll$/,k=new RegExp("^"+o+i+"[^aeiouwxy]$"),z=function(n){var i,o,r,s,u,a,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,u=v,s.test(n)?n=n.replace(s,"$1$2"):u.test(n)&&(n=n.replace(u,"$1$2")),s=g,u=m,s.test(n)){var z=s.exec(n);s=c,s.test(z[1])&&(s=y,n=n.replace(s,""))}else if(u.test(n)){var z=u.exec(n);i=z[1],u=h,u.test(i)&&(n=i,u=S,a=x,l=w,u.test(n)?n+="e":a.test(n)?(s=y,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=I,s.test(n)){var z=s.exec(n);i=z[1],n=i+"i"}if(s=b,s.test(n)){var z=s.exec(n);i=z[1],o=z[2],s=c,s.test(i)&&(n=i+e[o])}if(s=E,s.test(n)){var z=s.exec(n);i=z[1],o=z[2],s=c,s.test(i)&&(n=i+t[o])}if(s=D,u=F,s.test(n)){var z=s.exec(n);i=z[1],s=d,s.test(i)&&(n=i)}else if(u.test(n)){var z=u.exec(n);i=z[1]+z[2],u=d,u.test(i)&&(n=i)}if(s=_,s.test(n)){var z=s.exec(n);i=z[1],s=d,u=f,a=k,(s.test(i)||u.test(i)&&!a.test(i))&&(n=i)}return s=P,u=d,s.test(n)&&u.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return z}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==!0?e:void 0},t.clearStopWords=function(){t.stopWordFilter.stopWords={}},t.addStopWords=function(e){null!=e&&Array.isArray(e)!==!1&&e.forEach(function(e){t.stopWordFilter.stopWords[e]=!0},this)},t.resetStopWords=function(){t.stopWordFilter.stopWords=t.defaultStopWords},t.defaultStopWords={"":!0,a:!0,able:!0,about:!0,across:!0,after:!0,all:!0,almost:!0,also:!0,am:!0,among:!0,an:!0,and:!0,any:!0,are:!0,as:!0,at:!0,be:!0,because:!0,been:!0,but:!0,by:!0,can:!0,cannot:!0,could:!0,dear:!0,did:!0,"do":!0,does:!0,either:!0,"else":!0,ever:!0,every:!0,"for":!0,from:!0,get:!0,got:!0,had:!0,has:!0,have:!0,he:!0,her:!0,hers:!0,him:!0,his:!0,how:!0,however:!0,i:!0,"if":!0,"in":!0,into:!0,is:!0,it:!0,its:!0,just:!0,least:!0,let:!0,like:!0,likely:!0,may:!0,me:!0,might:!0,most:!0,must:!0,my:!0,neither:!0,no:!0,nor:!0,not:!0,of:!0,off:!0,often:!0,on:!0,only:!0,or:!0,other:!0,our:!0,own:!0,rather:!0,said:!0,say:!0,says:!0,she:!0,should:!0,since:!0,so:!0,some:!0,than:!0,that:!0,the:!0,their:!0,them:!0,then:!0,there:!0,these:!0,they:!0,"this":!0,tis:!0,to:!0,too:!0,twas:!0,us:!0,wants:!0,was:!0,we:!0,were:!0,what:!0,when:!0,where:!0,which:!0,"while":!0,who:!0,whom:!0,why:!0,will:!0,"with":!0,would:!0,yet:!0,you:!0,your:!0},t.stopWordFilter.stopWords=t.defaultStopWords,t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(e){if(null===e||void 0===e)throw new Error("token should not be undefined");return e.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.InvertedIndex=function(){this.root={docs:{},df:0}},t.InvertedIndex.load=function(e){var t=new this;return t.root=e.root,t},t.InvertedIndex.prototype.addToken=function(e,t,n){for(var n=n||this.root,i=0;i<=e.length-1;){var o=e[i];o in n||(n[o]={docs:{},df:0}),i+=1,n=n[o]}var r=t.ref;n.docs[r]?n.docs[r]={tf:t.tf}:(n.docs[r]={tf:t.tf},n.df+=1)},t.InvertedIndex.prototype.hasToken=function(e){if(!e)return!1;for(var t=this.root,n=0;n<e.length;n++){if(!t[e[n]])return!1;t=t[e[n]]}return!0},t.InvertedIndex.prototype.getNode=function(e){if(!e)return null;for(var t=this.root,n=0;n<e.length;n++){if(!t[e[n]])return null;t=t[e[n]]}return t},t.InvertedIndex.prototype.getDocs=function(e){var t=this.getNode(e);return null==t?{}:t.docs},t.InvertedIndex.prototype.getTermFrequency=function(e,t){var n=this.getNode(e);return null==n?0:t in n.docs?n.docs[t].tf:0},t.InvertedIndex.prototype.getDocFreq=function(e){var t=this.getNode(e);return null==t?0:t.df},t.InvertedIndex.prototype.removeToken=function(e,t){if(e){var n=this.getNode(e);null!=n&&t in n.docs&&(delete n.docs[t],n.df-=1)}},t.InvertedIndex.prototype.expandToken=function(e,t,n){if(null==e||""==e)return[];var t=t||[];if(void 0==n&&(n=this.getNode(e),null==n))return t;n.df>0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e<arguments.length;e++)t=arguments[e],~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t);this.length=this.elements.length},lunr.SortedSet.prototype.toArray=function(){return this.elements.slice()},lunr.SortedSet.prototype.map=function(e,t){return this.elements.map(e,t)},lunr.SortedSet.prototype.forEach=function(e,t){return this.elements.forEach(e,t)},lunr.SortedSet.prototype.indexOf=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]<u[i]?n++:s[n]>u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();o<r.length;o++)i.add(r[o]);return i},lunr.SortedSet.prototype.toJSON=function(){return this.toArray()},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.elasticlunr=t()}(this,function(){return t})}(); diff --git a/components/search/src/lib.rs b/components/search/src/lib.rs new file mode 100644 index 00000000..1a66166e --- /dev/null +++ b/components/search/src/lib.rs @@ -0,0 +1,71 @@ +extern crate elasticlunr; +#[macro_use] +extern crate lazy_static; +extern crate ammonia; + +extern crate errors; +extern crate content; + +use std::collections::{HashMap, HashSet}; +use std::path::PathBuf; + +use elasticlunr::Index; +use content::Section; + + +pub const ELASTICLUNR_JS: &'static str = include_str!("elasticlunr.min.js"); + +lazy_static! { + static ref AMMONIA: ammonia::Builder<'static> = { + let mut clean_content = HashSet::new(); + clean_content.insert("script"); + clean_content.insert("style"); + let mut builder = ammonia::Builder::new(); + builder + .tags(HashSet::new()) + .tag_attributes(HashMap::new()) + .generic_attributes(HashSet::new()) + .link_rel(None) + .allowed_classes(HashMap::new()) + .clean_content_tags(clean_content); + builder + }; +} + + +/// Returns the generated JSON index with all the documents of the site added +/// TODO: is making `in_search_index` apply to subsections of a `false` section useful? +pub fn build_index(sections: &HashMap<PathBuf, Section>) -> String { + let mut index = Index::new(&["title", "body"]); + + for section in sections.values() { + add_section_to_index(&mut index, section); + } + + index.to_json() +} + +fn add_section_to_index(index: &mut Index, section: &Section) { + if !section.meta.in_search_index { + return; + } + + // Don't index redirecting sections + if section.meta.redirect_to.is_none() { + index.add_doc( + §ion.permalink, + &[§ion.meta.title.clone().unwrap_or(String::new()), &AMMONIA.clean(§ion.content).to_string()], + ); + } + + for page in §ion.pages { + if !page.meta.in_search_index { + continue; + } + + index.add_doc( + &page.permalink, + &[&page.meta.title.clone().unwrap_or(String::new()), &AMMONIA.clean(&page.content).to_string()], + ); + } +} diff --git a/components/site/Cargo.toml b/components/site/Cargo.toml index 5e3a83d6..2299932f 100644 --- a/components/site/Cargo.toml +++ b/components/site/Cargo.toml @@ -19,6 +19,7 @@ front_matter = { path = "../front_matter" } pagination = { path = "../pagination" } taxonomies = { path = "../taxonomies" } content = { path = "../content" } +search = { path = "../search" } [dev-dependencies] tempdir = "0.3" diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 547f91b9..9c62cce6 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -15,6 +15,7 @@ extern crate templates; extern crate pagination; extern crate taxonomies; extern crate content; +extern crate search; #[cfg(test)] extern crate tempdir; @@ -509,7 +510,32 @@ impl Site { self.compile_sass(&self.base_path)?; } - self.copy_static_directories() + self.copy_static_directories()?; + + if self.config.build_search_index { + self.build_search_index()?; + } + + Ok(()) + } + + pub fn build_search_index(&self) -> Result<()> { + // index first + create_file( + &self.output_path.join("search_index.js"), + &format!( + "window.searchIndex = {};", + search::build_index(&self.sections) + ), + )?; + + // then elasticlunr.min.js + create_file( + &self.output_path.join("elasticlunr.min.js"), + search::ELASTICLUNR_JS, + )?; + + Ok(()) } pub fn compile_sass(&self, base_path: &Path) -> Result<()> { diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index 516b4818..7bfb041a 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -449,6 +449,17 @@ fn can_build_rss_feed() { #[test] fn can_build_search_index() { - // TODO: generate an index somehow and check for correctness with - // another one + let mut path = env::current_dir().unwrap().parent().unwrap().parent().unwrap().to_path_buf(); + path.push("test_site"); + let mut site = Site::new(&path, "config.toml").unwrap(); + site.load().unwrap(); + site.config.build_search_index = true; + let tmp_dir = TempDir::new("example").expect("create temp dir"); + let public = &tmp_dir.path().join("public"); + site.set_output_path(&public); + site.build().unwrap(); + + assert!(Path::new(&public).exists()); + assert!(file_exists!(public, "elasticlunr.min.js")); + assert!(file_exists!(public, "search_index.js")); } diff --git a/docs/config.toml b/docs/config.toml index ea9e9bac..ce69764a 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -6,6 +6,7 @@ compile_sass = true highlight_code = true insert_anchor_links = true highlight_theme = "kronuz" +build_search_index = true [extra] author = "Vincent Prouillet" diff --git a/docs/sass/_search.scss b/docs/sass/_search.scss new file mode 100644 index 00000000..7fa9f857 --- /dev/null +++ b/docs/sass/_search.scss @@ -0,0 +1,3 @@ +.search-results { + display: none; +} diff --git a/docs/sass/site.scss b/docs/sass/site.scss index fadaa37b..a9e5129c 100644 --- a/docs/sass/site.scss +++ b/docs/sass/site.scss @@ -16,3 +16,4 @@ $link-color: #007CBC; @import "index"; @import "docs"; @import "themes"; +@import "search"; diff --git a/docs/static/search.js b/docs/static/search.js new file mode 100644 index 00000000..27b62340 --- /dev/null +++ b/docs/static/search.js @@ -0,0 +1,60 @@ +function formatSearchResultHeader(term, count) { + if (count === 0) { + return "No search results for '" + term + "'."; + } + + return count + " search result" + count > 1 ? "s" : "" + " for '" + term + "':"; +} + +function formatSearchResultItem(term, item) { + console.log(item); + return '<div class="search-results__item">' + + item + + '</div>'; +} + +function initSearch() { + var $searchInput = document.getElementById("search"); + var $searchResults = document.querySelector(".search-results"); + var $searchResultsHeader = document.querySelector(".search-results__headers"); + var $searchResultsItems = document.querySelector(".search-results__items"); + + var options = { + bool: "AND", + expand: true, + teaser_word_count: 30, + limit_results: 30, + fields: { + title: {boost: 2}, + body: {boost: 1}, + } + }; + var currentTerm = ""; + var index = elasticlunr.Index.load(window.searchIndex); + + $searchInput.addEventListener("keyup", function() { + var term = $searchInput.value.trim(); + if (!index || term === "" || term === currentTerm) { + return; + } + $searchResults.style.display = term === "" ? "block" : "none"; + $searchResultsItems.innerHTML = ""; + var results = index.search(term, options); + currentTerm = term; + $searchResultsHeader.textContent = searchResultText(term, results.length); + for (var i = 0; i < results.length; i++) { + var item = document.createElement("li"); + item.innerHTML = formatSearchResult(results[i], term); + $searchResultsItems.appendChild(item); + } + }); +} + + +if (document.readyState === "complete" || + (document.readyState !== "loading" && !document.documentElement.doScroll) +) { + initSearch(); +} else { + document.addEventListener("DOMContentLoaded", initSearch); +} diff --git a/docs/templates/index.html b/docs/templates/index.html index 5b3bac13..012f1b72 100644 --- a/docs/templates/index.html +++ b/docs/templates/index.html @@ -18,9 +18,15 @@ <a class="white" href="{{ get_url(path="./documentation/_index.md") }}" class="nav-link">Docs</a> <a class="white" href="{{ get_url(path="./themes/_index.md") }}" class="nav-link">Themes</a> <a class="white" href="https://github.com/Keats/gutenberg" class="nav-link">GitHub</a> + <input id="search" type="search" placeholder="Search the docs"> </nav> </header> + <div class="search-results"> + <h2 class="search-results__header"></h2> + <div class="search-results__items"></div> + </div> + <div class="content {% block extra_content_class %}{% endblock extra_content_class %}"> {% block content %} <div class="hero"> @@ -93,5 +99,9 @@ <footer> ©2017-2018 — <a class="white" href="https://vincent.is">Vincent Prouillet</a> and <a class="white" href="https://github.com/Keats/gutenberg/graphs/contributors">contributors</a> </footer> + + <script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js", trailing_slash=false) }}"></script> + <script type="text/javascript" src="{{ get_url(path="search_index.js", trailing_slash=false) }}"></script> + <script type="text/javascript" src="{{ get_url(path="search.js", trailing_slash=false) }}"></script> </body> </html> From b0363298f5831a52afd0afd4036b39aeb8ddbb23 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Tue, 20 Mar 2018 21:27:33 +0100 Subject: [PATCH 15/30] Search is working now --- Cargo.lock | 1927 ++++++++++++++++++++++++++++++++++ components/search/Cargo.toml | 2 +- components/search/src/lib.rs | 21 +- components/site/src/lib.rs | 7 +- docs/sass/_search.scss | 27 + docs/static/search.js | 153 ++- docs/templates/index.html | 16 +- 7 files changed, 2116 insertions(+), 37 deletions(-) create mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..7a33afe5 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1927 @@ +[[package]] +name = "aho-corasick" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ammonia" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "arrayvec" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "atty" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "base64" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "base64" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "base64" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bincode" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bitflags" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bitflags" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bitflags" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bitflags" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "byteorder" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bytes" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bytes" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cc" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cfg-if" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "chrono" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "clap" +version = "2.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cmake" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "config" +version = "0.1.0" +dependencies = [ + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "errors 0.1.0", + "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "highlighting 0.1.0", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "content" +version = "0.1.0" +dependencies = [ + "config 0.1.0", + "errors 0.1.0", + "front_matter 0.1.0", + "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rendering 0.1.0", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "utils 0.1.0", +] + +[[package]] +name = "crossbeam-deque" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-utils" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ctrlc" +version = "3.1.0" +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)", + "nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "debug_unreachable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "dtoa" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "duct" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "os_pipe 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "either" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "elasticlunr-rs" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "rust-stemmers 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "strum 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strum_macros 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "error-chain" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "errors" +version = "0.1.0" +dependencies = [ + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "filetime" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "flate2" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fnv" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "front_matter" +version = "0.1.0" +dependencies = [ + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "errors 0.1.0", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fs_extra" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "fsevent" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fsevent-sys" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futf" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gcc" +version = "0.3.54" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "getopts" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "glob" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "globset" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.6.4 (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.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.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gutenberg" +version = "0.3.3" +dependencies = [ + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)", + "content 0.1.0", + "ctrlc 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "errors 0.1.0", + "front_matter 0.1.0", + "iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rebuild 0.1.0", + "site 0.1.0", + "staticfile 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "term-painter 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "utils 0.1.0", + "ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "highlighting" +version = "0.1.0" +dependencies = [ + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "html5ever" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "markup5ever 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "httparse" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "humansize" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "hyper" +version = "0.10.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "idna" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "inotify" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "iovec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "iron" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 1.8.4 (registry+https://github.com/rust-lang/crates.io-index)", + "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "itoa" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "language-tags" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazy_static" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazy_static" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazycell" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazycell" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "libc" +version = "0.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "linked-hash-map" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "log" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "log" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "maplit" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "markup5ever" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "matches" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memchr" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "memoffset" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "mime" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mime_guess" +version = "1.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz-sys" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miow" +version = "0.1.5" +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)", + "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miow" +version = "0.2.1" +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)", + "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "modifier" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "mount" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sequence_trie 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "net2" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nix" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nix" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nodrop" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "notify" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "inotify 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-integer" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-iter" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-traits" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "num_cpus" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "onig" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "onig_sys 67.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "onig_sys" +version = "67.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "duct 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "os_pipe" +version = "0.6.0" +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)", + "nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pagination" +version = "0.1.0" +dependencies = [ + "config 0.1.0", + "content 0.1.0", + "errors 0.1.0", + "front_matter 0.1.0", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "utils 0.1.0", +] + +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pest" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pest_derive" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_codegen" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_generator" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_shared" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pkg-config" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "plist" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "plugin" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "proc-macro2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pulldown-cmark" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quote" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "quote" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rayon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rayon-core" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rebuild" +version = "0.1.0" +dependencies = [ + "content 0.1.0", + "errors 0.1.0", + "front_matter 0.1.0", + "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "highlighting 0.1.0", + "site 0.1.0", + "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "redox_syscall" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "redox_termios" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.6.4 (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.3 (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]] +name = "regex-syntax" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "regex-syntax" +version = "0.5.3" +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]] +name = "remove_dir_all" +version = "0.3.0" +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)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rendering" +version = "0.1.0" +dependencies = [ + "errors 0.1.0", + "front_matter 0.1.0", + "highlighting 0.1.0", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "templates 0.1.0", + "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "utils 0.1.0", +] + +[[package]] +name = "rust-stemmers" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "safemem" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "same-file" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sass-rs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sass-sys" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "search" +version = "0.1.0" +dependencies = [ + "ammonia 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "content 0.1.0", + "elasticlunr-rs 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "errors 0.1.0", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sequence_trie" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "serde" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "serde_derive" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive_internals 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_derive_internals" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_json" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sha1" +version = "0.2.0" +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.39 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "siphasher" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "site" +version = "0.1.0" +dependencies = [ + "config 0.1.0", + "content 0.1.0", + "errors 0.1.0", + "front_matter 0.1.0", + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "pagination 0.1.0", + "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sass-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "search 0.1.0", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "taxonomies 0.1.0", + "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "templates 0.1.0", + "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "utils 0.1.0", +] + +[[package]] +name = "slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "slab" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "slab" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "slug" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unidecode 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "staticfile" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "string_cache" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "string_cache_codegen" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "string_cache_shared" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "strsim" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "strum" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "strum_macros" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn" +version = "0.12.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "synom" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syntect" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "onig 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "taxonomies" +version = "0.1.0" +dependencies = [ + "config 0.1.0", + "content 0.1.0", + "errors 0.1.0", + "front_matter 0.1.0", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "utils 0.1.0", +] + +[[package]] +name = "tempdir" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "templates" +version = "0.1.0" +dependencies = [ + "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "config 0.1.0", + "content 0.1.0", + "errors 0.1.0", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "taxonomies 0.1.0", + "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "utils 0.1.0", +] + +[[package]] +name = "tendril" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "utf-8 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tera" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.11.0 (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)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_derive 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "term" +version = "0.4.6" +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)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "term-painter" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "termion" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "textwrap" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thread_local" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "time" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "toml" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "traitobject" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "typeable" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "typemap" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ucd-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicase" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicode-width" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicode-xid" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unidecode" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unreachable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unsafe-any" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "url" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "utf-8" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "utf8-ranges" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "utils" +version = "0.1.0" +dependencies = [ + "errors 0.1.0", + "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "vec_map" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "version_check" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "walkdir" +version = "2.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ws" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "xml-rs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "yaml-rust" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[metadata] +"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" +"checksum ammonia 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd4c682378117e4186a492b2252b9537990e1617f44aed9788b9a1149de45477" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +"checksum atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "af80143d6f7608d746df1520709e5d141c96f240b0e62b0aa41bdfb53374d9d4" +"checksum backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2" +"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" +"checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" +"checksum base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c4a342b450b268e1be8036311e2c613d7f8a7ed31214dff1cc3b60852a3168d" +"checksum base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "229d032f1a99302697f10b27167ae6d03d49d032e6a8e2550e8d3fc13356d2b4" +"checksum bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9a6301db0b49fb63551bc15b5ae348147101cdf323242b93ec7546d5002ff1af" +"checksum bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3" +"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" +"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" +"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" +"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" +"checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27" +"checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" +"checksum cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d9324127e719125ec8a16e6e509abc4c641e773621b50aea695af3f005656d61" +"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +"checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" +"checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536" +"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb" +"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" +"checksum crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59796cc6cbbdc6bb319161349db0c3250ec73ec7fcb763a51065ec4e2e158552" +"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" +"checksum ctrlc 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "653abc99aa905f693d89df4797fadc08085baee379db92be9f2496cefe8a6f2c" +"checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3" +"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" +"checksum duct 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8c553d79f40e74f7f611e49bf3429b6760cff79596b61818291c27cc0b18549d" +"checksum either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740178ddf48b1a9e878e6d6509a1442a2d42fd2928aae8e7a6f8a36fb01981b3" +"checksum elasticlunr-rs 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18c5413e83a7be7e86ce0afce03b23508db56082edbb2b28a178e6275fa3957d" +"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" +"checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f" +"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" +"checksum fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c4bbbf71584aeed076100b5665ac14e3d85eeb31fdbb45fbd41ef9a682b5ec05" +"checksum fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a772d36c338d07a032d5375a36f15f9a7043bf0cb8ce7cee658e037c6032874" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3" +"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" +"checksum getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05" +"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +"checksum globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1e96ab92362c06811385ae9a34d2698e8a1160745e0c78fbb434a44c8de3fabc" +"checksum html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e579ac8647178ab915d400d7d22938bda5cd351c6c62e1c294d56884ccfc75fe" +"checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" +"checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" +"checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2" +"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" +"checksum inotify 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887fcc180136e77a85e6a6128579a719027b1bab9b1c38ea4444244fe262c20c" +"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" +"checksum iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d8e17268922834707e1c29e8badbf9c712c9c43378e1b6a3388946baff10be2" +"checksum itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92a9df60778f789c37f76778ae8d0a2471c41baa8b059d98a5873c978f549587" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" +"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" +"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" +"checksum lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b585b7a6811fb03aa10e74b278a0f00f8dd9b45dc681f148bb29fa5cb61859b" +"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" +"checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff" +"checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" +"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" +"checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" +"checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43" +"checksum markup5ever 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfedc97d5a503e96816d10fedcd5b42f760b2e525ce2f7ec71f6a41780548475" +"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" +"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" +"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" +"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" +"checksum mime_guess 1.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b7e2b09d08313f84e0fb82d13a4d859109a17543fe9af3b6d941dc1431f7de79" +"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" +"checksum mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a637d1ca14eacae06296a008fa7ad955347e34efcb5891cfd8ba05491a37907e" +"checksum mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "6d771e3ef92d58a8da8df7d6976bfca9371ed1de6619d9d5a5ce5b1f29b85bfe" +"checksum miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3e690c5df6b2f60acd45d56378981e827ff8295562fc8d34f573deb267a59cd1" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" +"checksum mount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e25c06012941aaf8c75f2eaf7ec5c48cf69f9fc489ab3eb3589edc107e386f0b" +"checksum net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "9044faf1413a1057267be51b5afba8eb1090bd2231c693664aa1db716fe1eae0" +"checksum nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb3ddedaa14746434a02041940495bf11325c22f6d36125d3bdd56090d50a79" +"checksum nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2c5afeb0198ec7be8569d666644b574345aad2e95a53baf3a532da3e0f3fb32" +"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" +"checksum notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5c3812da3098f210a0bb440f9c008471a031aa4c1de07a264fdd75456c95a4eb" +"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" +"checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" +"checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" +"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" +"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" +"checksum onig 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c54a94ac4d9f3eec22b189b8a727e2ded82aee21e8ae7ffbba2468739161b" +"checksum onig_sys 67.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34d894e8da3390097d99eb197eac2ec443277551388eff0f97c5f789933350ee" +"checksum os_pipe 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f547689aea1f11fac90333d573854a8e3e52a9160df1c42aefa8cd16734a3c0" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +"checksum pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0fce5d8b5cc33983fc74f78ad552b5522ab41442c4ca91606e4236eb4b5ceefc" +"checksum pest_derive 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6453faedc5c9980a3c278f28b1df33344a79cc6d4a2fd96e2b56288374dc822a" +"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" +"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f" +"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" +"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" +"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" +"checksum plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c61ac2afed2856590ae79d6f358a24b85ece246d2aa134741a66d589519b7503" +"checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" +"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +"checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" +"checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" +"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" +"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" +"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" +"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" +"checksum rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80e811e76f1dbf68abf87a759083d34600017fc4e10b6bd5ad84a700f9dba4b1" +"checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8" +"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" +"checksum regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "aec3f58d903a7d2a9dc2bf0e41a746f4530e0cab6b615494e058f67a3ef947fb" +"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" +"checksum regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b2550876c31dc914696a6c2e01cbce8afba79a93c8ae979d2fe051c0230b3756" +"checksum remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d2f806b0fcdabd98acd380dc8daef485e22bcb7cddc811d1337967f2528cf5" +"checksum rust-stemmers 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fbf06149ec391025664a5634200ced1afb489f0f3f8a140d515ebc0eb04b4bc0" +"checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb" +"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" +"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" +"checksum sass-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90f8cf6e645aa843ffffcbdc1e8752b1f221dfa314c81895aeb229a77aea7e05" +"checksum sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a71105d35ea2c3622fceb9128897115932c698561940a453452744413faf3561" +"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum sequence_trie 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "32157204e5c9d3c04007bd7e56e96e987635ce0e8e23c085b1e403861b76c351" +"checksum serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe95aa0d46f04ce5c3a88bdcd4114ecd6144ed0b2725ebca2f1127744357807" +"checksum serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "23b163a6ce7e1aa897919f9d8e40bd1f8a6f95342ed57727ae31387a01a7a356" +"checksum serde_derive_internals 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "370aa477297975243dc914d0b0e1234927520ec311de507a560fbd1c80f7ab8c" +"checksum serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "28556329a1d04efa036376c9588a0ed8655e202676d918733ca8a14740ee31be" +"checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" +"checksum shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bcd5e483b3475af9bc2a35311c2f3bbf0bd98fde91410ab15a0d4ba3c3127b4e" +"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.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 slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f5ff4b43cb07b86c5f9236c92714a22cdf9e5a27a7d85e398e2c9403328cb8" +"checksum staticfile 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "babd3fa68bb7e3994ce181c5f21ff3ff5fffef7b18b8a10163b45e4dafc6fb86" +"checksum string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39cb4173bcbd1319da31faa5468a7e3870683d7a237150b0b0aaafd546f6ad12" +"checksum string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "479cde50c3539481f33906a387f2bd17c8e87cb848c35b6021d41fb81ff9b4d7" +"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" +"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" +"checksum strum 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "099e21b5dd6dd07b5adcf8c4b723a7c0b7efd7a9359bf963d58c0caae8532545" +"checksum strum_macros 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0dd9bd569e88028750e3ae5c25616b8278ac16a8e61aba4339195c72396d49e1" +"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" +"checksum syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "8c5bc2d6ff27891209efa5f63e9de78648d7801f085e4653701a692ce938d6fd" +"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" +"checksum syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db9fffcb25a761118df53811bd1cfcd54cf57fcbc51e1ea3167ae263477129ad" +"checksum tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f73eebdb68c14bcb24aef74ea96079830e7fa7b31a6106e42ea7ee887c1e134e" +"checksum tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9de21546595a0873061940d994bbbc5c35f024ae4fd61ec5c5b159115684f508" +"checksum tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fc1a35d04c2444875b1319293fbc72c00215ae6220f8c70f9f14fefa5eaae0c6" +"checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1" +"checksum term-painter 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "dcaa948f0e3e38470cd8dc8dcfe561a75c9e43f28075bb183845be2b9b3c08cf" +"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" +"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" +"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" +"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" +"checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e" +"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" +"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" +"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" +"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" +"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" +"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" +"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" +"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unidecode 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2adb95ee07cd579ed18131f2d9e7a17c25a4b76022935c7f2460d2bfae89fd2" +"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91" +"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +"checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" +"checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" +"checksum utf-8 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1262dfab4c30d5cb7c07026be00ee343a6cf5027fdc0104a9160f354e5db75c" +"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" +"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" +"checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" +"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "89c48c53bf9dee34411a08993c10b879c36e105d609b46e25673befe3a5c1320" +"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +"checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" +"checksum yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57ab38ee1a4a266ed033496cf9af1828d8d6e6c1cfa5f643a2809effcae4d628" diff --git a/components/search/Cargo.toml b/components/search/Cargo.toml index de732278..97aca1aa 100644 --- a/components/search/Cargo.toml +++ b/components/search/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] [dependencies] -elasticlunr-rs = "1" +elasticlunr-rs = "2" ammonia = "1" lazy_static = "1" diff --git a/components/search/src/lib.rs b/components/search/src/lib.rs index 1a66166e..44365035 100644 --- a/components/search/src/lib.rs +++ b/components/search/src/lib.rs @@ -2,15 +2,17 @@ extern crate elasticlunr; #[macro_use] extern crate lazy_static; extern crate ammonia; - +#[macro_use] extern crate errors; extern crate content; use std::collections::{HashMap, HashSet}; use std::path::PathBuf; -use elasticlunr::Index; +use elasticlunr::{Index, Language}; + use content::Section; +use errors::Result; pub const ELASTICLUNR_JS: &'static str = include_str!("elasticlunr.min.js"); @@ -33,16 +35,23 @@ lazy_static! { } -/// Returns the generated JSON index with all the documents of the site added +/// Returns the generated JSON index with all the documents of the site added using +/// the language given +/// Errors if the language given is not available in Elasticlunr /// TODO: is making `in_search_index` apply to subsections of a `false` section useful? -pub fn build_index(sections: &HashMap<PathBuf, Section>) -> String { - let mut index = Index::new(&["title", "body"]); +pub fn build_index(sections: &HashMap<PathBuf, Section>, lang: &str) -> Result<String> { + let language = match Language::from_code(lang) { + Some(l) => l, + None => { bail!("Tried to build search index for language {} which is not supported", lang); } + }; + + let mut index = Index::with_language(language, &["title", "body"]); for section in sections.values() { add_section_to_index(&mut index, section); } - index.to_json() + Ok(index.to_json()) } fn add_section_to_index(index: &mut Index, section: &Section) { diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 9c62cce6..6880dd5b 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -21,13 +21,12 @@ extern crate search; extern crate tempdir; use std::collections::HashMap; -use std::fs::{remove_dir_all, copy}; +use std::fs::{create_dir_all, remove_dir_all, copy}; use std::mem; use std::path::{Path, PathBuf}; use glob::glob; use tera::{Tera, Context}; -use walkdir::WalkDir; use sass_rs::{Options as SassOptions, OutputStyle, compile_file}; use errors::{Result, ResultExt}; @@ -522,10 +521,10 @@ impl Site { pub fn build_search_index(&self) -> Result<()> { // index first create_file( - &self.output_path.join("search_index.js"), + &self.output_path.join(&format!("search_index.{}.js", self.config.default_language)), &format!( "window.searchIndex = {};", - search::build_index(&self.sections) + search::build_index(&self.sections, &self.config.default_language)? ), )?; diff --git a/docs/sass/_search.scss b/docs/sass/_search.scss index 7fa9f857..8478d72b 100644 --- a/docs/sass/_search.scss +++ b/docs/sass/_search.scss @@ -1,3 +1,30 @@ +.search-container { + display: inline-block; + position: relative; + width: 300px; + + input { + width: 100%; + } +} + .search-results { display: none; + position: absolute; + background: white; + color: black; + padding: 1rem; + width: 100%; + box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.5); + max-height: 500px; + overflow: auto; + + &__items { + list-style: none; + } + + &__item { + margin-bottom: 1rem; + font-size: 0.9rem; + } } diff --git a/docs/static/search.js b/docs/static/search.js index 27b62340..830b7bb3 100644 --- a/docs/static/search.js +++ b/docs/static/search.js @@ -1,29 +1,141 @@ -function formatSearchResultHeader(term, count) { - if (count === 0) { - return "No search results for '" + term + "'."; - } +function debounce(func, wait) { + var timeout; - return count + " search result" + count > 1 ? "s" : "" + " for '" + term + "':"; + return function () { + var context = this; + var args = arguments; + clearTimeout(timeout); + + timeout = setTimeout(function () { + timeout = null; + func.apply(context, args); + }, wait); + }; } -function formatSearchResultItem(term, item) { - console.log(item); +// Taken from mdbook +// The strategy is as follows: +// First, assign a value to each word in the document: +// Words that correspond to search terms (stemmer aware): 40 +// Normal words: 2 +// First word in a sentence: 8 +// Then use a sliding window with a constant number of words and count the +// sum of the values of the words within the window. Then use the window that got the +// maximum sum. If there are multiple maximas, then get the last one. +// Enclose the terms in <b>. +function makeTeaser(body, terms) { + var TERM_WEIGHT = 40; + var NORMAL_WORD_WEIGHT = 2; + var FIRST_WORD_WEIGHT = 8; + var TEASER_MAX_WORDS = 30; + + var stemmedTerms = terms.map(function (w) { + return elasticlunr.stemmer(w.toLowerCase()); + }); + var termFound = false; + var index = 0; + var weighted = []; // contains elements of ["word", weight, index_in_document] + + // split in sentences, then words + var sentences = body.toLowerCase().split(". "); + + for (var i in sentences) { + var words = sentences[i].split(" "); + var value = FIRST_WORD_WEIGHT; + + for (var j in words) { + var word = words[j]; + + if (word.length > 0) { + for (var k in stemmedTerms) { + if (elasticlunr.stemmer(word).startsWith(stemmedTerms[k])) { + value = TERM_WEIGHT; + termFound = true; + } + } + weighted.push([word, value, index]); + value = NORMAL_WORD_WEIGHT; + } + + index += word.length; + index += 1; // ' ' or '.' if last word in sentence + } + + index += 1; // because we split at a two-char boundary '. ' + } + + if (weighted.length === 0) { + return body; + } + + var windowWeights = []; + var windowSize = Math.min(weighted.length, TEASER_MAX_WORDS); + // We add a window with all the weights first + var curSum = 0; + for (var i = 0; i < windowSize; i++) { + curSum += weighted[i][1]; + } + windowWeights.push(curSum); + + for (var i = 0; i < weighted.length - windowSize; i++) { + curSum -= weighted[i][1]; + curSum += weighted[i + windowSize][1]; + windowWeights.push(curSum); + } + + // If we didn't find the term, just pick the first window + var maxSumIndex = 0; + if (termFound) { + var maxFound = 0; + // backwards + for (var i = windowWeights.length - 1; i >= 0; i--) { + if (windowWeights[i] > maxFound) { + maxFound = windowWeights[i]; + maxSumIndex = i; + } + } + } + + var teaser = []; + var startIndex = weighted[maxSumIndex][2]; + for (var i = maxSumIndex; i < maxSumIndex + windowSize; i++) { + var word = weighted[i]; + if (startIndex < word[2]) { + // missing text from index to start of `word` + teaser.push(body.substring(startIndex, word[2])); + startIndex = word[2]; + } + + // add <em/> around search terms + if (word[1] === TERM_WEIGHT) { + teaser.push("<b>"); + } + startIndex = word[2] + word[0].length; + teaser.push(body.substring(word[2], startIndex)); + + if (word[1] === TERM_WEIGHT) { + teaser.push("</b>"); + } + } + teaser.push("…"); + return teaser.join(""); +} + +function formatSearchResultItem(item, terms) { return '<div class="search-results__item">' - + item + + `<a href="${item.ref}">${item.doc.title}</a>` + + `<div>${makeTeaser(item.doc.body, terms)}</div>` + '</div>'; } function initSearch() { var $searchInput = document.getElementById("search"); var $searchResults = document.querySelector(".search-results"); - var $searchResultsHeader = document.querySelector(".search-results__headers"); var $searchResultsItems = document.querySelector(".search-results__items"); + var MAX_ITEMS = 10; var options = { bool: "AND", - expand: true, - teaser_word_count: 30, - limit_results: 30, fields: { title: {boost: 2}, body: {boost: 1}, @@ -32,22 +144,25 @@ function initSearch() { var currentTerm = ""; var index = elasticlunr.Index.load(window.searchIndex); - $searchInput.addEventListener("keyup", function() { + $searchInput.addEventListener("keyup", debounce(function() { var term = $searchInput.value.trim(); - if (!index || term === "" || term === currentTerm) { + if (term === currentTerm || !index) { return; } - $searchResults.style.display = term === "" ? "block" : "none"; + $searchResults.style.display = term === "" ? "none" : "block"; $searchResultsItems.innerHTML = ""; + if (term === "") { + return; + } + var results = index.search(term, options); currentTerm = term; - $searchResultsHeader.textContent = searchResultText(term, results.length); - for (var i = 0; i < results.length; i++) { + for (var i = 0; i < Math.min(results.length, MAX_ITEMS); i++) { var item = document.createElement("li"); - item.innerHTML = formatSearchResult(results[i], term); + item.innerHTML = formatSearchResultItem(results[i], term.split(" ")); $searchResultsItems.appendChild(item); } - }); + }, 150)); } diff --git a/docs/templates/index.html b/docs/templates/index.html index 012f1b72..be9f3704 100644 --- a/docs/templates/index.html +++ b/docs/templates/index.html @@ -18,15 +18,17 @@ <a class="white" href="{{ get_url(path="./documentation/_index.md") }}" class="nav-link">Docs</a> <a class="white" href="{{ get_url(path="./themes/_index.md") }}" class="nav-link">Themes</a> <a class="white" href="https://github.com/Keats/gutenberg" class="nav-link">GitHub</a> - <input id="search" type="search" placeholder="Search the docs"> + + <div class="search-container"> + <input id="search" type="search" placeholder="Search the docs"> + + <div class="search-results"> + <div class="search-results__items"></div> + </div> + </div> </nav> </header> - <div class="search-results"> - <h2 class="search-results__header"></h2> - <div class="search-results__items"></div> - </div> - <div class="content {% block extra_content_class %}{% endblock extra_content_class %}"> {% block content %} <div class="hero"> @@ -101,7 +103,7 @@ </footer> <script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js", trailing_slash=false) }}"></script> - <script type="text/javascript" src="{{ get_url(path="search_index.js", trailing_slash=false) }}"></script> + <script type="text/javascript" src="{{ get_url(path="search_index.en.js", trailing_slash=false) }}"></script> <script type="text/javascript" src="{{ get_url(path="search.js", trailing_slash=false) }}"></script> </body> </html> From 2c538d3776b951c3ce077ad9a6f6ac6312c76d1a Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Tue, 20 Mar 2018 23:08:20 +0100 Subject: [PATCH 16/30] Fix some bugs in search --- components/site/src/lib.rs | 2 +- components/site/tests/site.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 6880dd5b..3ab661f4 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -204,7 +204,7 @@ impl Site { // a _index.md to render the index page let index_path = self.index_section_path(); if let Some(ref index_section) = self.sections.get(&index_path) { - if self.config.build_search_index && index_section.meta.in_search_index { + if self.config.build_search_index && !index_section.meta.in_search_index { bail!( "You have enabled search in the config but disabled it in the index section: \ either turn off the search in the config or remote `in_search_index = true` from the \ diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index 7bfb041a..bb24c3c3 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -461,5 +461,5 @@ fn can_build_search_index() { assert!(Path::new(&public).exists()); assert!(file_exists!(public, "elasticlunr.min.js")); - assert!(file_exists!(public, "search_index.js")); + assert!(file_exists!(public, "search_index.en.js")); } From 6100a430c41faa54ffe769c0394b2213ed97816e Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Wed, 21 Mar 2018 15:25:25 +0100 Subject: [PATCH 17/30] Design tweaks on docs --- docs/sass/_search.scss | 21 +++++++++++++++++++-- docs/static/search.js | 5 +++++ docs/templates/index.html | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/docs/sass/_search.scss b/docs/sass/_search.scss index 8478d72b..f1ffb70e 100644 --- a/docs/sass/_search.scss +++ b/docs/sass/_search.scss @@ -5,6 +5,7 @@ input { width: 100%; + padding: 0.5rem; } } @@ -14,17 +15,33 @@ background: white; color: black; padding: 1rem; - width: 100%; box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.5); max-height: 500px; overflow: auto; + width: 150%; + right: 0; &__items { list-style: none; } + li { + margin-top: 1rem; + border-bottom: 1px solid #ccc; + font-size: 0.9rem; + + &:first-of-type { + margin-top: 0; + } + } + &__item { margin-bottom: 1rem; - font-size: 0.9rem; + + a { + font-size: 1.2rem; + display: inline-block; + margin-bottom: 0.5rem; + } } } diff --git a/docs/static/search.js b/docs/static/search.js index 830b7bb3..c24a5962 100644 --- a/docs/static/search.js +++ b/docs/static/search.js @@ -156,6 +156,11 @@ function initSearch() { } var results = index.search(term, options); + if (results.length === 0) { + $searchResults.style.display = "none"; + return; + } + currentTerm = term; for (var i = 0; i < Math.min(results.length, MAX_ITEMS); i++) { var item = document.createElement("li"); diff --git a/docs/templates/index.html b/docs/templates/index.html index be9f3704..87d795de 100644 --- a/docs/templates/index.html +++ b/docs/templates/index.html @@ -20,7 +20,7 @@ <a class="white" href="https://github.com/Keats/gutenberg" class="nav-link">GitHub</a> <div class="search-container"> - <input id="search" type="search" placeholder="Search the docs"> + <input id="search" type="search" placeholder="🔎 Search the docs"> <div class="search-results"> <div class="search-results__items"></div> From 73ddbf7152876862e18f44d06646c3896b8104f6 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Wed, 21 Mar 2018 16:18:24 +0100 Subject: [PATCH 18/30] Write some docs --- CHANGELOG.md | 1 + components/content/src/page.rs | 2 +- components/content/src/sorting.rs | 2 +- components/front_matter/src/page.rs | 8 +++---- components/search/src/lib.rs | 2 +- components/site/src/lib.rs | 16 ++++++-------- docs/content/documentation/content/page.md | 5 +++++ docs/content/documentation/content/search.md | 22 +++++++++++++++++++ docs/content/documentation/content/section.md | 4 ++++ .../getting-started/configuration.md | 4 ++++ src/cmd/init.rs | 1 - 11 files changed, 50 insertions(+), 17 deletions(-) create mode 100644 docs/content/documentation/content/search.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 46dfb3ff..a75c1e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ to the public directory - Do not require themes to have a static folder - Now supports indented Sass syntax +- Add search index building ## 0.3.2 (2018-03-05) diff --git a/components/content/src/page.rs b/components/content/src/page.rs index c02680d2..26ebbf2b 100644 --- a/components/content/src/page.rs +++ b/components/content/src/page.rs @@ -75,7 +75,7 @@ impl Page { } pub fn is_draft(&self) -> bool { - self.meta.draft.unwrap_or(false) + self.meta.draft } /// Parse a page given the content of the .md file diff --git a/components/content/src/sorting.rs b/components/content/src/sorting.rs index 89ef9c90..b96c6b1d 100644 --- a/components/content/src/sorting.rs +++ b/components/content/src/sorting.rs @@ -149,7 +149,7 @@ mod tests { fn create_draft_page_with_order(order: usize) -> Page { let mut front_matter = PageFrontMatter::default(); front_matter.order = Some(order); - front_matter.draft = Some(true); + front_matter.draft = true; Page::new("content/hello.md", front_matter) } diff --git a/components/front_matter/src/page.rs b/components/front_matter/src/page.rs index a30b68e0..86cde2a9 100644 --- a/components/front_matter/src/page.rs +++ b/components/front_matter/src/page.rs @@ -72,7 +72,7 @@ pub struct PageFrontMatter { #[serde(default, deserialize_with = "from_toml_datetime")] pub date: Option<String>, /// Whether this page is a draft and should be ignored for pagination etc - pub draft: Option<bool>, + pub draft: bool, /// The page slug. Will be used instead of the filename if present /// Can't be an empty string if present pub slug: Option<String>, @@ -91,7 +91,7 @@ pub struct PageFrontMatter { /// All aliases for that page. Gutenberg will create HTML templates that will /// redirect to this #[serde(skip_serializing)] - pub aliases: Option<Vec<String>>, + pub aliases: Vec<String>, /// Specify a template different from `page.html` to use for that page #[serde(skip_serializing)] pub template: Option<String>, @@ -170,14 +170,14 @@ impl Default for PageFrontMatter { title: None, description: None, date: None, - draft: None, + draft: false, slug: None, path: None, tags: None, category: None, order: None, weight: None, - aliases: None, + aliases: Vec::new(), in_search_index: true, template: None, extra: Map::new(), diff --git a/components/search/src/lib.rs b/components/search/src/lib.rs index 44365035..ea3bcb21 100644 --- a/components/search/src/lib.rs +++ b/components/search/src/lib.rs @@ -68,7 +68,7 @@ fn add_section_to_index(index: &mut Index, section: &Section) { } for page in §ion.pages { - if !page.meta.in_search_index { + if !page.meta.in_search_index || page.meta.draft { continue; } diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 3ab661f4..210f8483 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -597,18 +597,16 @@ impl Site { pub fn render_aliases(&self) -> Result<()> { for page in self.pages.values() { - if let Some(ref aliases) = page.meta.aliases { - for alias in aliases { - let mut output_path = self.output_path.to_path_buf(); - for component in alias.split('/') { - output_path.push(&component); + for alias in &page.meta.aliases { + let mut output_path = self.output_path.to_path_buf(); + for component in alias.split('/') { + output_path.push(&component); - if !output_path.exists() { - create_directory(&output_path)?; - } + if !output_path.exists() { + create_directory(&output_path)?; } - create_file(&output_path.join("index.html"), &render_redirect_template(&page.permalink, &self.tera)?)?; } + create_file(&output_path.join("index.html"), &render_redirect_template(&page.permalink, &self.tera)?)?; } } Ok(()) diff --git a/docs/content/documentation/content/page.md b/docs/content/documentation/content/page.md index 14131a66..1a8b7707 100644 --- a/docs/content/documentation/content/page.md +++ b/docs/content/documentation/content/page.md @@ -54,6 +54,11 @@ weight = 0 # current one. This takes an array of path, not URLs. aliases = [] +# Whether the page should be in the search index. This is only used if +# `build_search_index` is set to true in the config and the parent section +# hasn't set `in_search_index` to false in its front-matter +in_search_index = true + # Template to use to render this page template = "page.html" diff --git a/docs/content/documentation/content/search.md b/docs/content/documentation/content/search.md new file mode 100644 index 00000000..c3e79f55 --- /dev/null +++ b/docs/content/documentation/content/search.md @@ -0,0 +1,22 @@ ++++ +title = "Search" +weight = 100 ++++ + +Gutenberg can build a search index from the sections and pages content to +be used by a JavaScript library: [elasticlunr](http://elasticlunr.com/). + +To enable it, you only need to set `build_search_index = true` in your `config.toml` and Gutenberg will +generate an index for the `default_language` set for all pages not excluded from the search index. + +It is very important to set the `default_language` in your `config.toml` if you are writing a site not in +English: the index building pipelines are very different depending on the language. + +After `gutenberg build` or `gutenberg serve`, you should see two files in your static directory: + +- `search_index.${default_language}.js`: so `search_index.en.js` for a default setup +- `elasticlunr.min.js` + +As each site will be different, Gutenberg makes no assumptions about how your search and doesn't provide +the JavaScript/CSS code to do an actual search and display results. You can however look at how this very site +is implementing it to have an idea: [search.js](https://github.com/Keats/gutenberg/tree/master/docs/static/search.js). diff --git a/docs/content/documentation/content/section.md b/docs/content/documentation/content/section.md index 00739877..bb5cd28c 100644 --- a/docs/content/documentation/content/section.md +++ b/docs/content/documentation/content/section.md @@ -52,6 +52,10 @@ paginate_path = "page" # Options are "left", "right" and "none" insert_anchor_links = "none" +# Whether the section pages should be in the search index. This is only used if +# `build_search_index` is set to true in the config +in_search_index = true + # Whether to render that section homepage or not. # Useful when the section is only there to organize things but is not meant # to be used directly diff --git a/docs/content/documentation/getting-started/configuration.md b/docs/content/documentation/getting-started/configuration.md index 11ed9040..58df27ad 100644 --- a/docs/content/documentation/getting-started/configuration.md +++ b/docs/content/documentation/getting-started/configuration.md @@ -51,6 +51,10 @@ generate_categories_pages = false # Whether to compile the Sass files found in the `sass` directory compile_sass = false +# Whether to build a search index out of the pages and section +# content for the `default_language` +build_search_index = false + # A list of glob patterns specifying asset files to ignore when # processing the content directory. # Defaults to none, which means all asset files are copied over to the public folder. diff --git a/src/cmd/init.rs b/src/cmd/init.rs index 8aae24a0..d7b57601 100644 --- a/src/cmd/init.rs +++ b/src/cmd/init.rs @@ -58,7 +58,6 @@ pub fn create_new_project(name: &str) -> Result<()> { if compile_sass { create_dir(path.join("sass"))?; } - // TODO: if search == true, copy a lunr js file embedded in gutenberg println!(); console::success(&format!("Done! Your site was created in {:?}", canonicalize(path).unwrap())); From 110e846fbe44c5b3c30104328046cec75f0ade52 Mon Sep 17 00:00:00 2001 From: Erich Gubler <erichdongubler@gmail.com> Date: Thu, 22 Mar 2018 15:46:40 -0600 Subject: [PATCH 19/30] Docs: add an entry for Sass processing in the main Content section --- docs/content/documentation/content/sass.md | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/content/documentation/content/sass.md diff --git a/docs/content/documentation/content/sass.md b/docs/content/documentation/content/sass.md new file mode 100644 index 00000000..45e27f43 --- /dev/null +++ b/docs/content/documentation/content/sass.md @@ -0,0 +1,42 @@ ++++ +title = "Sass" +weight = 110 ++++ + +Sass is a popular CSS extension language that approaches some of the harder +parts of maintaining large sets of CSS rules. If you're curious about what Sass +is and why it might be useful for styling your static site, the following links +may be of interest: + +* The [official Sass website](http://sass-lang.com/) +* [Why Sass?](https://alistapart.com/article/why-sass), by Dan Cederholm + +## Using Sass in Gutenberg + +Gutenberg processes any files with the `sass` or `scss` extensions in the `sass` +folder, and places the processed output into a `css` file with the same folder +structure and base name into the `public` folder: + +```bash +. +└── sass + ├── style.scss // -> ./public/style.css + ├── indented_style.sass // -> ./public/indented_style.css + ├── _include.scss // This file won't get put into the `public` folder, but other files can @import it. + ├── assets + │ ├── fancy.scss // -> ./public/assets/fancy.css + │ ├── same_name.scss // -> ./public/assets/same_name.css + │ ├── same_name.sass // CONFLICT! This has the same base name as the file above, so Gutenberg will return an error. + │ └── _common_mixins.scss // This file won't get put into the `public` folder, but other files can @import it. + └── secret-side-project + └── style.scss // -> ./public/secret-side-project/fancy.css +``` + +Files with a leading underscore in the name are not placed into the `public` +folder, but can still be used as `@import` dependencies. For more information, see the "Partials" section of +[Sass Basics](https://sass-lang.com/guide#partials). + +Files with the `scss` extension use ["Sassy CSS" syntax](http://sass-lang.com/documentation/#Formatting), +while files with the `sass` extension use the ["indented" syntax](http://sass-lang.com/documentation/file.INDENTED_SYNTAX.html). +Gutenberg will return an error if a `scss` and `sass` file exist with the same +base name in the same folder to avoid confusion -- see the example above. From b38a50409463975b4cb121097d3cd6d3afa89491 Mon Sep 17 00:00:00 2001 From: Erich Gubler <erichdongubler@gmail.com> Date: Thu, 22 Mar 2018 15:47:34 -0600 Subject: [PATCH 20/30] Update _index.md --- docs/content/documentation/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/content/documentation/_index.md b/docs/content/documentation/_index.md index 216fac9c..ce250852 100644 --- a/docs/content/documentation/_index.md +++ b/docs/content/documentation/_index.md @@ -17,6 +17,7 @@ Content - Internal links & deep linking - Table of contents - Syntax highlighting + - Sass Templates - Intro From 72d50eed7f25f9a29b7d1a4f7683d62bfbf7264d Mon Sep 17 00:00:00 2001 From: Erich Gubler <erichdongubler@gmail.com> Date: Fri, 23 Mar 2018 08:52:05 -0600 Subject: [PATCH 21/30] Sass docs: try replacing `//` comments with `#` comments when they don't indicate output paths, try to resolve single-quote issue --- docs/content/documentation/content/sass.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/documentation/content/sass.md b/docs/content/documentation/content/sass.md index 45e27f43..e6620f32 100644 --- a/docs/content/documentation/content/sass.md +++ b/docs/content/documentation/content/sass.md @@ -22,12 +22,12 @@ structure and base name into the `public` folder: └── sass ├── style.scss // -> ./public/style.css ├── indented_style.sass // -> ./public/indented_style.css - ├── _include.scss // This file won't get put into the `public` folder, but other files can @import it. + ├── _include.scss # This file won't get put into the `public` folder, but other files can @import it. ├── assets │ ├── fancy.scss // -> ./public/assets/fancy.css │ ├── same_name.scss // -> ./public/assets/same_name.css - │ ├── same_name.sass // CONFLICT! This has the same base name as the file above, so Gutenberg will return an error. - │ └── _common_mixins.scss // This file won't get put into the `public` folder, but other files can @import it. + │ ├── same_name.sass # CONFLICT! This has the same base name as the file above, so Gutenberg will return an error. + │ └── _common_mixins.scss # This file won't get put into the `public` folder, but other files can @import it. └── secret-side-project └── style.scss // -> ./public/secret-side-project/fancy.css ``` From 0a34184ac5b06f57f6cfa35e09e5969905e6e6fe Mon Sep 17 00:00:00 2001 From: Tim DuBois <tim@neophilus.net> Date: Sun, 25 Mar 2018 13:05:42 +0200 Subject: [PATCH 22/30] Anchor tag for summary --- components/content/src/page.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/content/src/page.rs b/components/content/src/page.rs index 26ebbf2b..6e62981b 100644 --- a/components/content/src/page.rs +++ b/components/content/src/page.rs @@ -170,7 +170,7 @@ impl Page { permalinks, anchor_insert ); - let res = markdown_to_html(&self.raw_content, &context)?; + let res = markdown_to_html(&self.raw_content.replacen("<!-- more -->", "<a name=\"more\"></a>", 1), &context)?; self.content = res.0; self.toc = res.1; if self.raw_content.contains("<!-- more -->") { From 46115334c8a94bdb46595cd4fbdbf8c0cdf7b1e4 Mon Sep 17 00:00:00 2001 From: Tim DuBois <tim@neophilus.net> Date: Sun, 25 Mar 2018 13:17:03 +0200 Subject: [PATCH 23/30] Documentation --- docs/content/documentation/content/page.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/content/documentation/content/page.md b/docs/content/documentation/content/page.md index 1a8b7707..c62fc415 100644 --- a/docs/content/documentation/content/page.md +++ b/docs/content/documentation/content/page.md @@ -77,3 +77,7 @@ paragraph of each page in a list for example. To do so, add `<!-- more -->` in your content at the point where you want the summary to end and the content up to that point will be also available separately in the [template](./documentation/templates/pages-sections.md#page-variables). + +An anchor link to this position is created so you can link directly to it if needed +for example: +`<a href="{{ page.permalink }}#more">Continue Reading</a>` From caeda1dfb4401bf767ad64caf7cfec914a7bec33 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Mon, 26 Mar 2018 17:51:12 +0200 Subject: [PATCH 24/30] Update deps --- Cargo.lock | 253 +++++++++++++++++++++++++---------------------------- 1 file changed, 120 insertions(+), 133 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a33afe5..7cb134e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,7 +40,7 @@ name = "atty" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -52,7 +52,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -62,8 +62,8 @@ name = "backtrace-sys" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -99,7 +99,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -143,7 +143,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -179,7 +179,7 @@ name = "cmake" version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -190,8 +190,8 @@ dependencies = [ "errors 0.1.0", "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "highlighting 0.1.0", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -205,10 +205,10 @@ dependencies = [ "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rendering 0.1.0", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -218,19 +218,19 @@ name = "crossbeam-deque" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -269,31 +269,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "duct" -version = "0.9.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "os_pipe 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "either" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "elasticlunr-rs" -version = "2.0.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "rust-stemmers 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -311,7 +311,7 @@ name = "errors" version = "0.1.0" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -321,7 +321,7 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -330,7 +330,7 @@ name = "flate2" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -347,9 +347,9 @@ dependencies = [ "errors 0.1.0", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -365,7 +365,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -373,7 +373,7 @@ name = "fsevent-sys" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -512,7 +512,7 @@ name = "inotify" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -520,7 +520,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -541,7 +541,7 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -558,21 +558,11 @@ name = "language-tags" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazy_static" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lazycell" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazycell" version = "0.6.0" @@ -580,7 +570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.39" +version = "0.2.40" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -621,9 +611,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -639,7 +629,7 @@ name = "memchr" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -671,8 +661,8 @@ name = "miniz-sys" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -681,7 +671,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -701,7 +691,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -751,7 +741,7 @@ version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -761,7 +751,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -771,7 +761,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -791,7 +781,7 @@ dependencies = [ "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "inotify 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -834,28 +824,28 @@ name = "num_cpus" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "onig" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "onig_sys 67.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "onig_sys 68.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "onig_sys" -version = "67.1.0" +version = "68.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "duct 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (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.40 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -877,9 +867,9 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -951,7 +941,7 @@ dependencies = [ "base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1004,7 +994,7 @@ version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1014,7 +1004,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1023,7 +1013,7 @@ name = "rayon" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1034,7 +1024,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1049,7 +1039,7 @@ dependencies = [ "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "highlighting 0.1.0", "site 0.1.0", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1092,11 +1082,10 @@ dependencies = [ [[package]] name = "remove_dir_all" -version = "0.3.0" +version = "0.5.0" 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)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1109,12 +1098,12 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -1123,8 +1112,8 @@ name = "rust-stemmers" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1150,7 +1139,7 @@ name = "sass-rs" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1160,7 +1149,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1175,7 +1164,7 @@ version = "0.1.0" dependencies = [ "ammonia 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "content 0.1.0", - "elasticlunr-rs 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "elasticlunr-rs 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1187,23 +1176,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive_internals 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive_internals" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1212,13 +1201,13 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1232,7 +1221,7 @@ 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.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1254,12 +1243,12 @@ dependencies = [ "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "sass-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "search 0.1.0", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "taxonomies 0.1.0", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -1306,7 +1295,7 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1384,12 +1373,12 @@ dependencies = [ "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "onig 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "onig 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1402,20 +1391,20 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] [[package]] name = "tempdir" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1429,7 +1418,7 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "taxonomies 0.1.0", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -1445,7 +1434,7 @@ dependencies = [ [[package]] name = "tera" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1456,8 +1445,8 @@ dependencies = [ "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1484,7 +1473,7 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1511,7 +1500,7 @@ name = "time" version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1521,7 +1510,7 @@ name = "toml" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1637,8 +1626,8 @@ name = "utils" version = "0.1.0" dependencies = [ "errors 0.1.0", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1755,20 +1744,20 @@ dependencies = [ "checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" "checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27" "checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" -"checksum cc 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d9324127e719125ec8a16e6e509abc4c641e773621b50aea695af3f005656d61" +"checksum cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2b4911e4bdcb4100c7680e7e854ff38e23f1b34d4d9e079efae3da2801341ffc" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" "checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536" "checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" -"checksum crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59796cc6cbbdc6bb319161349db0c3250ec73ec7fcb763a51065ec4e2e158552" +"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum ctrlc 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "653abc99aa905f693d89df4797fadc08085baee379db92be9f2496cefe8a6f2c" "checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3" "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" -"checksum duct 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8c553d79f40e74f7f611e49bf3429b6760cff79596b61818291c27cc0b18549d" -"checksum either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740178ddf48b1a9e878e6d6509a1442a2d42fd2928aae8e7a6f8a36fb01981b3" -"checksum elasticlunr-rs 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18c5413e83a7be7e86ce0afce03b23508db56082edbb2b28a178e6275fa3957d" +"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 elasticlunr-rs 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b64a446c215102239aa6fbc70dc3fef11a060a0f9ddeb9d938221a36315d33" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f" "checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909" @@ -1791,14 +1780,12 @@ dependencies = [ "checksum inotify 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887fcc180136e77a85e6a6128579a719027b1bab9b1c38ea4444244fe262c20c" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d8e17268922834707e1c29e8badbf9c712c9c43378e1b6a3388946baff10be2" -"checksum itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92a9df60778f789c37f76778ae8d0a2471c41baa8b059d98a5873c978f549587" +"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" -"checksum lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b585b7a6811fb03aa10e74b278a0f00f8dd9b45dc681f148bb29fa5cb61859b" "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" -"checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff" +"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b" "checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" @@ -1827,8 +1814,8 @@ dependencies = [ "checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" "checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" -"checksum onig 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c54a94ac4d9f3eec22b189b8a727e2ded82aee21e8ae7ffbba2468739161b" -"checksum onig_sys 67.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34d894e8da3390097d99eb197eac2ec443277551388eff0f97c5f789933350ee" +"checksum onig 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0e2c9b3d13b21fd9ef7872d622051fefeb5fc422aa12bcada297139cad2712cc" +"checksum onig_sys 68.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "906775278fcd8a2ac27050e485143a48b5a60757bf2e84cc989f4dd4c7cd9a25" "checksum os_pipe 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f547689aea1f11fac90333d573854a8e3e52a9160df1c42aefa8cd16734a3c0" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0fce5d8b5cc33983fc74f78ad552b5522ab41442c4ca91606e4236eb4b5ceefc" @@ -1854,7 +1841,7 @@ dependencies = [ "checksum regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "aec3f58d903a7d2a9dc2bf0e41a746f4530e0cab6b615494e058f67a3ef947fb" "checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" "checksum regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b2550876c31dc914696a6c2e01cbce8afba79a93c8ae979d2fe051c0230b3756" -"checksum remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d2f806b0fcdabd98acd380dc8daef485e22bcb7cddc811d1337967f2528cf5" +"checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" "checksum rust-stemmers 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fbf06149ec391025664a5634200ced1afb489f0f3f8a140d515ebc0eb04b4bc0" "checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" @@ -1863,10 +1850,10 @@ dependencies = [ "checksum sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a71105d35ea2c3622fceb9128897115932c698561940a453452744413faf3561" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sequence_trie 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "32157204e5c9d3c04007bd7e56e96e987635ce0e8e23c085b1e403861b76c351" -"checksum serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe95aa0d46f04ce5c3a88bdcd4114ecd6144ed0b2725ebca2f1127744357807" -"checksum serde_derive 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "23b163a6ce7e1aa897919f9d8e40bd1f8a6f95342ed57727ae31387a01a7a356" -"checksum serde_derive_internals 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "370aa477297975243dc914d0b0e1234927520ec311de507a560fbd1c80f7ab8c" -"checksum serde_json 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "28556329a1d04efa036376c9588a0ed8655e202676d918733ca8a14740ee31be" +"checksum serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "800fdb0a894572994f3970035a8a5f65d8ec2cd40e6cdf7d8cd9001d7b30648e" +"checksum serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "90f1f8f7784452461db5b73dc5097c18f21011fbcc6d1178f1897bfa8e1cb4bd" +"checksum serde_derive_internals 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9f9525ada08124ee1a9b8b1e6f3bf035ffff6fc0c96d56ddda98d4506d3533e4" +"checksum serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "5c508584d9913df116b91505eec55610a2f5b16e9ed793c46e4d0152872b3e74" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum shared_child 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bcd5e483b3475af9bc2a35311c2f3bbf0bd98fde91410ab15a0d4ba3c3127b4e" "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" @@ -1885,9 +1872,9 @@ dependencies = [ "checksum syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "8c5bc2d6ff27891209efa5f63e9de78648d7801f085e4653701a692ce938d6fd" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db9fffcb25a761118df53811bd1cfcd54cf57fcbc51e1ea3167ae263477129ad" -"checksum tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f73eebdb68c14bcb24aef74ea96079830e7fa7b31a6106e42ea7ee887c1e134e" +"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9de21546595a0873061940d994bbbc5c35f024ae4fd61ec5c5b159115684f508" -"checksum tera 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fc1a35d04c2444875b1319293fbc72c00215ae6220f8c70f9f14fefa5eaae0c6" +"checksum tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1845350fc31befca6c3976001dc45213b63154a96b58cfbf177d45cbf94538dd" "checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1" "checksum term-painter 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "dcaa948f0e3e38470cd8dc8dcfe561a75c9e43f28075bb183845be2b9b3c08cf" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" From c8dfc5156a413803f28f583c61af9abf878a82fa Mon Sep 17 00:00:00 2001 From: Tim DuBois <tim@neophilus.net> Date: Tue, 27 Mar 2018 07:38:04 +0200 Subject: [PATCH 25/30] Change naming convention --- components/content/src/page.rs | 2 +- docs/content/documentation/content/page.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/content/src/page.rs b/components/content/src/page.rs index 6e62981b..b6ca3f70 100644 --- a/components/content/src/page.rs +++ b/components/content/src/page.rs @@ -170,7 +170,7 @@ impl Page { permalinks, anchor_insert ); - let res = markdown_to_html(&self.raw_content.replacen("<!-- more -->", "<a name=\"more\"></a>", 1), &context)?; + let res = markdown_to_html(&self.raw_content.replacen("<!-- more -->", "<a name=\"continue-reading\"></a>", 1), &context)?; self.content = res.0; self.toc = res.1; if self.raw_content.contains("<!-- more -->") { diff --git a/docs/content/documentation/content/page.md b/docs/content/documentation/content/page.md index c62fc415..78010e56 100644 --- a/docs/content/documentation/content/page.md +++ b/docs/content/documentation/content/page.md @@ -80,4 +80,4 @@ in the [template](./documentation/templates/pages-sections.md#page-variables). An anchor link to this position is created so you can link directly to it if needed for example: -`<a href="{{ page.permalink }}#more">Continue Reading</a>` +`<a href="{{ page.permalink }}#continue-reading">Continue Reading</a>` From e40e97711fb94bdae335dfd1f36d0ab7148b1f27 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Wed, 28 Mar 2018 17:01:14 +0200 Subject: [PATCH 26/30] Some more bits about continue_reading anchor --- CHANGELOG.md | 3 +++ components/site/src/lib.rs | 4 ++-- components/site/tests/site.rs | 3 +++ docs/content/documentation/content/page.md | 4 ++-- test_site/content/posts/python.md | 2 ++ 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a75c1e0e..997e3893 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ to the public directory - Do not require themes to have a static folder - Now supports indented Sass syntax - Add search index building +- Update Tera: now has `break` and `continue` in loops +- Gutenberg now creates an anchor link at the position of the `<!-- more -->` tag if you +want to link directly to it ## 0.3.2 (2018-03-05) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 210f8483..e30132b2 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -109,10 +109,10 @@ impl Site { let site = Site { base_path: path.to_path_buf(), - config: config, + config, + tera, pages: HashMap::new(), sections: HashMap::new(), - tera: tera, live_reload: false, output_path: path.join("public"), static_path: path.join("static"), diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index bb24c3c3..f7968f24 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -198,6 +198,9 @@ fn can_build_site_with_live_reload() { // no live reload code assert!(file_contains!(public, "index.html", "/livereload.js?port=1112&mindelay=10")); + + // the summary anchor link has been created + assert!(file_contains!(public, "posts/python/index.html", r#"<a name="continue-reading"></a>"#)); } #[test] diff --git a/docs/content/documentation/content/page.md b/docs/content/documentation/content/page.md index 78010e56..f7c7f98c 100644 --- a/docs/content/documentation/content/page.md +++ b/docs/content/documentation/content/page.md @@ -78,6 +78,6 @@ To do so, add `<!-- more -->` in your content at the point where you want the summary to end and the content up to that point will be also available separately in the [template](./documentation/templates/pages-sections.md#page-variables). -An anchor link to this position is created so you can link directly to it if needed -for example: +An anchor link to this position named `continue-reading` is created so you can link +directly to it if needed for example: `<a href="{{ page.permalink }}#continue-reading">Continue Reading</a>` diff --git a/test_site/content/posts/python.md b/test_site/content/posts/python.md index aa39b4e1..ef80a06c 100644 --- a/test_site/content/posts/python.md +++ b/test_site/content/posts/python.md @@ -6,6 +6,8 @@ date = 2017-03-01 Same filename but different path +<!-- more --> + {{ basic() }} {{ pirate(name="Bob") }} From d67211bfd6d3fd0fe70f6824ea49bd335fb1af47 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Wed, 28 Mar 2018 19:31:28 +0200 Subject: [PATCH 27/30] Fix many shortcode parsing issues Closes #228 Closes #229 --- CHANGELOG.md | 1 + components/rendering/src/short_code.rs | 71 ++++++++++++++++---------- components/rendering/tests/markdown.rs | 2 +- 3 files changed, 47 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 997e3893..68c12409 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ to the public directory - Update Tera: now has `break` and `continue` in loops - Gutenberg now creates an anchor link at the position of the `<!-- more -->` tag if you want to link directly to it +- Fix many shortcode parsing issues ## 0.3.2 (2018-03-05) diff --git a/components/rendering/src/short_code.rs b/components/rendering/src/short_code.rs index 532aea96..f1cd3fbb 100644 --- a/components/rendering/src/short_code.rs +++ b/components/rendering/src/short_code.rs @@ -6,7 +6,15 @@ use tera::{Tera, Context, Value, to_value}; use errors::{Result, ResultExt}; lazy_static!{ - pub static ref SHORTCODE_RE: Regex = Regex::new(r#"\{(?:%|\{)\s+([[:word:]]+?)\(([[:word:]]+?="?.+?"?)?\)\s+(?:%|\})\}"#).unwrap(); + // Does this look like a shortcode? + pub static ref SHORTCODE_RE: Regex = Regex::new( + r#"\{(?:%|\{)\s+(\w+?)\((\w+?="?(?:.|\n)+?"?)?\)\s+(?:%|\})\}"# + ).unwrap(); + + // Parse the shortcode args with capture groups named after their type + pub static ref SHORTCODE_ARGS_RE: Regex = Regex::new( + r#"(?P<name>\w+)=\s*((?P<str>".*?")|(?P<float>[-+]?[0-9]+\.[0-9]+)|(?P<int>[-+]?[0-9]+)|(?P<bool>true|false))"# + ).unwrap(); } /// A shortcode that has a body @@ -52,41 +60,28 @@ pub fn parse_shortcode(input: &str) -> (String, HashMap<String, Value>) { let name = &caps[1]; if let Some(arg_list) = caps.get(2) { - for arg in arg_list.as_str().split(',') { - let bits = arg.split('=').collect::<Vec<_>>(); - let arg_name = bits[0].trim().to_string(); - let arg_val = bits[1].replace("\"", ""); + for arg_cap in SHORTCODE_ARGS_RE.captures_iter(arg_list.as_str()) { + let arg_name = arg_cap["name"].trim().to_string(); - // Regex captures will be str so we need to figure out if they are - // actually str or bool/number - if input.contains(&format!("{}=\"{}\"", arg_name, arg_val)) { - // that's a str, just add it - args.insert(arg_name, to_value(arg_val).unwrap()); + if let Some(arg_val) = arg_cap.name("str") { + args.insert(arg_name, to_value(arg_val.as_str().replace("\"", "")).unwrap()); continue; } - if input.contains(&format!("{}=true", arg_name)) { - args.insert(arg_name, to_value(true).unwrap()); + if let Some(arg_val) = arg_cap.name("int") { + args.insert(arg_name, to_value(arg_val.as_str().parse::<i64>().unwrap()).unwrap()); continue; } - if input.contains(&format!("{}=false", arg_name)) { - args.insert(arg_name, to_value(false).unwrap()); + if let Some(arg_val) = arg_cap.name("float") { + args.insert(arg_name, to_value(arg_val.as_str().parse::<f64>().unwrap()).unwrap()); continue; } - // Not a string or a bool, a number then? - if arg_val.contains('.') { - if let Ok(float) = arg_val.parse::<f64>() { - args.insert(arg_name, to_value(float).unwrap()); - } + if let Some(arg_val) = arg_cap.name("bool") { + args.insert(arg_name, to_value(arg_val.as_str() == "true").unwrap()); continue; } - - // must be an integer - if let Ok(int) = arg_val.parse::<i64>() { - args.insert(arg_name, to_value(int).unwrap()); - } } } @@ -122,6 +117,10 @@ mod tests { "{% basic() %}", "{% quo_te(author=\"Bob\") %}", "{{ quo_te(author=\"Bob\") }}", + // https://github.com/Keats/gutenberg/issues/229 + r#"{{ youtube(id="dQw4w9WgXcQ", + + autoplay=true) }}"#, ]; for i in inputs { @@ -130,6 +129,15 @@ mod tests { } } + // https://github.com/Keats/gutenberg/issues/228 + #[test] + fn doesnt_panic_on_invalid_shortcode() { + let (name, args) = parse_shortcode(r#"{{ youtube(id="dQw4w9WgXcQ", autoplay) }}"#); + assert_eq!(name, "youtube"); + assert_eq!(args["id"], "dQw4w9WgXcQ"); + assert!(args.get("autoplay").is_none()); + } + #[test] fn can_parse_simple_shortcode_no_arg() { let (name, args) = parse_shortcode(r#"{{ basic() }}"#); @@ -162,10 +170,21 @@ mod tests { #[test] fn can_parse_shortcode_number() { - let (name, args) = parse_shortcode(r#"{% test(int=42, float=42.0, autoplay=true) %}"#); + let (name, args) = parse_shortcode(r#"{% test(int=42, float=42.0, autoplay=false) %}"#); assert_eq!(name, "test"); assert_eq!(args["int"], 42); assert_eq!(args["float"], 42.0); - assert_eq!(args["autoplay"], true); + assert_eq!(args["autoplay"], false); + } + + // https://github.com/Keats/gutenberg/issues/249 + #[test] + fn can_parse_shortcode_with_comma_in_it() { + let (name, args) = parse_shortcode( + r#"{% quote(author="C++ Standard Core Language Defect Reports and Accepted Issues, Revision 82, delete and user-written deallocation function", href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#348") %}"# + ); + assert_eq!(name, "quote"); + assert_eq!(args["author"], "C++ Standard Core Language Defect Reports and Accepted Issues, Revision 82, delete and user-written deallocation function"); + assert_eq!(args["href"], "http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#348"); } } diff --git a/components/rendering/tests/markdown.rs b/components/rendering/tests/markdown.rs index d4ef797c..8dbdcc73 100644 --- a/components/rendering/tests/markdown.rs +++ b/components/rendering/tests/markdown.rs @@ -241,7 +241,7 @@ fn doesnt_render_shortcode_in_code_block() { fn can_render_shortcode_with_body() { let mut tera = Tera::default(); tera.extend(&GUTENBERG_TERA).unwrap(); - tera.add_raw_template("shortcodes/quote.html", "<blockquote>{{ body }} - {{ author}}</blockquote>").unwrap(); + tera.add_raw_template("shortcodes/quote.html", "<blockquote>{{ body }} - {{ author }}</blockquote>").unwrap(); let permalinks_ctx = HashMap::new(); let context = Context::new(&tera, true, "base16-ocean-dark".to_string(), "", &permalinks_ctx, InsertAnchor::None); From 9c0dd95bdbdd0b8cd71446b42f0dd1740844aa01 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Wed, 28 Mar 2018 21:08:44 +0200 Subject: [PATCH 28/30] Fix theme shortcode not being useable Closes #272 --- CHANGELOG.md | 1 + Cargo.lock | 130 ++++++++---------- components/content/src/page.rs | 2 +- components/content/src/section.rs | 2 +- components/pagination/src/lib.rs | 2 +- components/site/src/lib.rs | 6 +- components/site/tests/site.rs | 1 + components/taxonomies/src/lib.rs | 4 +- components/utils/src/templates.rs | 22 ++- .../test-templates/shortcodes/something.html | 1 + test_site/content/posts/draft.md | 2 + test_site/content/posts/fixed-slug.md | 1 + .../templates/shortcodes/theme_shortcode.html | 1 + 13 files changed, 89 insertions(+), 86 deletions(-) create mode 100644 components/utils/test-templates/shortcodes/something.html create mode 100644 test_site/themes/sample/templates/shortcodes/theme_shortcode.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 68c12409..d3701881 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ to the public directory - Gutenberg now creates an anchor link at the position of the `<!-- more -->` tag if you want to link directly to it - Fix many shortcode parsing issues +- Correctly copy themes shortcodes so they are useable in content ## 0.3.2 (2018-03-05) diff --git a/Cargo.lock b/Cargo.lock index 7cb134e9..db4e56e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,7 +99,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -153,10 +153,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "chrono" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -186,12 +187,12 @@ dependencies = [ name = "config" version = "0.1.0" dependencies = [ - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "highlighting 0.1.0", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -205,7 +206,7 @@ dependencies = [ "globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rendering 0.1.0", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -291,8 +292,8 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "rust-stemmers 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -343,12 +344,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "front_matter" version = "0.1.0" dependencies = [ - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -430,7 +431,7 @@ dependencies = [ name = "gutenberg" version = "0.3.3" dependencies = [ - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)", "content 0.1.0", "ctrlc 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -446,7 +447,7 @@ dependencies = [ "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", - "ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ws 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -611,8 +612,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -787,16 +788,6 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "num" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "num-integer" version = "0.1.36" @@ -805,15 +796,6 @@ dependencies = [ "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "num-iter" -version = "0.1.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "num-traits" version = "0.2.2" @@ -867,8 +849,8 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -940,8 +922,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1098,8 +1080,8 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", @@ -1112,8 +1094,8 @@ name = "rust-stemmers" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1176,27 +1158,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive_internals 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.12.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive_internals" -version = "0.22.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.12.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1207,12 +1189,12 @@ dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sha1" -version = "0.2.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1243,8 +1225,8 @@ dependencies = [ "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "sass-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "search 0.1.0", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "taxonomies 0.1.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", @@ -1295,7 +1277,7 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1347,7 +1329,7 @@ dependencies = [ [[package]] name = "syn" -version = "0.12.14" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1376,8 +1358,8 @@ dependencies = [ "onig 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1391,8 +1373,8 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tera 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", @@ -1437,7 +1419,7 @@ name = "tera" version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (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)", @@ -1445,7 +1427,7 @@ dependencies = [ "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1510,7 +1492,7 @@ name = "toml" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1686,16 +1668,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ws" -version = "0.7.3" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1746,7 +1728,7 @@ dependencies = [ "checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" "checksum cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2b4911e4bdcb4100c7680e7e854ff38e23f1b34d4d9e079efae3da2801341ffc" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" +"checksum chrono 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ba5f60682a4c264e7f8d77b82e7788938a76befdf949d4a98026d19099c9d873" "checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536" "checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" @@ -1809,9 +1791,7 @@ dependencies = [ "checksum nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2c5afeb0198ec7be8569d666644b574345aad2e95a53baf3a532da3e0f3fb32" "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" "checksum notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5c3812da3098f210a0bb440f9c008471a031aa4c1de07a264fdd75456c95a4eb" -"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" "checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" -"checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" "checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum onig 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0e2c9b3d13b21fd9ef7872d622051fefeb5fc422aa12bcada297139cad2712cc" @@ -1850,11 +1830,11 @@ dependencies = [ "checksum sass-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a71105d35ea2c3622fceb9128897115932c698561940a453452744413faf3561" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sequence_trie 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "32157204e5c9d3c04007bd7e56e96e987635ce0e8e23c085b1e403861b76c351" -"checksum serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "800fdb0a894572994f3970035a8a5f65d8ec2cd40e6cdf7d8cd9001d7b30648e" -"checksum serde_derive 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "90f1f8f7784452461db5b73dc5097c18f21011fbcc6d1178f1897bfa8e1cb4bd" -"checksum serde_derive_internals 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9f9525ada08124ee1a9b8b1e6f3bf035ffff6fc0c96d56ddda98d4506d3533e4" +"checksum serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "c70142ae874a42c70e03c63c6a49abe2ea0079b090bf6e136e99252fc1974bd6" +"checksum serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "6fffe22d41dbddcead5b2c380c4714d44f2eb39292f7e7a0d966d2d45bf56408" +"checksum serde_derive_internals 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2f04ed291686ce195a5c8f554aaf36e50a721fbf829ee3b6151e6f85eccf945" "checksum serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "5c508584d9913df116b91505eec55610a2f5b16e9ed793c46e4d0152872b3e74" -"checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" +"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.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" @@ -1869,7 +1849,7 @@ dependencies = [ "checksum strum 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "099e21b5dd6dd07b5adcf8c4b723a7c0b7efd7a9359bf963d58c0caae8532545" "checksum strum_macros 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0dd9bd569e88028750e3ae5c25616b8278ac16a8e61aba4339195c72396d49e1" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "8c5bc2d6ff27891209efa5f63e9de78648d7801f085e4653701a692ce938d6fd" +"checksum syn 0.12.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c97c05b8ebc34ddd6b967994d5c6e9852fa92f8b82b3858c39451f97346dcce5" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum syntect 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db9fffcb25a761118df53811bd1cfcd54cf57fcbc51e1ea3167ae263477129ad" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" @@ -1908,7 +1888,7 @@ dependencies = [ "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "89c48c53bf9dee34411a08993c10b879c36e105d609b46e25673befe3a5c1320" +"checksum ws 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ccf752fee5350ca505fdb0b34d503b17d1528bd867561b7aa91d6ea750d5e972" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" "checksum yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57ab38ee1a4a266ed033496cf9af1828d8d6e6c1cfa5f643a2809effcae4d628" diff --git a/components/content/src/page.rs b/components/content/src/page.rs index b6ca3f70..7b403244 100644 --- a/components/content/src/page.rs +++ b/components/content/src/page.rs @@ -196,7 +196,7 @@ impl Page { context.add("current_url", &self.permalink); context.add("current_path", &self.path); - render_template(&tpl_name, tera, &context, config.theme.clone()) + render_template(&tpl_name, tera, &context, &config.theme) .chain_err(|| format!("Failed to render page '{}'", self.file.path.display())) } } diff --git a/components/content/src/section.rs b/components/content/src/section.rs index d8a9ae09..b75581c6 100644 --- a/components/content/src/section.rs +++ b/components/content/src/section.rs @@ -122,7 +122,7 @@ impl Section { context.add("current_url", &self.permalink); context.add("current_path", &self.path); - render_template(&tpl_name, tera, &context, config.theme.clone()) + render_template(&tpl_name, tera, &context, &config.theme) .chain_err(|| format!("Failed to render section '{}'", self.file.path.display())) } diff --git a/components/pagination/src/lib.rs b/components/pagination/src/lib.rs index 45bc3abf..42724c08 100644 --- a/components/pagination/src/lib.rs +++ b/components/pagination/src/lib.rs @@ -168,7 +168,7 @@ impl<'a> Paginator<'a> { context.add("current_path", &pager.path); context.add("paginator", &self.build_paginator_context(pager)); - render_template(&self.section.get_template_name(), tera, &context, config.theme.clone()) + render_template(&self.section.get_template_name(), tera, &context, &config.theme) .chain_err(|| format!("Failed to render pager {} of section '{}'", pager.index, self.section.file.path.display())) } } diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index e30132b2..069d046a 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -617,7 +617,7 @@ impl Site { ensure_directory_exists(&self.output_path)?; create_file( &self.output_path.join("robots.txt"), - &render_template("robots.txt", &self.tera, &Context::new(), self.config.theme.clone())? + &render_template("robots.txt", &self.tera, &Context::new(), &self.config.theme)? ) } @@ -719,7 +719,7 @@ impl Site { context.add("tags", &tags); context.add("config", &self.config); - let sitemap = &render_template("sitemap.xml", &self.tera, &context, self.config.theme.clone())?; + let sitemap = &render_template("sitemap.xml", &self.tera, &context, &self.config.theme)?; create_file(&self.output_path.join("sitemap.xml"), sitemap)?; @@ -753,7 +753,7 @@ impl Site { }; context.add("feed_url", &rss_feed_url); - let feed = &render_template("rss.xml", &self.tera, &context, self.config.theme.clone())?; + let feed = &render_template("rss.xml", &self.tera, &context, &self.config.theme)?; create_file(&self.output_path.join("rss.xml"), feed)?; diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index f7968f24..f62b0e1c 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -201,6 +201,7 @@ fn can_build_site_with_live_reload() { // the summary anchor link has been created assert!(file_contains!(public, "posts/python/index.html", r#"<a name="continue-reading"></a>"#)); + assert!(file_contains!(public, "posts/draft/index.html", r#"THEME_SHORTCODE"#)); } #[test] diff --git a/components/taxonomies/src/lib.rs b/components/taxonomies/src/lib.rs index e85eb6c1..b18a9647 100644 --- a/components/taxonomies/src/lib.rs +++ b/components/taxonomies/src/lib.rs @@ -144,7 +144,7 @@ impl Taxonomy { context.add("current_url", &config.make_permalink(&format!("{}/{}", name, item.slug))); context.add("current_path", &format!("/{}/{}", name, item.slug)); - render_template(&format!("{}.html", name), tera, &context, config.theme.clone()) + render_template(&format!("{}.html", name), tera, &context, &config.theme) .chain_err(|| format!("Failed to render {} page.", name)) } @@ -156,7 +156,7 @@ impl Taxonomy { context.add("current_url", &config.make_permalink(&name)); context.add("current_path", &name); - render_template(&format!("{}.html", name), tera, &context, config.theme.clone()) + render_template(&format!("{}.html", name), tera, &context, &config.theme) .chain_err(|| format!("Failed to render {} page.", name)) } } diff --git a/components/utils/src/templates.rs b/components/utils/src/templates.rs index 3d4b4dae..e4270be3 100644 --- a/components/utils/src/templates.rs +++ b/components/utils/src/templates.rs @@ -20,14 +20,14 @@ macro_rules! render_default_tpl { /// is not found, it will look up for the equivalent template for the current theme if there is one. /// Lastly, if it's a default template (index, section or page), it will just return an empty string /// to avoid an error if there isn't a template with that name -pub fn render_template(name: &str, tera: &Tera, context: &Context, theme: Option<String>) -> Result<String> { +pub fn render_template(name: &str, tera: &Tera, context: &Context, theme: &Option<String>) -> Result<String> { if tera.templates.contains_key(name) { return tera .render(name, context) .map_err(|e| e.into()); } - if let Some(ref t) = theme { + if let &Some(ref t) = theme { return tera .render(&format!("{}/templates/{}", t, name), context) .map_err(|e| e.into()); @@ -53,7 +53,11 @@ pub fn render_template(name: &str, tera: &Tera, context: &Context, theme: Option /// that they will point to the right place (theme/templates/...) /// Include is NOT supported as it would be a pain to add and using blocks /// or macros is always better anyway for themes +/// This will also rename the shortcodes to NOT have the themes in the path +/// so themes shortcodes can be used. pub fn rewrite_theme_paths(tera: &mut Tera, theme: &str) { + let mut shortcodes_to_move = vec![]; + // We want to match the paths in the templates to the new names for tpl in tera.templates.values_mut() { // First the parent if there is none @@ -67,13 +71,25 @@ pub fn rewrite_theme_paths(tera: &mut Tera, theme: &str) { updated.push((format!("{}/templates/{}", theme, filename), namespace.to_string())); } tpl.imported_macro_files = updated; + + if tpl.name.starts_with(&format!("{}/templates/shortcodes", theme)) { + let new_name = tpl.name.replace(&format!("{}/templates/", theme), ""); + shortcodes_to_move.push((tpl.name.clone(), new_name.clone())); + tpl.name = new_name; + } + } + + // and then replace shortcodes in the Tera instance using the new names + for (old_name, new_name) in shortcodes_to_move { + let tpl = tera.templates.remove(&old_name).unwrap(); + tera.templates.insert(new_name, tpl); } } #[cfg(test)] mod tests { use tera::Tera; - use super::{rewrite_theme_paths}; + use super::rewrite_theme_paths; #[test] fn can_rewrite_all_paths_of_theme() { diff --git a/components/utils/test-templates/shortcodes/something.html b/components/utils/test-templates/shortcodes/something.html new file mode 100644 index 00000000..e965047a --- /dev/null +++ b/components/utils/test-templates/shortcodes/something.html @@ -0,0 +1 @@ +Hello diff --git a/test_site/content/posts/draft.md b/test_site/content/posts/draft.md index c66b8355..2f35fbb4 100644 --- a/test_site/content/posts/draft.md +++ b/test_site/content/posts/draft.md @@ -4,3 +4,5 @@ draft = true date = 2016-03-01 +++ + +{{ theme_shortcode() }} diff --git a/test_site/content/posts/fixed-slug.md b/test_site/content/posts/fixed-slug.md index ca932bde..ace8ae13 100644 --- a/test_site/content/posts/fixed-slug.md +++ b/test_site/content/posts/fixed-slug.md @@ -11,3 +11,4 @@ A simple page with a slug defined # Title Hey + diff --git a/test_site/themes/sample/templates/shortcodes/theme_shortcode.html b/test_site/themes/sample/templates/shortcodes/theme_shortcode.html new file mode 100644 index 00000000..3755f3b0 --- /dev/null +++ b/test_site/themes/sample/templates/shortcodes/theme_shortcode.html @@ -0,0 +1 @@ +THEME_SHORTCODE From d9dbf4d5670f034f5509c8b59fd610f059dd6553 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Thu, 29 Mar 2018 14:55:25 +0200 Subject: [PATCH 29/30] Fix internal links to content dir not working Closes #275 --- CHANGELOG.md | 1 + components/content/src/file_info.rs | 6 +++++- components/utils/src/site.rs | 8 ++++++++ test_site/content/posts/draft.md | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3701881..069c7903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ to the public directory want to link directly to it - Fix many shortcode parsing issues - Correctly copy themes shortcodes so they are useable in content +- Fix internal links not working for markdown files directly in `content` directory ## 0.3.2 (2018-03-05) diff --git a/components/content/src/file_info.rs b/components/content/src/file_info.rs index d3666652..b098dc64 100644 --- a/components/content/src/file_info.rs +++ b/components/content/src/file_info.rs @@ -48,7 +48,11 @@ impl FileInfo { let mut parent = file_path.parent().unwrap().to_path_buf(); let name = path.file_stem().unwrap().to_string_lossy().to_string(); let mut components = find_content_components(&file_path); - let relative = format!("{}/{}.md", components.join("/"), name); + let relative = if !components.is_empty() { + format!("{}/{}.md", components.join("/"), name) + } else { + format!("{}.md", name) + }; // If we have a folder with an asset, don't consider it as a component if !components.is_empty() && name == "index" { diff --git a/components/utils/src/site.rs b/components/utils/src/site.rs index bbf7ffd7..f73166a1 100644 --- a/components/utils/src/site.rs +++ b/components/utils/src/site.rs @@ -46,6 +46,14 @@ mod tests { assert_eq!(res, "https://vincent.is/about"); } + #[test] + fn can_resolve_valid_root_internal_link() { + let mut permalinks = HashMap::new(); + permalinks.insert("about.md".to_string(), "https://vincent.is/about".to_string()); + let res = resolve_internal_link("./about.md", &permalinks).unwrap(); + assert_eq!(res, "https://vincent.is/about"); + } + #[test] fn can_resolve_internal_links_with_anchors() { let mut permalinks = HashMap::new(); diff --git a/test_site/content/posts/draft.md b/test_site/content/posts/draft.md index 2f35fbb4..6eb9a2c8 100644 --- a/test_site/content/posts/draft.md +++ b/test_site/content/posts/draft.md @@ -6,3 +6,5 @@ date = 2016-03-01 {{ theme_shortcode() }} + +Link to [root](./hello.md). From d6bb43c0adad0574113d88dcba60e9713616c5bc Mon Sep 17 00:00:00 2001 From: Vincent Prouillet <vincent@wearewizards.io> Date: Thu, 29 Mar 2018 15:30:30 +0200 Subject: [PATCH 30/30] Set release date --- CHANGELOG.md | 2 +- Cargo.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 069c7903..6f793cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.3.3 (unreleased) +## 0.3.3 (2018-03-29) - Fixed config flag in CLI - Sitemap entries are now sorted by permalinks to avoid random ordering diff --git a/Cargo.lock b/Cargo.lock index db4e56e9..974039e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -811,18 +811,18 @@ dependencies = [ [[package]] name = "onig" -version = "3.2.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "onig_sys 68.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "onig_sys 68.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "onig_sys" -version = "68.0.0" +version = "68.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1355,7 +1355,7 @@ dependencies = [ "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "onig 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "onig 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1794,8 +1794,8 @@ dependencies = [ "checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" "checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" -"checksum onig 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0e2c9b3d13b21fd9ef7872d622051fefeb5fc422aa12bcada297139cad2712cc" -"checksum onig_sys 68.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "906775278fcd8a2ac27050e485143a48b5a60757bf2e84cc989f4dd4c7cd9a25" +"checksum onig 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be6b3b3411efa38b2cff84a1925df1bb8b048d4c1d60656617ed7aca9a966dd9" +"checksum onig_sys 68.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c6be7c4f985508684e54f18dd37f71e66f3e1ad9318336a520d7e42f0d3ea8e" "checksum os_pipe 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f547689aea1f11fac90333d573854a8e3e52a9160df1c42aefa8cd16734a3c0" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0fce5d8b5cc33983fc74f78ad552b5522ab41442c4ca91606e4236eb4b5ceefc"