Commit graph

359 commits

Author SHA1 Message Date
Vincent Prouillet 1249d4dc84 Prepare for 0.14.1 2021-08-24 08:50:44 +02:00
liushuyu c658d171f8
cargo/manifests: allow user to use native-tls if ring is unsupported (#1587)
* cargo/manifests: allow user to use native-tls ...

... if `ring` can't be used on the user's platform (e.g. mips/ppc/riscv)

* CI: test for native tls build
2021-08-18 15:32:34 +02:00
Vincent Prouillet 88e5c6e167 Update deps 2021-08-12 08:54:55 +02:00
Vincent Prouillet 85f68f87cc Update minify and respect HTML spec 2021-08-09 20:28:17 +02:00
Vincent Prouillet 9275d932e2 Next version 2021-08-08 10:29:44 +02:00
Vincent Prouillet c0895b62f9 Update deps 2021-07-18 14:03:14 +02:00
Vincent Prouillet 4a87689cfb Add class based syntax higlighting + line numbers (#1531)
* Add class based syntax higlighting + line numbers

* Use fork of syntect for now

* Fix tests

* Fix diff background on inline highlighter

Co-authored-by: evan-brass <evan-brass@protonmail.com>
2021-07-10 08:53:19 +02:00
Vincent Prouillet ee85300303 Mention load_data only works with utf-8
Closes #1539
2021-06-29 22:24:34 +02:00
Marshall Bowers 93900fb623
Add num_format filter (#1460)
* Add `num_format` filter for displaying formatted numbers

* Register the filter

* Update docs

* Make `locale` argument required

* Revert "Make `locale` argument required"

This reverts commit 9cdbf285915f0257d1b9157572588b0ce6698a44.

* Pull the default locale from the site config

* Add note about defaults to the docs

* Add missing borrow
2021-06-25 10:07:52 +02:00
Vincent Prouillet c49d62cd1e Update deps 2021-06-24 21:59:41 +02:00
Vojtech Kral 9145af6b3e imageproc things for paths refactor (#1484)
* Move image loading code used by get_image_metadata from templates to imageproc

* resize_image: Compute image resize op beforehand and return metadata to caller

* get_image_metdata: Use a serializable response struct

* imageproc: Add integration tests

* imageproc: Assume webp is lossy

* get_image_metadata: Use webp crate for decoding WebP, image is still not very good at it

* imageproc: Test read_image_dimensions in integration tests

* imageproc: Rename read_image_dimensions() as read_image_metadata()

* imageproc: Fix a regression in hash computation

* imageproc: Don't hardcode hashes in integration tests, pattern match them instead

* imageproc: Style fixes

* imageproc: Fix integration tests on Windows (hopefully)
2021-06-10 10:26:12 +02:00
Vincent Prouillet 7fb99eaa44 Revamp the images template functions 2021-06-10 10:26:12 +02:00
Vincent Prouillet b0937fa5b7 Some more cleanup 2021-06-10 10:26:12 +02:00
Tim Schumacher 16c123aa20
Include path in the search index with include_path (#1509) 2021-06-02 09:18:39 +02:00
Vincent Prouillet fe79798b0f Remove unused code + rustfmt 2021-05-23 18:13:28 +02:00
Vincent Prouillet 1fab9c664d Update slotmap + handle in memory XML content type in zola serve
Second part of #1308
2021-05-09 15:57:46 +02:00
Vincent Prouillet 10c1739c62 Update pinned MSRV 2021-05-05 21:36:56 +02:00
Vincent Prouillet e92e4f1003 Tweaks to load_data + update deps 2021-04-21 21:43:02 +02:00
Stanislas 47b920777a
link_checking: prevent rate-limiting (#1421)
* link_checking: prevent rate-limiting

Fix for https://github.com/getzola/zola/issues/1056.

- assign all links for a domain to the same thread
- reduce number of threads from 32 to 8
- add sleep between HTTP calls

* Add get_link_domain(), use for loops

* Do not sleep after last link for domain

* Avoid quadratic complexity

* remove prints
2021-04-21 21:13:38 +02:00
Songmin Li 4f7b960985
Fix can not build with indexing-zh (#1433)
* fix can not build zola with search/indexing-zh feature

* fix can not build components/utils after enabled indexing-zh feature

error[E0252]: the name `Deserialize` is defined multiple times
 --> components/utils/src/de.rs:2:5
  |
1 | use serde::{Deserialize, Deserializer};
  |             ----------- previous import of the macro `Deserialize` here
2 | use serde_derive::Deserialize;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^ `Deserialize` reimported here
  |
  = note: `Deserialize` must be defined only once in the macro namespace of this module
2021-04-19 10:33:12 +02:00
Vincent Prouillet d3caa56da2 Nest translations in languages options 2021-04-07 22:13:15 +02:00
Vincent Prouillet 975800eb5b Enforce unic valid language codes 2021-04-07 22:13:15 +02:00
Vincent Prouillet 341ac3bfbd
Southerntofu bugfix index translations (#1417)
* Translations are also generated for the index page (fix #1332)

* More tests for translations

* Even better error message

* Update page count for test

* Patch to fix Windows tests

By @mtolk

Co-authored-by: southerntofu <southerntofu@thunix.net>
2021-03-22 20:56:11 +01:00
Marco Tolk 5964fc192c
fixes #1401 (#1404)
Co-authored-by: Marco Tolk <marco@marcotolk.com>
2021-03-11 19:47:42 +01:00
Philip Kristoffersen 8eac5a5994
WebP support in resize_image (#1360)
* Removing unused webpl

* Adding clarification comment

* Updating documentation

* Adding webp
2021-02-18 22:30:10 +01:00
Matt Riggott a65a2d52c7
Update minify-html dependency to version 0.4.2 (#1340)
* Update minify-html dependency to version 0.4.2

Fixes https://github.com/getzola/zola/issues/1300. See also https://github.com/wilsonzlin/minify-html/issues/21

* Update minify-html dependency in Cargo.lock

* Add test to check pre whitespace isn't collapsed
2021-02-06 16:41:10 +01:00
Vincent Prouillet 8e6c3f4fef Update changelog + deps 2021-02-02 20:25:27 +01:00
David James 92b5b4b3a5
Add sort_by title (#1315)
* Add sort_by=title

* Remove old comment.

* Remove println! debugging

* Minor: text spacing

* Use lexical_sort crate for sort_by title

Co-authored-by: David James <davidcjames@gmail.com>
2021-01-20 15:35:25 +01:00
Vincent Prouillet 96fb798a4a Update test-case 2021-01-17 09:41:33 +01:00
southerntofu 347208f24e serve command respects mime types (closes #1308) 2021-01-15 21:36:07 +01:00
Vincent Prouillet 108986ba6b Next version 2021-01-13 09:26:14 +01:00
Vincent Prouillet 819cfc8ec2 Cargo update 2021-01-09 10:16:50 +01:00
Vincent Prouillet ccad454922 Percent decode paths on zola serve 2021-01-07 19:16:31 +01:00
Vincent Prouillet 1a36c20bd2 Fix html minification
Closes #1292
2021-01-07 19:04:17 +01:00
Vincent Prouillet 877f441422 Update reqwest 2021-01-05 22:11:15 +01:00
Vincent Prouillet c4260e091d Update hyper
Not by me: https://github.com/getzola/zola/pull/1246
Can't be arsed to figure out the issue I had with cherry-picking
the commit and submodules.
Originally merged on master by mistake
2021-01-05 22:06:55 +01:00
Aidiakapi 358446a65f
Escape path for live reload. Fix #1247. (#1266)
zola serve's live reload feature used to fail on Windows due to the path
separator (`\`) to not being escaped.
2020-12-23 10:37:05 +01:00
Vincent Prouillet cc3e4f9133 Update changelog + deps 2020-12-14 20:45:32 +01:00
Kevin Ottens 4754cb5792 Yaml frontmatter (#990)
* Accept dates presented as strings

Still, if we find a string we involve the TOML parser to make sure the
content of said string would be a correct TOML date. In a pure TOML
world this isn't exactly relevant, but this will come in handy when
using a YAML deserializer.

Signed-off-by: Kevin Ottens <ervin@ipsquad.net>

* Add serde_yaml and test-case dependencies

This will be necessary for the YAML frontmatter handling and
corresponding unit tests.

Signed-off-by: Kevin Ottens <ervin@ipsquad.net>

* Add YAML front matter handling

Signed-off-by: Kevin Ottens <ervin@ipsquad.net>

* Switch RawFrontMatter enum to wrap &str instead of String

Signed-off-by: Kevin Ottens <ervin@ipsquad.net>

* Update the documentation to mention YAML frontmatter

This is just a light update on purpose. There would be no point in
pushing YAML too much, this is mainly here to help people with a backlog
of posts to transition.

Signed-off-by: Kevin Ottens <ervin@ipsquad.net>
2020-12-14 20:43:31 +01:00
Vincent Prouillet f20c52b872 Re-use markdown parser for markdown filter 2020-12-14 20:43:31 +01:00
Vincent Prouillet 94634fe87d Move markdown config to its own section in config.toml 2020-12-14 20:43:31 +01:00
Renato Caldas 2673466998 Add bibtex support to load_data() (#1190)
* Add support for loading Bibtex data.

* Add load_data() documentation for the bibtex format

* Force bibtex tags to be lower case.

Bibtex tags are case-insensitive, and this works around tera's case-sensitiveness.

* Improve the load_data() documentation for the bibtex format
2020-12-14 20:43:31 +01:00
Vincent Prouillet 92282608fe Update changelog 2020-12-14 20:43:31 +01:00
Dark Kirb 361d4d65ab Run cargo update (#1235)
This updates `filetime` to the latest version and fixes #1234

Co-authored-by: Charlotte D <darkkirb@darkkirb.de>
2020-12-14 20:43:31 +01:00
Vladislav Nikonov b1091bbb45 Implemented emoji aliases support in markdown files (#1194)
* Implemented emoji aliases support in markdown files

* Added emoji aliases rendering unit tests

* Added bench for emoji
2020-12-14 20:43:31 +01:00
Vincent Prouillet a26422d401 Update changelog 2020-12-14 20:43:31 +01:00
Sam Vente c40fb91ba8 Make sections draftable (#1218)
* make sections draftable

* add documentation paragraph about drafting sections
2020-12-14 20:43:31 +01:00
Vincent Prouillet 5233cc9585 Next version 2020-12-14 20:42:55 +01:00
Vincent Prouillet 94c016521c Fix zola serve 2020-09-28 09:36:16 +02:00
Vincent Prouillet 0230e3297f Next version 2020-09-27 14:15:44 +02:00