From 2beb0621cae4e53bc4ba1142ccf825bb47f21839 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Tue, 25 Jul 2017 16:56:13 +0900 Subject: [PATCH 1/5] Add a redirect_to parameter to section front matter Close #103 --- CHANGELOG.md | 6 +++++- README.md | 7 +++++++ components/front_matter/src/section.rs | 6 ++++++ components/site/src/lib.rs | 6 ++++++ .../test_site/content/posts/tutorials/devops/_index.md | 1 + components/site/tests/site.rs | 4 ++++ 6 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb39424..b5ca4b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,14 @@ # Changelog +## 0.1.2 (unreleased) + +- Add `redirect_to` to section front matter to redirect when landing on section +root page + ## 0.1.1 (2017-07-16) - Fix RSS feed not behaving (https://github.com/Keats/gutenberg/issues/101) - ## 0.1.0 (2017-07-14) - Parallelize all the things diff --git a/README.md b/README.md index f4db349..5d9a741 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,13 @@ You can also paginate section, including the index by setting the `paginate_by` This represents the number of pages for each pager of the paginator. You will need to access pages through the `paginator` object. (TODO: document that). +You can redirect a root section page to another url by using the `redirect_to` parameter of the front-matter followed +by a path: + +``` +redirect_to = "docs/docker" +``` + ### Table of contents Each page/section will generate a table of content based on the title. It is accessible through `section.toc` and diff --git a/components/front_matter/src/section.rs b/components/front_matter/src/section.rs index c728c1b..21063cd 100644 --- a/components/front_matter/src/section.rs +++ b/components/front_matter/src/section.rs @@ -38,6 +38,11 @@ pub struct SectionFrontMatter { /// to be used directly, like a posts section in a personal site #[serde(skip_serializing)] pub render: Option, + /// 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, /// Any extra parameter present in the front matter pub extra: Option>, } @@ -96,6 +101,7 @@ impl Default for SectionFrontMatter { paginate_by: None, paginate_path: Some(DEFAULT_PAGINATE_PATH.to_string()), render: Some(true), + redirect_to: None, insert_anchor: Some(InsertAnchor::None), extra: None, } diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 89b713a..b66b677 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -647,6 +647,12 @@ impl Site { return Ok(()); } + if let Some(ref redirect_to) = section.meta.redirect_to { + let permalink = self.config.make_permalink(redirect_to); + create_file(&output_path.join("index.html"), &render_redirect_template(&permalink, &self.tera)?)?; + return Ok(()); + } + if section.meta.is_paginated() { self.render_paginated(&output_path, section)?; } else { diff --git a/components/site/test_site/content/posts/tutorials/devops/_index.md b/components/site/test_site/content/posts/tutorials/devops/_index.md index d2e9ea9..d8623ad 100644 --- a/components/site/test_site/content/posts/tutorials/devops/_index.md +++ b/components/site/test_site/content/posts/tutorials/devops/_index.md @@ -1,4 +1,5 @@ +++ title = "DevOps" sort_by = "order" +redirect_to = "posts/tutorials/devops/docker" +++ diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index 4a52908..aa050ad 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -122,6 +122,10 @@ fn can_build_site_without_live_reload() { assert!(file_exists!(public, "an-old-url/old-page/index.html")); assert!(file_contains!(public, "an-old-url/old-page/index.html", "something-else")); + // redirect_to works + assert!(file_exists!(public, "posts/tutorials/devops/index.html")); + assert!(file_contains!(public, "posts/tutorials/devops/index.html", "docker")); + // No tags or categories assert_eq!(file_exists!(public, "categories/index.html"), false); assert_eq!(file_exists!(public, "tags/index.html"), false); From 23e4b911e797939198321b7be24db7dde00ad517 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Thu, 27 Jul 2017 18:24:43 +0900 Subject: [PATCH 2/5] Improve gutenberg init Fix #104 --- CHANGELOG.md | 2 + Cargo.lock | 1 + Cargo.toml | 3 ++ components/config/src/lib.rs | 10 ++-- components/templates/src/builtins/index.html | 0 components/templates/src/builtins/page.html | 0 .../templates/src/builtins/section.html | 0 components/templates/src/lib.rs | 6 +++ src/cli.rs | 2 +- src/cmd/init.rs | 46 ++++++++++++---- src/main.rs | 4 +- src/prompt.rs | 53 +++++++++++++++++++ 12 files changed, 109 insertions(+), 18 deletions(-) create mode 100644 components/templates/src/builtins/index.html create mode 100644 components/templates/src/builtins/page.html create mode 100644 components/templates/src/builtins/section.html create mode 100644 src/prompt.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index b5ca4b8..8fdc4ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Add `redirect_to` to section front matter to redirect when landing on section root page +- Make `title` in config optional +- Improved `gutenberg init` UX and users first experience ## 0.1.1 (2017-07-16) diff --git a/Cargo.lock b/Cargo.lock index 236554c..c2e0d2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,6 +400,7 @@ dependencies = [ "staticfile 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "term-painter 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.5.1 (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)", ] diff --git a/Cargo.toml b/Cargo.toml index a30ecae..42e7abf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,9 @@ chrono = "0.4" toml = "0.4" term-painter = "0.2" +# Used in init to ensure the url given as base_url is a valid one +url = "1.5" + # Below is for the serve cmd staticfile = "0.4" iron = "0.5" diff --git a/components/config/src/lib.rs b/components/config/src/lib.rs index 87b07a2..32391c9 100644 --- a/components/config/src/lib.rs +++ b/components/config/src/lib.rs @@ -18,11 +18,11 @@ use rendering::highlighting::THEME_SET; #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Config { - /// Title of the site - pub title: String, - /// Base URL of the site + /// Base URL of the site, the only required config argument pub base_url: String, + /// 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 @@ -123,7 +123,7 @@ impl Config { impl Default for Config { fn default() -> Config { Config { - title: "".to_string(), + title: Some("".to_string()), base_url: "http://a-website.com/".to_string(), highlight_code: Some(true), highlight_theme: Some("base16-ocean-dark".to_string()), @@ -167,7 +167,7 @@ base_url = "https://replace-this-with-your-url.com" "#; let config = Config::parse(config).unwrap(); - assert_eq!(config.title, "My site".to_string()); + assert_eq!(config.title.unwrap(), "My site".to_string()); } #[test] diff --git a/components/templates/src/builtins/index.html b/components/templates/src/builtins/index.html new file mode 100644 index 0000000..e69de29 diff --git a/components/templates/src/builtins/page.html b/components/templates/src/builtins/page.html new file mode 100644 index 0000000..e69de29 diff --git a/components/templates/src/builtins/section.html b/components/templates/src/builtins/section.html new file mode 100644 index 0000000..e69de29 diff --git a/components/templates/src/lib.rs b/components/templates/src/lib.rs index 0837df0..c2b8d78 100644 --- a/components/templates/src/lib.rs +++ b/components/templates/src/lib.rs @@ -20,6 +20,12 @@ lazy_static! { pub static ref GUTENBERG_TERA: Tera = { let mut tera = Tera::default(); tera.add_raw_templates(vec![ + // adding default built-ins templates for index/page/section so + // users don't get an error when they run gutenberg after init + ("index.html", include_str!("builtins/index.html")), + ("page.html", include_str!("builtins/page.html")), + ("section.html", include_str!("builtins/section.html")), + ("rss.xml", include_str!("builtins/rss.xml")), ("sitemap.xml", include_str!("builtins/sitemap.xml")), ("robots.txt", include_str!("builtins/robots.txt")), diff --git a/src/cli.rs b/src/cli.rs index a25fcde..c6f9091 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -10,7 +10,7 @@ pub fn build_cli() -> App<'static, 'static> { (@arg config: -c --config +takes_value "Path to a config file other than config.toml") (@subcommand init => (about: "Create a new Gutenberg project") - (@arg name: +required "Name of the project. Will create a directory with that name in the current directory") + (@arg name: +required "Name of the project. Will create a new directory with that name in the current directory") ) (@subcommand build => (about: "Builds the site") diff --git a/src/cmd/init.rs b/src/cmd/init.rs index d1eca9a..2eb2789 100644 --- a/src/cmd/init.rs +++ b/src/cmd/init.rs @@ -1,14 +1,23 @@ -use std::fs::create_dir; +use std::fs::{create_dir, canonicalize}; use std::path::Path; use errors::Result; use utils::fs::create_file; +use prompt::{ask_bool, ask_url}; +use console; + const CONFIG: &'static str = r#" -title = "My site" -# replace the url below with yours -base_url = "https://example.com" +# The URL the site will be built for +base_url = "%BASE_URL%" + +# Whether to automatically compile all Sass files in the sass directory +compile_sass = %COMPILE_SASS% + +# Whether to do syntax highlighting +# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Gutenberg +highlight_code = %HIGHLIGHT% [extra] # Put all your custom variables here @@ -17,23 +26,38 @@ base_url = "https://example.com" pub fn create_new_project(name: &str) -> Result<()> { let path = Path::new(name); - // Better error message than the rust default if path.exists() && path.is_dir() { bail!("Folder `{}` already exists", path.to_string_lossy().to_string()); } - // main folder create_dir(path)?; - create_file(&path.join("config.toml"), CONFIG.trim_left())?; + console::info("Welcome to Gutenberg!"); - // content folder - create_dir(path.join("content"))?; + 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)?; - // layouts folder - create_dir(path.join("templates"))?; + let config = CONFIG + .trim_left() + .replace("%BASE_URL%", &base_url) + .replace("%COMPILE_SASS%", &format!("{}", compile_sass)) + .replace("%HIGHLIGHT%", &format!("{}", highlight)); + + create_file(&path.join("config.toml"), &config)?; + create_dir(path.join("content"))?; + create_dir(path.join("templates"))?; create_dir(path.join("static"))?; + if compile_sass { + create_dir(path.join("sass"))?; + } + println!(); + console::success(&format!("Done! Your site was created in {:?}", canonicalize(path).unwrap())); + println!(); + console::info("Get started by using the built-in server: `gutenberg serve`"); + println!("There is no built-in theme so you will see a white page."); + println!("Visit https://github.com/Keats/gutenberg for the full documentation."); Ok(()) } diff --git a/src/main.rs b/src/main.rs index 29cb6f9..2ae977d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,6 +6,7 @@ extern crate staticfile; extern crate iron; extern crate mount; extern crate notify; +extern crate url; extern crate ws; extern crate site; @@ -21,6 +22,7 @@ mod cmd; mod console; mod rebuild; mod cli; +mod prompt; fn main() { @@ -31,7 +33,7 @@ fn main() { match matches.subcommand() { ("init", Some(matches)) => { match cmd::create_new_project(matches.value_of("name").unwrap()) { - Ok(()) => console::success("Project created"), + Ok(()) => (), Err(e) => { console::unravel_errors("Failed to create the project", &e); ::std::process::exit(1); diff --git a/src/prompt.rs b/src/prompt.rs new file mode 100644 index 0000000..b51891b --- /dev/null +++ b/src/prompt.rs @@ -0,0 +1,53 @@ +use std::io::{self, Write, BufRead}; + +use url::Url; + +use errors::Result; + +/// Wait for user input and return what they typed +fn read_line() -> Result { + let stdin = io::stdin(); + let stdin = stdin.lock(); + let mut lines = stdin.lines(); + lines + .next() + .and_then(|l| l.ok()) + .ok_or("unable to read from stdin for confirmation".into()) +} + +/// Ask a yes/no question to the user +pub fn ask_bool(question: &str, default: bool) -> Result { + print!("{} {}: ", question, if default { "[Y/n]" } else { "[y/N]" }); + let _ = io::stdout().flush(); + let input = read_line()?; + + match &*input { + "y" | "Y" | "yes" | "YES" | "true" => Ok(true), + "n" | "N" | "no" | "NO" | "false" => Ok(false), + "" => Ok(default), + _ => { + println!("Invalid choice: '{}'", input); + ask_bool(question, default) + }, + } +} + +/// Ask a question to the user where they can write a URL +pub fn ask_url(question: &str, default: &str) -> Result { + print!("{} ({}): ", question, default); + let _ = io::stdout().flush(); + let input = read_line()?; + + match &*input { + "" => Ok(default.to_string()), + _ => { + match Url::parse(&input) { + Ok(_) => Ok(input), + Err(_) => { + println!("Invalid URL: '{}'", input); + ask_url(question, default) + } + } + }, + } +} From fc63765ee1713e88453329ab87afce565e316126 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 7 Aug 2017 20:38:13 +0900 Subject: [PATCH 3/5] Add a get_static_url global fn Fix #108 --- CHANGELOG.md | 1 + Cargo.lock | 2 + README.md | 14 +++++- components/config/Cargo.toml | 1 + components/config/src/lib.rs | 9 +++- components/site/src/lib.rs | 1 + components/templates/Cargo.toml | 1 + components/templates/src/global_fns.rs | 59 +++++++++++++++++++++++++- components/templates/src/lib.rs | 1 + 9 files changed, 86 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fdc4ce..dd49e3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ root page - Make `title` in config optional - Improved `gutenberg init` UX and users first experience +- Add a `get_static_url` global function that can do cachebusting ## 0.1.1 (2017-07-16) diff --git a/Cargo.lock b/Cargo.lock index c2e0d2c..34d44d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -233,6 +233,7 @@ dependencies = [ name = "config" version = "0.1.0" dependencies = [ + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "rendering 0.1.0", "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1144,6 +1145,7 @@ name = "templates" version = "0.1.0" dependencies = [ "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "config 0.1.0", "content 0.1.0", "errors 0.1.0", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/README.md b/README.md index 5d9a741..7efb170 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ the absolute URL of the current page and `current_path` that represents the path If you want to know all the data present in a template content, simply put `{{ __tera_context }}` in the templates and it will print it. -Gutenberg also ships with 3 Tera global functions: +Gutenberg also ships with a few Tera global functions: #### `get_page` Takes a path to a `.md` file and returns the associated page @@ -88,6 +88,18 @@ link in markdown. {% set url = get_url(link="./blog/_index.md") %} ``` +#### `get_static_url` +Gets the permalink for a given path, with cachebusting support. + +```jinja2 +{% get_static_url(path="path.css") %} +``` + +The path should start at the static folder root and should not being with a `/`. By default, +this will add a cachebust of the format `?t=1290192` at the end of a URL. You can disable it +by passing `cachebust=false` to the function. + + ### Static files Everything in the `static` folder will be copied into the output directory as-is. diff --git a/components/config/Cargo.toml b/components/config/Cargo.toml index 589359d..207c411 100644 --- a/components/config/Cargo.toml +++ b/components/config/Cargo.toml @@ -7,6 +7,7 @@ authors = ["Vincent Prouillet "] toml = "0.4" serde = "1.0" serde_derive = "1.0" +chrono = "0.4" errors = { path = "../errors" } rendering = { path = "../rendering" } diff --git a/components/config/src/lib.rs b/components/config/src/lib.rs index 32391c9..c74206f 100644 --- a/components/config/src/lib.rs +++ b/components/config/src/lib.rs @@ -4,6 +4,7 @@ extern crate toml; #[macro_use] extern crate errors; extern crate rendering; +extern crate chrono; use std::collections::HashMap; use std::fs::File; @@ -11,12 +12,13 @@ use std::io::prelude::*; use std::path::Path; use toml::{Value as Toml}; +use chrono::Utc; use errors::{Result, ResultExt}; use rendering::highlighting::THEME_SET; -#[derive(Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Config { /// Base URL of the site, the only required config argument pub base_url: String, @@ -48,6 +50,9 @@ pub struct Config { /// All user params set in [extra] in the config pub extra: Option>, + + /// Set automatically when instantiating the config. Used for cachebusting + pub build_timestamp: Option, } macro_rules! set_default { @@ -85,6 +90,7 @@ impl Config { None => config.highlight_theme = Some("base16-ocean-dark".to_string()) }; + config.build_timestamp = Some(Utc::now().timestamp()); Ok(config) } @@ -136,6 +142,7 @@ impl Default for Config { insert_anchor_links: Some(false), compile_sass: Some(false), extra: None, + build_timestamp: Some(1), } } } diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index b66b677..25a10f0 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -218,6 +218,7 @@ impl Site { self.tera.register_global_function("get_page", global_fns::make_get_page(&self.pages)); self.tera.register_global_function("get_section", global_fns::make_get_section(&self.sections)); + self.tera.register_global_function("get_static_url", global_fns::make_get_static_url(self.config.clone())); self.register_get_url_fn(); Ok(()) diff --git a/components/templates/Cargo.toml b/components/templates/Cargo.toml index 7bb0ec8..033f29b 100644 --- a/components/templates/Cargo.toml +++ b/components/templates/Cargo.toml @@ -12,3 +12,4 @@ pulldown-cmark = "0" errors = { path = "../errors" } utils = { path = "../utils" } content = { path = "../content" } +config = { path = "../config" } diff --git a/components/templates/src/global_fns.rs b/components/templates/src/global_fns.rs index a945405..982966d 100644 --- a/components/templates/src/global_fns.rs +++ b/components/templates/src/global_fns.rs @@ -4,6 +4,7 @@ use std::path::{PathBuf}; use tera::{GlobalFn, Value, from_value, to_value, Result}; use content::{Page, Section}; +use config::Config; use utils::site::resolve_internal_link; @@ -51,7 +52,7 @@ pub fn make_get_section(all_sections: &HashMap) -> GlobalFn { }) } -pub fn make_get_url(permalinks: HashMap,) -> GlobalFn { +pub fn make_get_url(permalinks: HashMap) -> GlobalFn { Box::new(move |args| -> Result { match args.get("link") { Some(val) => match from_value::(val.clone()) { @@ -65,3 +66,59 @@ pub fn make_get_url(permalinks: HashMap,) -> GlobalFn { } }) } + +pub fn make_get_static_url(config: Config) -> GlobalFn { + Box::new(move |args| -> Result { + let cachebust = args + .get("cachebust") + .map_or(true, |c| { + from_value::(c.clone()).unwrap_or(true) + }); + + match args.get("path") { + Some(val) => match from_value::(val.clone()) { + Ok(v) => { + let mut permalink = config.make_permalink(&v); + if cachebust { + permalink = format!("{}?t={}", permalink, config.build_timestamp.unwrap()); + } + Ok(to_value(permalink).unwrap()) + }, + Err(_) => Err(format!("`get_static_url` received path={:?} but it requires a string", val).into()), + + }, + None => Err("`get_static_url` requires a `path` argument.".into()), + } + }) +} + +#[cfg(test)] +mod tests { + use super::make_get_static_url; + + use std::collections::HashMap; + + use tera::to_value; + + use config::Config; + + + #[test] + fn add_cachebust_to_static_url_by_default() { + let config = Config::default(); + let static_fn = make_get_static_url(config); + let mut args = HashMap::new(); + args.insert("path".to_string(), to_value("app.css").unwrap()); + assert_eq!(static_fn(args).unwrap(), "http://a-website.com/app.css/?t=1"); + } + + #[test] + fn can_disable_cachebust_for_static_url() { + let config = Config::default(); + let static_fn = make_get_static_url(config); + let mut args = HashMap::new(); + args.insert("path".to_string(), to_value("app.css").unwrap()); + args.insert("cachebust".to_string(), to_value(false).unwrap()); + assert_eq!(static_fn(args).unwrap(), "http://a-website.com/app.css/"); + } +} diff --git a/components/templates/src/lib.rs b/components/templates/src/lib.rs index c2b8d78..180a871 100644 --- a/components/templates/src/lib.rs +++ b/components/templates/src/lib.rs @@ -8,6 +8,7 @@ extern crate pulldown_cmark; extern crate errors; extern crate utils; extern crate content; +extern crate config; pub mod filters; pub mod global_fns; From 8a11d8e0498a73184ea3f217a203615ff20d8aaa Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 7 Aug 2017 23:29:58 +0900 Subject: [PATCH 4/5] Fold get_static_url in get_url --- CHANGELOG.md | 3 +- Cargo.lock | 307 ++++++++++++++----------- README.md | 19 +- components/site/src/lib.rs | 6 +- components/templates/src/global_fns.rs | 61 +++-- 5 files changed, 217 insertions(+), 179 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd49e3b..2f47506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ root page - Make `title` in config optional - Improved `gutenberg init` UX and users first experience -- Add a `get_static_url` global function that can do cachebusting +- Make `get_url` work for any path with optional cachebusting. Deprecates `link` param +in favour of `path` to be consistent ## 0.1.1 (2017-07-16) diff --git a/Cargo.lock b/Cargo.lock index 34d44d3..de35194 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,7 +33,7 @@ version = "0.2.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.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -42,22 +42,22 @@ name = "backtrace" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dbghelp-sys 0.2.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.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.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 = "backtrace-sys" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -83,8 +83,8 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -93,10 +93,10 @@ version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cexpr 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cexpr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "clang-sys 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.25.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -148,10 +148,10 @@ dependencies = [ [[package]] name = "cexpr" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nom 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nom 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -164,7 +164,7 @@ name = "chrono" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -173,7 +173,7 @@ name = "chrono" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -184,13 +184,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clap" -version = "2.25.0" +version = "2.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -198,8 +198,8 @@ dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation 1.2.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)", ] @@ -236,9 +236,9 @@ dependencies = [ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "errors 0.1.0", "rendering 0.1.0", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -250,13 +250,26 @@ dependencies = [ "front_matter 0.1.0", "rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "rendering 0.1.0", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 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)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] +[[package]] +name = "conv" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "custom_derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "dbghelp-sys" version = "0.2.0" @@ -307,8 +320,8 @@ name = "errors" version = "0.1.0" dependencies = [ "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -316,7 +329,7 @@ name = "filetime" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -324,7 +337,7 @@ name = "flate2" version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -341,10 +354,10 @@ dependencies = [ "errors 0.1.0", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -354,7 +367,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.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -362,7 +375,7 @@ name = "fsevent-sys" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -390,7 +403,7 @@ name = "gutenberg" version = "0.1.1" dependencies = [ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.25.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)", "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", @@ -400,7 +413,7 @@ dependencies = [ "site 0.1.0", "staticfile 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "term-painter 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.5.1 (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)", @@ -436,7 +449,7 @@ dependencies = [ [[package]] name = "idna" -version = "0.1.2" +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)", @@ -449,7 +462,7 @@ name = "inotify" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -457,7 +470,7 @@ name = "iovec" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -504,12 +517,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazycell" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.26" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -527,6 +540,23 @@ name = "log" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "magenta" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "magenta-sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "matches" version = "0.1.6" @@ -537,7 +567,7 @@ name = "memchr" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -554,7 +584,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -563,10 +593,10 @@ 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.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.30 (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.38 (registry+https://github.com/rust-lang/crates.io-index)", @@ -575,16 +605,18 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.0 (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.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "magenta-sys 0.1.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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -595,7 +627,7 @@ 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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.30 (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)", ] @@ -606,7 +638,7 @@ 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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.30 (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)", ] @@ -627,12 +659,12 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.29" +version = "0.2.30" 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)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (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)", ] @@ -643,12 +675,12 @@ 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.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "nom" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -665,7 +697,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.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -673,34 +705,34 @@ dependencies = [ [[package]] name = "num" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-iter" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -708,27 +740,27 @@ name = "num_cpus" version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "onig" -version = "1.4.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", - "onig_sys 64.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", + "onig_sys 65.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "onig_sys" -version = "64.0.1" +version = "65.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -740,9 +772,9 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -773,7 +805,7 @@ dependencies = [ "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -821,10 +853,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rand" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", + "magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -843,14 +876,14 @@ dependencies = [ "coco 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" -version = "0.1.26" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -879,12 +912,12 @@ dependencies = [ "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 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)", "syntect 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", - "tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -917,7 +950,7 @@ name = "sass-rs" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "sass-sys 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -928,7 +961,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bindgen 0.26.3 (registry+https://github.com/rust-lang/crates.io-index)", "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -944,12 +977,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.10" +version = "1.0.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)", @@ -973,8 +1006,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -994,12 +1027,12 @@ dependencies = [ "pagination 0.1.0", "rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "sass-rs 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", "taxonomies 0.1.0", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", - "tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1066,11 +1099,11 @@ dependencies = [ "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "onig 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "onig 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "plist 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1090,7 +1123,7 @@ name = "syntex_errors" version = "0.58.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_pos 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1126,10 +1159,10 @@ dependencies = [ "content 0.1.0", "errors 0.1.0", "front_matter 0.1.0", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 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)", - "tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1137,7 +1170,7 @@ name = "tempdir" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1150,13 +1183,13 @@ dependencies = [ "errors 0.1.0", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] [[package]] name = "tera" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1166,7 +1199,7 @@ dependencies = [ "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "pest 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1195,13 +1228,13 @@ 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)", - "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "textwrap" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1223,17 +1256,17 @@ version = "0.1.38" 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.26 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1277,7 +1310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicode-segmentation" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1316,7 +1349,7 @@ name = "url" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "idna 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "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.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1379,8 +1412,8 @@ dependencies = [ "bytes 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.16 (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.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1414,7 +1447,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfdf7355d9db158df68f976ed030ab0f6578af811f5a7bb6dcf221ec24e0e0" "checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" "checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76" -"checksum backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3a0d842ea781ce92be2bf78a9b38883948542749640b8378b3b2f03d1fd9f1ff" +"checksum backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "afccc5772ba333abccdf60d55200fa3406f8c59dcf54d5f7998c9107d3799c7c" "checksum base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557" "checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" "checksum bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e" @@ -1426,15 +1459,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d" "checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27" "checksum bytes 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8b24f16593f445422331a5eed46b72f7f171f910fead4f2ea8f17e727e9c5c14" -"checksum cexpr 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9c0ebe79c87d576f48bf133e5d2119fe69b96f2264cf582fd82dd206043791" +"checksum cexpr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cdbb21df6ff3497a61df5059994297f746267020ba38ce237aad9c875f7b4313" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum chrono 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "158b0bd7d75cbb6bf9c25967a48a2e9f77da95876b858eadfabaa99cd069de6e" "checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" "checksum clang-sys 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "611ec2e3a7623afd8a8c0d027887b6b55759d894abbf5fe11b9dc11b50d5b49a" -"checksum clap 2.25.0 (registry+https://github.com/rust-lang/crates.io-index)" = "867a885995b4184be051b70a592d4d70e32d7a188db6e8dff626af286a962771" +"checksum clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2267a8fdd4dce6956ba6649e130f62fb279026e5e84b92aa939ac8f85ce3f9f0" "checksum cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f" "checksum coco 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c06169f5beb7e31c7c67ebf5540b8b472d23e3eade3b2ec7d1f5b504a85f91bd" "checksum conduit-mime-types 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "95ca30253581af809925ef68c2641cc140d6183f43e12e0af4992d53768bd7b8" +"checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299" +"checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" "checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90" "checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a" @@ -1453,7 +1488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "af2f2dd97457e8fb1ae7c5a420db346af389926e36f43768b96f101546b04a07" "checksum humansize 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "92d211e6e70b05749dce515b47684f29a3c8c38bbbb21c50b30aff9eca1b0bd3" "checksum hyper 0.10.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0f01e4a20f5dfa5278d7762b7bdb7cab96e24378b9eca3889fbd4b5e94dc7063" -"checksum idna 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2233d4940b1f19f0418c158509cd7396b8d70a5db5705ce410914dc8fa603b37" +"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.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29d062ee61fccdf25be172e70f34c9f6efc597e1fb8f6526e8437b2046ab26be" "checksum iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2440ae846e7a8c7f9b401db8f6e31b4ea5e7d3688b91761337da7e054520c75b" @@ -1461,31 +1496,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "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.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" -"checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b" -"checksum libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "30885bcb161cf67054244d10d4a7f4835ffd58773bc72e07d35fecf472295503" +"checksum lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b585b7a6811fb03aa10e74b278a0f00f8dd9b45dc681f148bb29fa5cb61859b" +"checksum libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8a014d9226c2cc402676fbe9ea2e15dd5222cd1dd57f576b5b283178c944a264" "checksum libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be99f814beb3e9503a786a592c909692bb6d4fc5a695f6ed7987223acfbd5194" "checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b" +"checksum magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf0336886480e671965f794bc9b6fce88503563013d1bfb7a502c81fe3ac527" +"checksum magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40d014c7011ac470ae28e2f76a02bfea4a8480f73e701353b49ad7a8d75f4699" "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726" "checksum mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a637d1ca14eacae06296a008fa7ad955347e34efcb5891cfd8ba05491a37907e" -"checksum mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9e965267d4d58496fc4f740e9861118367f13570cadf66316ed2c3f2f14d87c7" +"checksum mio 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "dbd91d3bfbceb13897065e97b2ef177a09a438cb33612b2d371bf568819a9313" "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.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32245731923cd096899502fc4c4317cfd09f121e80e73f7f576cf3777a824256" -"checksum net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "bc01404e7568680f1259aa5729539f221cb1e6d047a0d9053cab4be8a73b5d67" +"checksum net2 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)" = "94101fd932816f97eb9a5116f6c1a11511a1fed7db21c5ccd823b2dc11abf566" "checksum nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb3ddedaa14746434a02041940495bf11325c22f6d36125d3bdd56090d50a79" -"checksum nom 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f609d6a10aad859fdfccb134ba1022bbdfac52dd759acc2ab75171874056237" +"checksum nom 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06989cbd367e06f787a451f3bc67d8c3e0eaa10b461cc01152ffab24261a31b1" "checksum notify 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "298d4401ff2c6cebb7f8944c90288647c89ce59029d43b439444cf1067df55e1" -"checksum num 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "2c3a3dc9f30bf824141521b30c908a859ab190b76e20435fcd89f35eb6583887" -"checksum num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "ef1a4bf6f9174aa5783a9b4cc892cacd11aebad6c69ad027a0b65c6ca5f8aa37" -"checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e" -"checksum num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "1708c0628602a98b52fad936cf3edb9a107af06e52e49fdf0707e884456a6af6" +"checksum num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "a311b77ebdc5dd4cf6449d81e4135d9f0e3b153839ac90e648a8ef538f923525" +"checksum num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "d1452e8b06e448a07f0e6ebb0bb1d92b8890eea63288c0b627331d53514d0fba" +"checksum num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01" +"checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0" "checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584" -"checksum onig 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0da8cd0eff000f68698dd3f773a0e580a68aa1959e999eed5eec53e23ded89d7" -"checksum onig_sys 64.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4401b2ffbef83c7f16578d477689c2b9ab114204651da4efcb626efe603ca9f4" +"checksum onig 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1271a3f93197303deda8aedcd96ed2dbb908f61c0954ae70bf7a42f536dc35d7" +"checksum onig_sys 65.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fbdee58fb75f5b7749ebc8f601f570961eed595dfe4c2bb9a542e2f7ae20b946" "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356" "checksum pest 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e823a5967bb4cdc6d3e46f47baaf4ecfeae44413a642b74ad44e59e49c7f6" @@ -1496,10 +1533,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum quasi 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18c45c4854d6d1cf5d531db97c75880feb91c958b0720f4ec1057135fec358b3" "checksum quasi_codegen 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51b9e25fa23c044c1803f43ca59c98dac608976dd04ce799411edd58ece776d4" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d" +"checksum rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "eb250fd207a4729c976794d03db689c9be1d634ab5a1c9da9492a13d8fecbcdf" "checksum rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b614fe08b6665cb9a231d07ac1364b0ef3cb3698f1239ee0c4c3a88a524f54c8" "checksum rayon-core 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7febc28567082c345f10cddc3612c6ea020fc3297a1977d472cf9fdb73e6e493" -"checksum redox_syscall 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "9df6a71a1e67be2104410736b2389fb8e383c1d7e9e792d629ff13c02867147a" +"checksum redox_syscall 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9309631a35303bffb47e397198e3668cb544fe8834cd3da2a744441e70e524" "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b" "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db" "checksum rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3058a43ada2c2d0b92b3ae38007a2d0fa5e9db971be260e0171408a4ff471c95" @@ -1510,8 +1547,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum sass-sys 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49e6025ff142eb235157aea8d6ee8085d9f5b80e280cb54b911f6b778e64075a" "checksum scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c79eb2c3ac4bc2507cda80e7f3ac5b88bd8eae4c0914d5663e6a8933994be918" "checksum sequence_trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c915714ca833b1d4d6b8f6a9d72a3ff632fe45b40a8d184ef79c81bec6327eed" -"checksum serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "433d7d9f8530d5a939ad5e0e72a6243d2e42a24804f70bf592c679363dcacb2f" -"checksum serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7b707cf0d4cab852084f573058def08879bb467fda89d99052485e7d00edd624" +"checksum serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f7726f29ddf9731b17ff113c461e362c381d9d69433f79de4f3dd572488823e9" +"checksum serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cf823e706be268e73e7747b147aa31c8f633ab4ba31f115efb57e5047c3a76dd" "checksum serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37aee4e0da52d801acfbc0cc219eb1eda7142112339726e427926a6f6ee65d3a" "checksum serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "48b04779552e92037212c3615370f6bd57a40ebba7f20e554ff9f55e41a69a7b" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" @@ -1528,21 +1565,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum syntex_pos 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13ad4762fe52abc9f4008e85c4fb1b1fe3aa91ccb99ff4826a439c7c598e1047" "checksum syntex_syntax 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6e0e4dbae163dd98989464c23dd503161b338790640e11537686f2ef0f25c791" "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" -"checksum tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)" = "62736a6d748fd2c5a8b4be21010e37d79f78aea3c2e07a9e13ff5c70864a3129" +"checksum tera 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f489baf141c77dbcd2734a339fff2878ca1f4253481dfc4adf9e063b5c3f5a96" "checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1" "checksum term-painter 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ab900bf2f05175932b13d4fc12f8ff09ef777715b04998791ab2c930841e496b" "checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209" -"checksum textwrap 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f86300c3e7416ee233abd7cda890c492007a3980f941f79185c753a701257167" +"checksum textwrap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f728584ea33b0ad19318e20557cb0a39097751dbb07171419673502f848c7af6" "checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14" "checksum time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520" -"checksum toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b0601da6c97135c8d330c7a13a013ca6cd4143221b01de2f8d4edc50a9e551c7" +"checksum toml 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3e5e16033aacf7eead46cbcb62d06cf9d1c2aa1b12faa4039072f7ae5921103b" "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 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-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3" +"checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946" "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 unidecode 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2adb95ee07cd579ed18131f2d9e7a17c25a4b76022935c7f2460d2bfae89fd2" diff --git a/README.md b/README.md index 7efb170..ae46643 100644 --- a/README.md +++ b/README.md @@ -81,24 +81,25 @@ Takes a path to a `_index.md` file and returns the associated section ``` ####` get_url` -Gets the permalink for a local file following the same convention as internal -link in markdown. +Gets the permalink for the given path. +If the path starts with `./`, it will be understood as an internal +link like the ones used in markdown. ```jinja2 -{% set url = get_url(link="./blog/_index.md") %} +{% set url = get_url(path="./blog/_index.md") %} ``` -#### `get_static_url` -Gets the permalink for a given path, with cachebusting support. +This can also be used to get the permalinks for static assets for example if +we want to link to the file that is located at `static/css/app.css`: ```jinja2 -{% get_static_url(path="path.css") %} +{{ get_url(path="css/app.css") }} ``` -The path should start at the static folder root and should not being with a `/`. By default, -this will add a cachebust of the format `?t=1290192` at the end of a URL. You can disable it -by passing `cachebust=false` to the function. +Note that the path shouldn't start with a slash. +In the case of non-internal links, you can also add a cachebust of the format `?t=1290192` at the end of a URL +by passing `cachebust=true` to the `get_url` function. ### Static files Everything in the `static` folder will be copied into the output directory as-is. diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 25a10f0..3b4a3cf 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -218,7 +218,6 @@ impl Site { self.tera.register_global_function("get_page", global_fns::make_get_page(&self.pages)); self.tera.register_global_function("get_section", global_fns::make_get_section(&self.sections)); - self.tera.register_global_function("get_static_url", global_fns::make_get_static_url(self.config.clone())); self.register_get_url_fn(); Ok(()) @@ -226,7 +225,10 @@ impl Site { /// Separate fn as it can be called in the serve command pub fn register_get_url_fn(&mut self) { - self.tera.register_global_function("get_url", global_fns::make_get_url(self.permalinks.clone())); + self.tera.register_global_function( + "get_url", + global_fns::make_get_url(self.permalinks.clone(), self.config.clone()) + ); } /// Add a page to the site diff --git a/components/templates/src/global_fns.rs b/components/templates/src/global_fns.rs index 982966d..b9086cb 100644 --- a/components/templates/src/global_fns.rs +++ b/components/templates/src/global_fns.rs @@ -52,49 +52,46 @@ pub fn make_get_section(all_sections: &HashMap) -> GlobalFn { }) } -pub fn make_get_url(permalinks: HashMap) -> GlobalFn { - Box::new(move |args| -> Result { - match args.get("link") { - Some(val) => match from_value::(val.clone()) { - Ok(v) => match resolve_internal_link(&v, &permalinks) { - Ok(url) => Ok(to_value(url).unwrap()), - Err(_) => Err(format!("Could not resolve URL for link `{}` not found.", v).into()) - }, - Err(_) => Err(format!("`get_url` received link={:?} but it requires a string", val).into()), - }, - None => Err("`get_url` requires a `link` argument.".into()), - } - }) -} - -pub fn make_get_static_url(config: Config) -> GlobalFn { +pub fn make_get_url(permalinks: HashMap, config: Config) -> GlobalFn { Box::new(move |args| -> Result { let cachebust = args .get("cachebust") - .map_or(true, |c| { - from_value::(c.clone()).unwrap_or(true) + .map_or(false, |c| { + from_value::(c.clone()).unwrap_or(false) }); - match args.get("path") { + if args.contains_key("link") { + println!("> DEPRECATION -- `link` is deprecated for `get_url`: use `path` instead"); + } + + match args.get("link").or_else(|| args.get("path")) { Some(val) => match from_value::(val.clone()) { Ok(v) => { - let mut permalink = config.make_permalink(&v); - if cachebust { - permalink = format!("{}?t={}", permalink, config.build_timestamp.unwrap()); + // Internal link + if v.starts_with("./") { + match resolve_internal_link(&v, &permalinks) { + Ok(url) => Ok(to_value(url).unwrap()), + Err(_) => Err(format!("Could not resolve URL for link `{}` not found.", v).into()) + } + } else { + // anything else + let mut permalink = config.make_permalink(&v); + if cachebust { + permalink = format!("{}?t={}", permalink, config.build_timestamp.unwrap()); + } + return Ok(to_value(permalink).unwrap()); } - Ok(to_value(permalink).unwrap()) }, - Err(_) => Err(format!("`get_static_url` received path={:?} but it requires a string", val).into()), - + Err(_) => Err(format!("`get_url` received path={:?} but it requires a string", val).into()), }, - None => Err("`get_static_url` requires a `path` argument.".into()), + None => Err("`get_url` requires a `path` argument.".into()), } }) } #[cfg(test)] mod tests { - use super::make_get_static_url; + use super::make_get_url; use std::collections::HashMap; @@ -104,21 +101,21 @@ mod tests { #[test] - fn add_cachebust_to_static_url_by_default() { + fn can_add_cachebust_to_url() { let config = Config::default(); - let static_fn = make_get_static_url(config); + let static_fn = make_get_url(HashMap::new(), config); let mut args = HashMap::new(); args.insert("path".to_string(), to_value("app.css").unwrap()); + args.insert("cachebust".to_string(), to_value(true).unwrap()); assert_eq!(static_fn(args).unwrap(), "http://a-website.com/app.css/?t=1"); } #[test] - fn can_disable_cachebust_for_static_url() { + fn can_link_to_some_static_file() { let config = Config::default(); - let static_fn = make_get_static_url(config); + let static_fn = make_get_url(HashMap::new(), config); let mut args = HashMap::new(); args.insert("path".to_string(), to_value("app.css").unwrap()); - args.insert("cachebust".to_string(), to_value(false).unwrap()); assert_eq!(static_fn(args).unwrap(), "http://a-website.com/app.css/"); } } From 145829023c5333526da05e6880def8e979d71288 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 9 Aug 2017 13:42:27 +0900 Subject: [PATCH 5/5] Prepare for 0.1.2 release --- CHANGELOG.md | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f47506..c134ac5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,13 @@ # Changelog -## 0.1.2 (unreleased) +## 0.1.2 (2017-08-09) - Add `redirect_to` to section front matter to redirect when landing on section root page - Make `title` in config optional - Improved `gutenberg init` UX and users first experience -- Make `get_url` work for any path with optional cachebusting. Deprecates `link` param -in favour of `path` to be consistent +- Make `get_url` work for any path with optional cachebusting. +- Deprecates `link` param of `get_url` in favour of `path` to be consistent ## 0.1.1 (2017-07-16) diff --git a/Cargo.toml b/Cargo.toml index 42e7abf..55613de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gutenberg" -version = "0.1.1" +version = "0.1.2" authors = ["Vincent Prouillet "] license = "MIT" readme = "README.md"