Template for projects using askama
  • Jinja 36.5%
  • Rust 31.3%
  • Dockerfile 22%
  • CSS 10.2%
Find a file
2026-05-28 18:26:25 +00:00
.forgejo/workflows fix: Fix permissions for ci 2026-05-28 14:23:42 -04:00
.zed chore: Save additional fixes 2026-05-26 19:03:50 -04:00
public chore: Updates for scripts repo 2026-05-27 22:36:49 -04:00
scripts@1a0e9210b8 fix: Fix submodule shenanigans 2026-05-28 14:18:49 -04:00
src fix: Finish fixing template 2026-05-27 23:11:41 -04:00
templates chore: Save additional fixes 2026-05-26 19:03:50 -04:00
.env.dev chore: Updates for scripts repo 2026-05-27 22:36:49 -04:00
.env.prod chore: Updates for scripts repo 2026-05-27 22:36:49 -04:00
.gitignore chore: Save additional fixes 2026-05-26 19:03:50 -04:00
.gitmodules fix: Fix submodule shenanigans 2026-05-28 14:18:49 -04:00
.prettierrc feat: Updated template 2026-05-26 12:41:00 -04:00
cargo-generate.toml fix: Fix duplicate key 2026-05-26 13:13:31 -04:00
Cargo.lock fix: Finish fixing template 2026-05-27 23:11:41 -04:00
Cargo.toml fix: Finish fixing template 2026-05-27 23:11:41 -04:00
docker-compose.yml fix: Finish fixing template 2026-05-27 23:11:41 -04:00
Dockerfile fix: Finish fixing template 2026-05-27 23:11:41 -04:00
LICENSE Create LICENSE 2026-05-25 15:51:37 -04:00
README.md Merge pull request 'fix: Fix submodule shenanigans' (#2) from fix-ci into main 2026-05-28 18:26:25 +00:00
rustfmt.toml feat: Updated template 2026-05-26 12:41:00 -04:00

Askama + Axum + HTMX Starter Template

A production-ready template for building websites with Askama, Axum, and HTMX.

Features

  • Askama - Type-safe, compiled Jinja-like templates
  • Axum - Modern, fast Rust web framework
  • HTMX - Dynamic HTML without JavaScript frameworks
  • TLS/HTTPS - Built-in support with axum-server and Let's Encrypt certs
  • Forgejo CI - CI workflows for clippy, tests, formatting
  • Zed Editor config - Formatter integrations for TOML, HTML, CSS, YAML, JSON, Docker

Quick Start with cargo-generate

cargo generate --git ssh://git@git.ohcooltools.dev/Ohcool-Media/askama-template.git

This will create a new project from the template. Follow the prompts to name your project.

Manual Setup

  1. Clone this repository
  2. Rename the project in Cargo.toml

Development

Run the server (HTTPS on 2040):

cargo run

Project Structure

.
├── Cargo.toml
├── cargo-generate.toml       # cargo-generate config
├── rustfmt.toml              # Rust formatting config
├── .prettierrc               # Prettier config for templates
├── .gitignore
├── .forgejo/
│   └── workflows/            # CI workflows
├── .zed/
│   └── settings.json         # Zed editor config
├── scripts/                  # Formatting/utility scripts
├── public/
│   └── style.css             # Your stylesheets
├── src/
│   └── main.rs               # Server entry point
└── templates/
    ├── base.html             # Base layout
    ├── header.html           # Site header (included)
    ├── footer.html           # Site footer (included)
    ├── index.html            # Home page
    └── about.html            # About page

Deploying

  1. Run the binary or use Docker

Customization

  • Add templates in templates/
  • Add Askama template structs in src/main.rs
  • Add routes with Router::new().route(...)
  • Add static assets in public/

License

MIT