Commit graph

10 commits

Author SHA1 Message Date
Tymoteusz Wiśniewski 974ae167a8
Make path to config.toml independent from root dir (#1023)
fixes #1022
2020-05-23 11:55:45 +02:00
Vincent Prouillet 0d5fefd446 Update image to 0.23 2020-02-10 20:48:52 +01:00
ethereal 94445ae745 Add --root global argument. Fixes #899. (#932) 2020-02-02 17:48:43 -08:00
Sam Ford e804f907b2 Use Rust 2018 edition (#885) 2020-02-02 17:48:43 -08:00
Vincent Prouillet b396a1bc20 Add --drafts flag + rustfmt 2019-08-24 22:23:08 +02:00
Vincent Prouillet a923f7005f Update site summary in zola check 2019-07-12 23:43:07 +02:00
Vincent Prouillet 28ecf553d5 Add counts in zola check
Closes #726
2019-07-12 23:38:46 +02:00
traviscross 46ee256ba4 Fix clippy warnings (#744)
Clippy is returning some warnings.  Let's fix or explicitly ignore
them.  In particular:

- In `components/imageproc/src/lib.rs`, we implement `Hash` explicitly
  but derive `PartialEq`.  We need to maintain the property that two
  keys being equal implies the hashes of those two keys are equal.
  Our `Hash` implementations preserve this, so we'll explicitly ignore
  the warnings.

- In `components/site/src/lib.rs`, we were calling `.into()` on some
  values that are already of the correct type.

- In `components/site/src/lib.rs`, we were using `.map(|x| *x)` in
  iterator chains to remove a level of indirection; we can instead say
  `.copied()` (introduced in Rust v1.36) or `.cloned()`.  Using
  `.copied` here is better from a type-checking point of view, but
  we'll use `.cloned` for now as Rust v1.36 was only recently
  released.

- In `components/templates/src/filters.rs` and
  `components/utils/src/site.rs`, we were taking `HashMap`s as
  function arguments but not generically accepting alternate `Hasher`
  implementations.

- In `src/cmd/check.rs`, we use `env::current_dir()` as a default
  value, but our use of `unwrap_or` meant that we would always
  retrieve the current directory even when not needed.

- In `components/errors/src/lib.rs`, we can use `if let` rather than
  `match`.

- In `components/library/src/content/page.rs`, we can collapse a
  nested conditional into `else if let ...`.

- In `components/library/src/sorting.rs`, a function takes `&&Page`
  arguments.  Clippy warns about this for efficiency reasons, but
  we're doing it here to match a particular sorting API, so we'll
  explicitly ignore the warning.
2019-07-12 22:54:18 +02:00
Vincent Prouillet cb962f7a64 Add aliases to sections 2019-06-02 20:21:06 +02:00
Marcus Klaas de Vries 0d964204c3 Check command global (#683)
* Add check subcommand

* Add some brief documentation for the check subcommand

* Start working on parallel link checks

* Check all external links in Site

* Return *all* dead links in site
2019-05-27 14:05:07 +02:00