2026-01-24 23:53:19 +05:30
|
|
|
// Pugz - A Pug-like HTML template engine written in Zig
|
|
|
|
|
//
|
|
|
|
|
// Quick Start:
|
|
|
|
|
// const pugz = @import("pugz");
|
|
|
|
|
// const engine = pugz.ViewEngine.init(.{ .views_dir = "views" });
|
|
|
|
|
// const html = try engine.render(allocator, "index", .{ .title = "Home" });
|
|
|
|
|
|
|
|
|
|
pub const pug = @import("pug.zig");
|
2026-01-17 18:50:16 +05:30
|
|
|
pub const view_engine = @import("view_engine.zig");
|
2026-01-24 23:53:19 +05:30
|
|
|
pub const template = @import("template.zig");
|
2026-01-17 18:32:29 +05:30
|
|
|
|
2026-01-24 23:53:19 +05:30
|
|
|
// Re-export main types
|
2026-01-17 18:50:16 +05:30
|
|
|
pub const ViewEngine = view_engine.ViewEngine;
|
2026-01-24 23:53:19 +05:30
|
|
|
pub const compile = pug.compile;
|
|
|
|
|
pub const compileFile = pug.compileFile;
|
|
|
|
|
pub const render = pug.render;
|
|
|
|
|
pub const renderFile = pug.renderFile;
|
|
|
|
|
pub const CompileOptions = pug.CompileOptions;
|
|
|
|
|
pub const CompileResult = pug.CompileResult;
|
|
|
|
|
pub const CompileError = pug.CompileError;
|
|
|
|
|
|
|
|
|
|
// Convenience function for inline templates with data
|
|
|
|
|
pub const renderTemplate = template.renderWithData;
|