askama icon indicating copy to clipboard operation
askama copied to clipboard

Add an examples directory

Open dtolnay opened this issue 7 years ago • 4 comments

It would be helpful to have a copy of the "How to get started" readme section as a fully laid out examples directory where someone could just drop in and do cargo run and see everything work.

dtolnay avatar Apr 08 '18 16:04 dtolnay

It's a good idea. I just tried it, but it appears the CARGO_MANIFEST_DIR, while compiling an example, still points to the crate root rather than the example (even though the example has its own manifest). That makes it not a very self-contained example, unfortunately...

djc avatar Apr 09 '18 08:04 djc

I put a minimal askama + rocket example here in case anyone is looking for just that: https://gitlab.com/tobias47n9e/rocket_with_askama_example (WIP)

tobias47n9e avatar Jul 24 '18 20:07 tobias47n9e

Is this still an issue? I know repos like OrbTK where you can compile examples with cargo run --example widgets --release.

Another option would be to make a repo just for askama examples or to use write examples in markdown with mdbook and render them with gh-pages.

Th3Whit3Wolf avatar Jul 13 '19 16:07 Th3Whit3Wolf

Yes, it is still an issue. A separate crate inside this repo could work, I suppose.

djc avatar Jul 19 '19 19:07 djc