trellis_relic 0.10.1 copy "trellis_relic: ^0.10.1" to clipboard
trellis_relic: ^0.10.1 copied to clipboard

Serverpod Relic integration for the Trellis template engine — response helpers, HTMX detection, and security headers.

example/example.dart

import 'package:relic/relic.dart';
import 'package:trellis/trellis.dart';
import 'package:trellis_relic/trellis_relic.dart';

Future<Response> home(Request request, Trellis engine) async {
  return renderPage(request, engine, 'index.html', {'title': 'Hello Relic'});
}

void main() {
  final engine = Trellis(loader: MapLoader({'index.html': r'<h1 tl:text="${title}">Hello</h1>'}));

  final app = RelicApp()
    ..use('/', trellisSecurityHeaders())
    ..get('/', (request) => home(request, engine));

  print(app.runtimeType);
}
0
likes
160
points
272
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Serverpod Relic integration for the Trellis template engine — response helpers, HTMX detection, and security headers.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

relic, trellis

More

Packages that depend on trellis_relic