-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1385 from kunjee17/spin_tera
Updating Spin Hub with Tera Sample
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
title = "Tera Template Engine and Spin" | ||
template = "render_hub_content_body" | ||
date = "2024-09-17T00:00:00Z" | ||
content-type = "text/html" | ||
tags = ["rust", "templating" , "cookies"] | ||
|
||
[extra] | ||
author = "kunjee17" | ||
type = "hub_document" | ||
category = "Sample" | ||
language = "Rust" | ||
created_at = "2024-09-17T00:00:00Z" | ||
last_updated = "2024-09-17T00:00:00Z" | ||
spin_version = ">=v2.0" | ||
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." | ||
url = "https://github.com/kunjee17/spin_monolith" | ||
keywords = "rust, tera, cookies" | ||
|
||
--- | ||
|
||
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. | ||
|
||
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. | ||
|
||
To get started, please visit the [GitHub repository](https://github.com/kunjee17/spin_monolith). |