Rust Compiled Templates with static-file handling
Released 2023-07-22.
W: &mut Write
to just W: Write
(PR #125). Thanks @kornelski!MULTI_WORD_CONSTANTS
in templates (Issue #129, PR #130). Thanks @wezm!_
, and if the file name starts with a number it is prefixed with n
(Issue #82, PR #132). Thanks @Aedius for reporting!rsass
to 0.28.0 and itertools
to 0.11.0.Released 2023-01-28
Released 2023-01-22.
page.rs.html
resulted in a rust function templates::page(...)
.
In 0.7.2, that was changed to templates::page_html(...)
and the old name was kept as a deprecated alias.
However, since the template functions are usually defined within the same crate that defines them, the deprecation warning has usually not been shown, and this removal may still be a surprise to some users (it was even used in examples up to this change).StaticFiles
now supports method chaining, by returning Result<&mut Self>
, making typical build scripts nicer (PR #115).Thanks to @JojiiOfficial for reporting #106.
2021-06-25.
else if
after an @if
block in templates. PR #104, fixes #81.}
in doc example. PR #102.Thanks @bearfrieze for #102 and @Aunmag for #81.
Tested with rustc 1.53.0, 1.48.0, 1.46.0, 1.44.1, 1.54.0-beta.1 and 1.55.0-nightly (7c3872e6b 2021-06-24).
Thanks to @ibraheemdev for PR #100.
Tested with rustc 1.50.0 (cb75ad5db 2021-02-10), 1.48.0 (7eac88abb 2020-11-16), 1.46.0 (04488afe3 2020-08-24), 1.44.1 (c7087fe00 2020-06-17), 1.51.0-beta.6 (6a1835ad7 2021-03-12), 1.52.0-nightly (acca81892 2021-03-13)
StaticFiles::add_files_as
for empty to
argument and add some more documentation for it. Fixes issue #96.Tested with rustc 1.47.0 (18bf6b4f0 2020-10-07), 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.48.0-beta.8 (121901459 2020-11-08), and 1.50.0-nightly (98d66340d 2020-11-14)
for
loop.std::ascii::escape_default
.ToHtml::to_buffer()
Thanks to @Aunmag and @prabirshrestha for reported issues and contributed code.
Tested with rustc 1.45.2 (d3fb005a3 2020-07-31), 1.42.0 (b8cedc004 2020-03-09), 1.42.0 (b8cedc004 2020-03-09), 1.46.0-beta.4 (32c481e15 2020-08-09), and 1.47.0-nightly (81dc88f88 2020-08-13).
@match
parsing.