Skip to content

Commit 7ce484f

Browse files
committed
Small updates to Tera template examples
1 parent 1ed88bd commit 7ce484f

File tree

4 files changed

+41
-8
lines changed

4 files changed

+41
-8
lines changed

examples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ information on functionality and ordering.
4040
| [Handlers](handlers) | Developing application logic that responds to web requests. | 4 |
4141
| [Middleware](middleware) | Developing custom middleware for your application. | 1 |
4242
| [Into Response](into_response) | Implementing the Gotham web framework's `IntoResponse` trait. | 1 |
43-
| [Tera Template](templating/tera) | An example using Tera template engine | 1 |
43+
| [Templating](templating) | An example using various templating engines. | 1 |
4444

4545
^ Gotham web framework examples are under active development.
4646

examples/templating/README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Templating Examples
2+
3+
A collection of crates that provide examples of working with various
4+
templating engines from with Gotham.
5+
6+
## Ordering
7+
8+
As the engines are external, there's no real order to check these examples out;
9+
feel free to view examples as they're needed.
10+
11+
- [Tera](tera) - Demonstrates the `Tera` templating engine with Gotham.
12+
13+
## Help
14+
15+
You can get help for the Gotham web framework at:
16+
17+
* [The Gotham web framework website](https://gotham.rs)
18+
* [Gotham web framework API documentation](https://docs.rs/gotham/)
19+
* [Gitter chatroom](https://gitter.im/gotham-rs/gotham)
20+
* [Twitter](https://twitter.com/gotham_rs)
21+
22+
## License
23+
24+
Licensed under your option of:
25+
26+
* [MIT License](../LICENSE-MIT)
27+
* [Apache License, Version 2.0](../LICENSE-APACHE)
28+
29+
## Community
30+
31+
The following policies guide participation in our project and our community:
32+
33+
* [Code of conduct](../../CONDUCT.md)
34+
* [Contributing](../../CONTRIBUTING.md)

examples/templating/tera/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "gotham_examples_tera_templates"
2+
name = "gotham_examples_templating_tera"
33
description = "A Tera template engine usage example application for Gotham."
44
version = "0.0.0"
55
publish = false
@@ -9,5 +9,5 @@ gotham = { path = "../../../gotham" }
99

1010
hyper = "0.11"
1111
mime = "0.3"
12-
tera = "0.11.8"
12+
tera = "0.11"
1313
lazy_static = "1.0"

examples/templating/tera/README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Tera Template
1+
# Templating using Tera
22

33
An example usage of Tera template engine working with Gotham.
44

55
## Running
66

7-
From the `examples/tera_template` directory:
7+
From the `examples/templating/tera` directory:
88

99
```
1010
Terminal 1:
1111
$ cargo run
12-
Compiling gotham_examples_tera_templates (file:///.../examples/templating/tera)
12+
Compiling gotham_examples_templating_tera (file:///.../examples/templating/tera)
1313
Finished dev [unoptimized + debuginfo] target(s) in 4.26 secs
14-
Running `../hello_world`
14+
Running `../gotham_examples_templating_tera`
1515
Listening for requests at http://127.0.0.1:7878
1616
1717
Terminal 2:
@@ -45,7 +45,6 @@ $ curl -v http://127.0.0.1:7878/
4545
</body>
4646
</html>
4747
* Connection #0 to host 127.0.0.1 left intact
48-
4948
```
5049

5150
## License

0 commit comments

Comments
 (0)