René Kijewski
4be302338a
generator: do argument coercion for |truncate
/ |center
...
Don't simply pass any arguments to the filter. The error message won't
be useful otherwise. Also ensure that the argument is a `usize`.
2025-04-21 23:11:24 +02:00
René Kijewski
de9d6b7d0e
generator: BUILTIN_FILTERS_NEED_ALLOC
should check built-in filters
2025-04-21 23:11:24 +02:00
René Kijewski
4fe13a0053
generator: add missing lifetimes
2025-04-21 23:11:24 +02:00
René Kijewski
9f9a7dcf43
generator: remove leading _
from method names
2025-04-21 23:11:24 +02:00
René Kijewski
74cb9917a0
generator: move filters into their own file
2025-04-21 23:11:24 +02:00
René Kijewski
8fd58a0656
generator: copy expr.rs
to filter.rs
to make the next diff more readable
2025-04-21 23:11:24 +02:00
Guillaume Gomez
12db32bd2d
Merge pull request #413 from Kijewski/pr-throughput
...
Add throughput to derive benchmark
2025-04-21 11:31:26 +02:00
René Kijewski
704a33beda
Add throughput to derive benchmark
2025-04-20 23:55:03 +02:00
Guillaume Gomez
4c0398ad67
Merge pull request #407 from Kijewski/pr-book-fast-writable
...
book: add page about `FastWritable`
2025-04-20 12:40:36 +02:00
Guillaume Gomez
7cb3ac0879
Merge pull request #410 from Kijewski/pr-fix-rtd
...
Update to more current rust version on readthedocs
2025-04-20 11:45:48 +02:00
René Kijewski
72c46f452f
Update to more current rust version on readthedocs
...
Our documentation needs nightly features `doc_cfg`, `doc_auto_cfg` to
build. Instead of using the nightly channel, which is not available on
readthedocs.org, we opt in to nightly features by setting the
environment variable `RUSTC_BOOTSTRAP` to `1`. This gives on unstable
features in a stable channel.
Our dependency `proc-macro2` tests if opting-in to unstable feature is
possible, and if so, it expects that it runs on a quite recent `nightly`
release. The newest rust version that is available out-of-the-box on
readthedocs is rust 1.82, which is not *that* recent anymore, being
released on 2024-08-30.
This PR makes use of the readly configured tool `asdf` to select a more
recent rust version semi-manually.
2025-04-19 23:30:26 +02:00
René Kijewski
94fddd4df5
book: add page about FastWritable
2025-04-19 22:09:28 +02:00
René Kijewski
7881bc131b
Implement first
and blank
arguments for |indent
2025-04-17 15:07:21 +02:00
René Kijewski
ba33974996
Let |indent
use AsIndent
2025-04-17 15:07:21 +02:00
Guillaume Gomez
2c1e86e410
Merge pull request #397 from Kijewski/pr-fast-writable-values
...
Pass variables to sub-templates more reliably even if indirectly
2025-04-17 11:41:54 +02:00
René Kijewski
c6d45e1cdc
Always supply values
to custom filters
2025-04-15 17:15:47 +02:00
René Kijewski
f7fc39d138
Implement |wordcount
filter with access to runtime values
2025-04-15 13:24:19 +02:00
René Kijewski
22648acf08
book: how to access runtime values in custom filters
2025-04-15 13:24:19 +02:00
René Kijewski
20af543610
Pass values
through alloc
filters, too
2025-04-15 13:24:18 +02:00
René Kijewski
d6bf966048
Pass variables to sub-templates more reliably even if indirectly
2025-04-15 13:13:35 +02:00
Guillaume Gomez
4a17df55b5
Update variable initialization rule docs
2025-04-12 21:52:14 +02:00
Guillaume Gomez
ddfdd20855
Do not put question mark initialization expressions behind a reference
2025-04-12 21:52:14 +02:00
René Kijewski
7727d4032b
generator: move manifest_root()
call into Config::new()
2025-04-11 11:13:35 +02:00
strickczq
2437a573c7
fix #394
2025-04-11 11:13:35 +02:00
Guillaume Gomez
c76d1a2563
Describe declaration/ownership when creating a new variable
2025-04-11 07:19:59 +02:00
Guillaume Gomez
8081d717d3
If using local variable as value when creating a new variable, do not put it behind a reference
2025-04-11 07:19:59 +02:00
Guillaume Gomez
5253e7cc41
Add another example for tuple for runtime values
2025-04-10 11:16:25 +02:00
Guillaume Gomez
4af7a13cbd
Fix runtime error doc
2025-04-10 11:16:25 +02:00
Guillaume Gomez
20149db16f
Implement Values
on tuple
2025-04-10 11:16:25 +02:00
Guillaume Gomez
6e987eb50d
Merge pull request #385 from GuillaumeGomez/track-config-files
...
Track config files
2025-04-01 11:23:29 +02:00
René Kijewski
dabb537170
Add config tracking test
2025-04-01 08:33:17 +02:00
René Kijewski
8344828578
Move ConfigKey::full_config_path
into Config
2025-04-01 08:20:40 +02:00
Guillaume Gomez
d3f0947d11
Track config files
2025-03-31 22:41:49 +02:00
Guillaume Gomez
aa5e200b10
Merge pull request #384 from Kijewski/pr-derive
...
`askama_derive` accidentally exposed as a feature
2025-03-31 21:54:49 +02:00
René Kijewski
68fbf93d99
askama_derive
accidentally exposed as a feature
...
If you don't use an optional dependency at least once with `dep:…` in a
feature, it automatically, implicitly becomes a feature flag. The
`dep:` prefix was missing from `askama_derive` for the `derive` feature.
2025-03-31 21:31:56 +02:00
René Kijewski
697862a76c
Bump version number to 0.13.0
v0.13.0
2025-03-27 17:22:37 +01:00
René Kijewski
661c38cdc6
ci: fix up to #380
2025-03-23 23:52:04 +01:00
René Kijewski
35a1be81af
ci: ensure that github CI config is safe using zizmor
...
Zizmor: <https://woodruffw.github.io/zizmor/ >
2025-03-23 23:25:08 +01:00
Paolo Barbolini
1df437ec94
Fix minimum supported syn
version
2025-03-22 12:07:33 +01:00
René Kijewski
f564e724e1
Revive askama_escaped
...
We adopted `askama_escape` with the other askama crates. It was not
updated for quite some time, but still gets 25k+ downloads / day Mon to
Fri.
This PR re-adds the crate using our current HTML escaping function.
askama_escape/v0.13.0-pre.0
2025-03-21 22:45:25 +01:00
René Kijewski
d8896bcc43
Re-enable Cluster-Fuzz
in CI
2025-03-19 23:49:24 +01:00
Guillaume Gomez
bd7f4277ca
Add link to blog post explaining merge of rinja and askama
v0.13.0-pre.0
2025-03-19 22:23:45 +01:00
Guillaume Gomez
a9483c624f
Merge pull request #373 from bionicles/patch-1
...
fix toml features field in the filters chapter of the book
2025-03-19 20:49:57 +01:00
bion howard
3afa15164d
fix toml features field in the filters chapter of the book
...
the features field needs to be a list here for this code to be copypasta-ready
2025-03-19 15:37:52 -04:00
Guillaume Gomez
ff168ed038
Merge pull request #372 from Kijewski/pr-rinja-link
...
book: fix article link
2025-03-19 15:48:12 +01:00
René Kijewski
1de636fcb7
book: fix article link
2025-03-19 15:45:14 +01:00
Guillaume Gomez
6bb4b6ecc5
Merge pull request #369 from Kijewski/pr-askama_web
...
book: mention `askama_web`
2025-03-18 13:15:54 +01:00
René Kijewski
ed5776366c
book: mention [askama_web
]
...
[`askama_web`]: https://crates.io/crates/askama_web/
2025-03-18 11:51:38 +01:00
Guillaume Gomez
bd86144313
Merge pull request #370 from Kijewski/pr-0.13-pre.0
...
Bump version number to v0.13.0-pre.0
2025-03-18 10:52:54 +01:00
René Kijewski
19f6582308
Bump version number to v0.13.0-pre.0
2025-03-17 21:32:27 +01:00