Expand description
Forge → Askama preprocessor. Used from build.rs to compile .forge.html files
into Askama-compatible .html templates.
Supports:
@if/@elseif/@else/@endif→{% if %}/{% elif %}/{% else %}/{% endif %}@foreach/@endforeach→{% for %}/{% endfor %}(withloop.index,loop.first, etc.)@extends('layout')→{% extends "layout.html" %}@section('name')/@endsection→{% block name %}/{% endblock %}@yield('name')→{% block name %}{% endblock %}@parent→{{ super() }}@include('partial')→{% include "partial.html" %}@push('stack')/@endpush→ call intoforge::stack::push@stack('stack')→ placeholder for post-render swap@vite([...])→ call intoforge::vite::render@auth/@guest/@can— sugar over@if{{ x }}→{{ x }}(Askama auto-escapes){!! x !!}→{{ x|safe }}<x-component prop="...">body</x-component>→{% call ... %}body{% endcall %}
Re-exports§
pub use compiler::compile_dir;pub use compiler::compile_file;pub use compiler::compile_source;