aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-06-30 09:52:09 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-06-30 09:52:09 +0200
commit9f96214cbed985f8c064b077672774881a258c38 (patch)
tree8c821571c4d9b8f38b83ec89dca18bc177b4f7f7 /README.md
parent435bb0569c17bd8386e6651ad0ea544978944df6 (diff)
downloadaskama-9f96214cbed985f8c064b077672774881a258c38.tar.gz
askama-9f96214cbed985f8c064b077672774881a258c38.tar.bz2
askama-9f96214cbed985f8c064b077672774881a258c38.zip
Prune duplicate documentation
Diffstat (limited to '')
-rw-r--r--README.md60
1 files changed, 2 insertions, 58 deletions
diff --git a/README.md b/README.md
index 842db3b..4007ffd 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
Askama implements a template rendering engine based on Jinja.
It generates Rust code from your templates at compile time
based on a user-defined `struct` to hold the template's context.
-See below for an example, or read [the documentation][docs].
+See below for an example, or read [the book][docs].
**"I use Askama for actix's TechEmpower benchmarks."** --
[Nikolay Kim][fafhrd91], creator of actix-web
@@ -46,11 +46,7 @@ in a for-profit context, please consider supporting my open source work on
* Opt-out HTML escaping
* Syntax customization
-### Limitations
-
-* A limited number of built-in filters have been implemented
-
-[docs]: https://docs.rs/askama
+[docs]: https://djc.github.io/askama/
[fafhrd91]: https://github.com/fafhrd91
[mitsuhiko]: http://lucumr.pocoo.org/
[issues]: https://github.com/djc/askama/issues
@@ -102,55 +98,3 @@ You should now be able to compile and run this code.
Review the [test cases] for more examples.
[test cases]: https://github.com/djc/askama/tree/master/testing
-
-
-Debugging and troubleshooting
------------------------------
-
-You can view the parse tree for a template as well as the generated code by
-changing the `template` attribute item list for the template struct:
-
-```rust
-#[derive(Template)]
-#[template(path = "hello.html", print = "all")]
-struct HelloTemplate<'a> { ... }
-```
-
-The `print` key can take one of four values:
-
-* `none` (the default value)
-* `ast` (print the parse tree)
-* `code` (print the generated code)
-* `all` (print both parse tree and code)
-
-The resulting output will be printed to `stderr` during the compilation process.
-
-The parse tree looks like this for the example template:
-
-```
-[Lit("", "Hello,", " "), Expr(WS(false, false), Var("name")),
-Lit("", "!", "\n")]
-```
-
-The generated code looks like this:
-
-```rust
-impl < 'a > ::askama::Template for HelloTemplate< 'a > {
- fn render_into(&self, writer: &mut ::std::fmt::Write) -> ::askama::Result<()> {
- write!(
- writer,
- "Hello, {expr0}!",
- expr0 = &::askama::MarkupDisplay::from(&self.name),
- )?;
- Ok(())
- }
- fn extension() -> Option<&'static str> {
- Some("html")
- }
-}
-impl < 'a > ::std::fmt::Display for HelloTemplate< 'a > {
- fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
- ::askama::Template::render_into(self, f).map_err(|_| ::std::fmt::Error {})
- }
-}
-```