Simple barebones blog that pulls data from contentful space. Might add a /frontend into this to demonstrate mixing rust and js in the same project.
Azure Functions, Rust, Contentful
Rust dependencies
axum, askama, contentful, tokio, reqwest, serde, tower_http
https://jakke-fi-function.azurewebsites.net/
Envs
CONTENTFUL_SPACE_ID= # Your contentful space id to pull data from
CONTENTFUL_ACCESS_TOKEN= # Your contentful access token for the space
Contentful Data Model for Blogs
The parsing expects the blog posts to be in the following format:
pub struct BlogPost {
pub title: String,
pub slug: String,
pub content: String,
pub tags: Option<Vec<String>>,
}
and be typed as blogPost
in contentful. See src/posts.rs for more details.
cargo run
- See http://localhost:3000
release.sh
builds the project and copieshandler.exe
into folder root.func start
- See http://localhost:7071