diff --git a/CHANGELOG.md b/CHANGELOG.md index 72a08eb..9d112fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,14 @@ - Fix XML templates overriding and reloading - `title` and `description` are now optional in the front matter -- Add GenericConfig, Vim syntax +- Add GenericConfig, Vim, Jinja2 syntax - Add `_index.md` for homepage as well and make that into a normal section - Allow sorting by `none`, `date` and `order` for sections - Add pagination - Add a `get_page` global function to tera +- Revamp index page, no more `pages` variables +- Fix livereload stopping randomly +- Smarter re-rendering in `serve` command ## 0.0.4 (2017-04-23) diff --git a/Cargo.lock b/Cargo.lock index 52cc3c4..faa70f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -68,7 +68,7 @@ name = "backtrace-sys" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -173,7 +173,7 @@ name = "cmake" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "gcc" -version = "0.3.45" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -408,7 +408,7 @@ name = "miniz-sys" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1096,7 +1096,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344" "checksum fsevent 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)" = "dfe593ebcfc76884138b25426999890b10da8e6a46d01b499d7c54c604672c38" "checksum fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a772d36c338d07a032d5375a36f15f9a7043bf0cb8ce7cee658e037c6032874" -"checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae" +"checksum gcc 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)" = "181e3cebba1d663bd92eb90e2da787e10597e027eb00de8d742b260a7850948f" "checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21" diff --git a/src/cmd/build.rs b/src/bin/cmd/build.rs similarity index 70% rename from src/cmd/build.rs rename to src/bin/cmd/build.rs index 6f65f67..69dc2c7 100644 --- a/src/cmd/build.rs +++ b/src/bin/cmd/build.rs @@ -3,11 +3,12 @@ use std::env; use gutenberg::errors::Result; use gutenberg::Site; +use console; pub fn build(config_file: &str) -> Result<()> { let mut site = Site::new(env::current_dir().unwrap(), config_file)?; site.load()?; - super::notify_site_size(&site); - super::warn_about_ignored_pages(&site); + console::notify_site_size(&site); + console::warn_about_ignored_pages(&site); site.build() } diff --git a/src/cmd/init.rs b/src/bin/cmd/init.rs similarity index 100% rename from src/cmd/init.rs rename to src/bin/cmd/init.rs diff --git a/src/cmd/livereload.js b/src/bin/cmd/livereload.js similarity index 96% rename from src/cmd/livereload.js rename to src/bin/cmd/livereload.js index fd22110..eaa78b0 100644 --- a/src/cmd/livereload.js +++ b/src/bin/cmd/livereload.js @@ -4,7 +4,7 @@ _ref = require('./protocol'), Parser = _ref.Parser, PROTOCOL_6 = _ref.PROTOCOL_6, PROTOCOL_7 = _ref.PROTOCOL_7; - Version = '2.2.2'; + Version = '2.2.1'; exports.Connector = Connector = (function() { function Connector(options, WebSocket, Timer, handlers) { @@ -12,7 +12,7 @@ this.WebSocket = WebSocket; this.Timer = Timer; this.handlers = handlers; - this._uri = "ws" + (this.options.https ? "s" : "") + "://" + this.options.host + ":" + this.options.port + "/livereload"; + this._uri = "ws://" + this.options.host + ":" + this.options.port + "/livereload"; this._nextDelay = this.options.mindelay; this._connectionDesired = false; this.protocol = 0; @@ -278,8 +278,7 @@ },{}],4:[function(require,module,exports){ (function() { - var Connector, LiveReload, Options, Reloader, Timer, - __hasProp = {}.hasOwnProperty; + var Connector, LiveReload, Options, Reloader, Timer; Connector = require('./connector').Connector; @@ -291,15 +290,11 @@ exports.LiveReload = LiveReload = (function() { function LiveReload(window) { - var k, v, _ref; this.window = window; this.listeners = {}; this.plugins = []; this.pluginIdentifiers = {}; - this.console = this.window.console && this.window.console.log && this.window.console.error ? this.window.location.href.match(/LR-verbose/) ? this.window.console : { - log: function() {}, - error: this.window.console.error.bind(this.window.console) - } : { + this.console = this.window.location.href.match(/LR-verbose/) && this.window.console && this.window.console.log && this.window.console.error ? this.window.console : { log: function() {}, error: function() {} }; @@ -307,20 +302,9 @@ this.console.error("LiveReload disabled because the browser does not seem to support web sockets"); return; } - if ('LiveReloadOptions' in window) { - this.options = new Options(); - _ref = window['LiveReloadOptions']; - for (k in _ref) { - if (!__hasProp.call(_ref, k)) continue; - v = _ref[k]; - this.options.set(k, v); - } - } else { - this.options = Options.extract(this.window.document); - if (!this.options) { - this.console.error("LiveReload disabled because it could not find its own