Commit graph

384 commits

Author SHA1 Message Date
Vincent Prouillet
c11ae6ef28
Use anyhow (#1816)
Also fixes #1783
2022-04-01 21:37:38 +02:00
Vincent Prouillet
62a0e7b1fd Update deps 2022-03-23 10:00:55 +01:00
Michael Clayton
336a2716e0
switch from chrono to time (#1790)
* switch from chrono to time

* remove some unused time features

* get utc offset before threading begins
2022-03-20 22:01:01 +01:00
Vincent Prouillet
2feda3ec61 Update deps 2022-03-04 21:36:35 +01:00
doomy
88e0624f11
Added XML support for load_data (#1769)
Co-authored-by: doomy <2640792-_doomy@users.noreply.gitlab.com>
2022-03-04 21:28:08 +01:00
Vincent Prouillet
a67370b8d8 Update pulldown_cmark 2022-03-04 00:16:48 +01:00
Vincent Prouillet
40d7208493 Refactoring rendering tests 2022-03-03 12:41:19 +01:00
liushuyu
821fa38bc1 build: include metadata in Windows binary (#1735) 2022-02-14 11:08:40 +01:00
Vincent Prouillet
ae3a8b802e Add libs subcrate (#1747)
* Add libs subcrate

* Remove last direct lazy_static usage

* Update pinned ci version

* Update deps
2022-02-14 11:08:40 +01:00
Vincent Prouillet
4bcbf2a545 Update deps 2022-02-14 11:08:40 +01:00
Marcin Puc
0f23a40e3f Update arg parsing to clap v3 (#1717)
* Update arg parsing to clap v3
2022-02-14 11:08:40 +01:00
Vincent Prouillet
502dd92cc6 Next version 2022-02-14 11:08:40 +01:00
Vincent Prouillet
c9bc0a29e4 Ready for release 2022-01-23 14:33:51 +01:00
Vincent Prouillet
a61fa3fd80 That's going to be 0.15.3 2022-01-23 14:33:51 +01:00
Phil Lord
5190b5eba5 Add heuristic checking for HTML anchors (#1716)
* Add heuristic checking for HTML anchors

Previously only anchors specified or generated in markdown could be
linked to, without complaint from the link checker. We now use a
simple heuristic check for `name` or `id` attributes.

Duplicate code has been refactored and all XML anchor checks updated
to use regex rather than substring match.

* Fix regexp and refactor
2022-01-23 14:33:51 +01:00
Vincent Prouillet
1ed1fdbee7 Ready for 0.15.2 2021-12-10 22:04:20 +01:00
Vincent Prouillet
46027ecdb7 Update version 2021-12-07 21:47:39 +01:00
Vincent Prouillet
445a95f22d Update deps 2021-12-05 11:18:04 +01:00
Vincent Prouillet
091995b444 Update deps 2021-11-23 23:24:22 +01:00
Vincent Prouillet
19125e8dd2
Back to pest (#1665) 2021-11-23 22:58:51 +01:00
Vincent Prouillet
637b00547a
Shortcodes (#1640)
* Next version

* Added tests for shortcode insertion

* Added TOC tests

* Added test for #1475 and #1355

* Basic internal / external links tests

* Added integration test

* Added pseudocode and started on logos

* Logos parsing for shortcodes

* Fixed string literal parsing

Moved string literal parsing to a new lexer in order to have greater
control of control characters which are parsed. This fixes the bug that
was present in the `string_from_quoted` function and also moves the
`QuoteType` to be in the `ArgValueToken`.

* Moved string literal logic to seperate module

* Added square bracket notation for variables

* Error handling rewritten

Remove the Result from the `fetch_shortcodes` function. Added proper
messages within the internal parsing.

* Reorganized and documented the shortcode submodule

* Added all logic for ShortcodeContext spans

* Added working insertion code for MD files

* Made functions generic over Markdown or HTML

* Add check for embedding bodies

* Structure of main function clear

* Added test for `new_with_transforms` function

* It runs!

* Added the code for handling p-ed html shortcodes

* Removed placeholders in markdown function

* Adjusted integration tests

* fetch_shortcodes now also returns a string

* Start of HTML insertion

* Kinda working everything

* Loading of shortcodes and builtins

* Fix tests

* Some missed fixes

* Tweaks + fmt

* Remove string literal handling

* Fix benches

* Grab shortcode def only once per site

* Fix benches

* Rewrite of parser

* Fix tests

* Add test for #1655

* Re-enable integration test

* Add test for #1601

* Add test for #1600

* Add test for #1500

* Add test for #1320

* Fix test on windows?

Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com>
2021-11-19 20:31:42 +01:00
Vincent Prouillet
19673f2da8 Update deps 2021-10-19 21:24:21 +02:00
acheronfail
f0b131838f
fix: crash on config change (#1616) 2021-09-11 09:31:34 +02:00
Tim Schumacher
4086b0755a
Support colocating subfolders (#1582)
* Support colocating subfolders

* Adjust tests
2021-09-04 08:23:03 +02:00
Vincent Prouillet
8e40720aca Next 2021-08-24 09:14:18 +02:00
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 9cdbf28591.

* 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