Template Engine

SUI Template Engine, a new feature in Yao v0.10.4, is AI-friendly and streamlines web page creation and data integration. It supports backward compatibility, enabling developers to use HTML, CSS, and TypeScript/JavaScript while promoting code reusability with a component-based architecture.

Note: SUI is a new feature and still experimental. For advanced frontend requirements, consider using frameworks like React or Vue. Place the built files in the public directory and connect them to Yao via REST API.

Table of Contents

šŸ‘‰ Template Engine Reference

SectionDescription
OverviewAn introduction to the Template Engine and its purpose.
TemplateIntroduction to the SUI template for defining the structure of a web page.
DocumentDefining a new SUI document for displaying content.
AssetsManaging assets like images, CSS, and JavaScript files.
Global DataManaging global data for SUI templates.
PageIntroduction to the SUI page for defining the layout of a web page.
Template SyntaxThe syntax for writing SUI templates. Variables, expressions, loops, conditions, and more.
Page as a ComponentUsing components to build reusable UI elements.
Component CommunicationCommunicating between components in SUI templates.
Partial RenderingRendering a part of the SUI template instead of the whole page.
LibsuiThe fontend library for rendering SUI templates.
Event HandlingHandling events in SUI templates.
Backend ScriptWriting backend scripts for data integration.
SUI RequestMaking requests to the backend for data retrieval.
Cache ControlManaging cache for SUI templates.
I18nInternationalization and localization for SUI templates.
TailwindCSS IntegrationIntegrating Tailwind CSS for styling SUI templates.
Copyright Ā© 2025 Infinite Wisdom Software
Powered by Yao App Engine