Skip to content

Commit 5275784

Browse files
authored
Merge pull request #1385 from kunjee17/spin_tera
Updating Spin Hub with Tera Sample
2 parents 21356b1 + ed6c2ff commit 5275784

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

content/api/hub/sample_tera.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
title = "Tera Template Engine and Spin"
2+
template = "render_hub_content_body"
3+
date = "2024-09-17T00:00:00Z"
4+
content-type = "text/html"
5+
tags = ["rust", "templating" , "cookies"]
6+
7+
[extra]
8+
author = "kunjee17"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "Rust"
12+
created_at = "2024-09-17T00:00:00Z"
13+
last_updated = "2024-09-17T00:00:00Z"
14+
spin_version = ">=v2.0"
15+
summary = "Example of how to load templates off of the filesystem and then render them. Also, covers creating session cookies and protected routes using cookies."
16+
url = "https://github.com/kunjee17/spin_monolith"
17+
keywords = "rust, tera, cookies"
18+
19+
---
20+
21+
This is an example of using the [Tera template engine](https://keats.github.io/tera/) inside of a Fermyon Spin app. You will learn how to load templates off of the filesystem and then render them.
22+
23+
Also, you will learn how to use session cookies to have protected route and how to use `form-post` to submit data to spin route.
24+
25+
To get started, please visit the [GitHub repository](https://github.com/kunjee17/spin_monolith).

0 commit comments

Comments
 (0)