Commit graph

54 commits

Author SHA1 Message Date
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
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
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
Vincent Prouillet e92e4f1003 Tweaks to load_data + update deps 2021-04-21 21:43:02 +02:00
Vincent Prouillet 8e6c3f4fef Update changelog + deps 2021-02-02 20:25:27 +01:00
Vincent Prouillet 877f441422 Update reqwest 2021-01-05 22:11:15 +01:00
Vincent Prouillet f20c52b872 Re-use markdown parser for markdown filter 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
Vincent Prouillet a26422d401 Update changelog 2020-12-14 20:43:31 +01:00
Vincent Prouillet f786783299 Update pulldown_cmark 2020-09-03 21:22:20 +02:00
Vincent Prouillet b4c5e9a34a Update changelog 2020-07-29 20:49:15 +02:00
Vincent Prouillet 9f20af1521 Update deps 2020-07-22 18:59:21 +02:00
Vincent Prouillet ade442a487 clippy + fmt + fix toml dates in extra arrays
Closes #1048
2020-06-18 21:12:46 +02:00
Matthias 5e31a32166
Add support for SVG files to get_image_metadata (Fixes #769) (#1063)
* Add support for SVG files to `get_image_metadata`

* Add support for SVG files to `get_image_metadata`

* Update documentation after adding SVG support
2020-06-18 11:36:11 +02:00
Hannu Hartikainen 36ec33f042
Change get_url(cachebust=true) to use a hash (#1032)
Cache-busting was previously done with a compile-time timestamp. Change
to the SHA-256 hash of the file to avoid refreshing unchanged files.

The implementation could be used to add a new global fn (say,
get_file_hash) for subresource integrity use, but that's for another
commit.

Fixes #519.

Co-authored-by: Vincent Prouillet <balthek@gmail.com>
2020-05-23 11:46:50 +02:00
Sven-Hendrik Haase e9b47dae59
Remove implicit dependency on openssl-sys (#1001) (#1005) 2020-04-27 09:49:05 +02:00
Vincent Prouillet 56e25132a9 Update deps + fix some misleading doc 2020-04-12 17:21:04 +02:00
Vincent Prouillet 457996046c Update deps and changelog 2020-03-12 18:44:31 +01:00
Vincent Prouillet 15a3ab1a51 One last deps update 2020-02-16 19:17:41 +01:00
Sam Ford d7bad732f1 Update reqwest to v0.10 (#892) 2020-02-02 17:48:43 -08:00
Sam Ford 11f7a6d114 Mock HTTP requests in tests (#898)
Certain tests involving HTTP requests were sometimes hanging
indefinitely, so this uses Mockito for HTTP mocking. This seemingly
resolves the issue and makes these tests more reliable.

The existing can_fail_404_links test has been renamed to
can_fail_unresolved_links, to represent what actually occurs in the
test. The can_fail_404_links test now deals with a proper 404
response.

Just to be clear, the check_site test in the site component will
still create outgoing HTTP requests (due to the URLs used in the
test_site), so this commit only uses HTTP mocking where possible.
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 8e3f1f59f6 Update Tera 2020-02-02 17:48:43 -08:00
Vincent Prouillet d624f7ec8b Update base64 2020-02-02 17:45:16 -08:00
Vincent Prouillet 243702e2c2 Update tera 2020-02-02 17:45:16 -08:00
Marcus Klaas de Vries 4fd5d3f348 Bump pulldown_cmark to version 0.6.0 (#797)
* Bump pulldown_cmark to version 0.6.0

* Rename headers to headings
2019-09-06 23:36:30 +02:00
Vincent Prouillet e74dab535d Update deps & re-render on anchor-link.html changes
Closes #719
2019-08-08 00:37:38 +02:00
Vincent Prouillet df720a5baf Update deps 2019-06-21 09:24:14 +02:00
Vincent Prouillet debb1529ce Merge branch 'next' of github.com:getzola/zola into next 2019-05-30 20:08:51 +02:00
Stuart Small 12d2576fba Fix for #632 - add ability to get asset image dimensions (#670) 2019-05-30 20:06:24 +02:00
Vincent Prouillet fae644cffe Update pulldown_cmark
Close #693
2019-05-29 20:33:36 +02:00
Vincent Prouillet 1e2dd9ce03 Update tera to v1 alpha 2019-01-23 19:20:43 +01:00
Vincent Prouillet 5caf24f06c Remove error-chain
Closes #576
2019-01-17 14:31:47 +01:00
Vincent Prouillet 56af4ca7f9 Add page_template to sections
To override all child pages

Closes #397
Tests from PR #434
2018-11-07 19:42:23 +01:00
Vincent Prouillet d524482ac1 Cargo update & some doc tweak 2018-10-30 15:07:23 +01:00
Jake Howard aad12d829f Remote data (#494) 2018-10-29 20:13:09 +01:00
Luke Frisken 1baa7750f3 CSV and TOML loading global functions (#379)
Local CSV/TOML/JSON loading Tera function
2018-10-18 17:32:30 +02:00
Vincent Prouillet cdcebaea26 Cleanup of slotmap impl
Fix #205
2018-10-05 19:46:04 +02:00
Vincent Prouillet 396d237673 Use Tera render_with_borrowed 2018-10-05 15:03:22 +02:00
Vincent Prouillet 10aba20fe5 Slotmap refactor 2018-10-03 16:29:29 +02:00
Vojtech Kral 6662014e55 Add image resizing support #225 2018-06-25 18:05:04 +02:00
Vincent Prouillet bcf42a0c10 The wonders of serde default, take 2 2018-03-20 18:42:42 +01:00
Vincent Prouillet 45fc1ee761 Release 0.3.1 2018-02-15 10:41:49 +01:00
Vincent Prouillet 11bfd7b2be Tera 0.11 has been released 2018-01-22 15:10:03 +01:00
Vincent Prouillet bfdc93f948 Cargo update 2017-12-29 19:51:22 +01:00
Vincent Prouillet 129e693521 Add default templates 2017-11-27 18:09:09 +01:00
Vincent Prouillet cfefb45913 Update to Tera 0.11 beta 2017-11-26 10:07:34 +01:00