# goofychris/art-template

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/goofychris-art-template).**

9,860 stars · 2,650 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/goofychris/art-template
- Homepage: https://goofychris.github.io/art-template/
- awesome-repositories: https://awesome-repositories.com/repository/goofychris-art-template.md

## Topics

`express` `javascript` `koa` `nodejs` `template-engine` `webpack`

## Description

art-template is a JavaScript templating engine and HTML template compiler that transforms custom syntax and script statements into optimized HTML output. It functions as a precompiled template engine that converts template source into standalone JavaScript functions to render dynamic content from data.

The engine features a template inheritance framework that organizes layouts through nesting, blocks, and inclusions to create reusable components across multiple files. It incorporates automatic output sanitization and encoding to prevent cross-site scripting attacks.

The system includes capabilities for data filter transformations, output minification, and global template caching. It also provides template error debugging to pinpoint syntax or runtime errors within template files.

## Tags

### Development Tools & Productivity

- [Template Compilation](https://awesome-repositories.com/f/development-tools-productivity/template-extensions/template-functions/template-compilation.md) — Compiles template source into executable JavaScript functions to maximize rendering performance and eliminate runtime parsing. ([source](https://github.com/goofychris/art-template/blob/master/index.d.ts))
- [Dynamic Templates](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/project-scaffolding-configuration/templating-engines/dynamic-templates.md) — Combines templates with data using custom syntax to generate dynamic HTML content. ([source](https://github.com/goofychris/art-template/blob/master/CHANGELOG.md))
- [Data Transformation](https://awesome-repositories.com/f/development-tools-productivity/data-transformation.md) — Provides a system for transforming data values using helper functions and pipe-style syntax before rendering. ([source](https://github.com/goofychris/art-template/blob/master/CHANGELOG.md))
- [AST-Based Template Parsing](https://awesome-repositories.com/f/development-tools-productivity/template-extensions/template-functions/ast-based-template-parsing.md) — Implements a configurable parser to transform custom template markers into an abstract syntax tree for processing.

### Programming Languages & Runtimes

- [Build-Time Precompilation](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/javascript-runtimes/javascript-build-engines/precompiled-template-execution/build-time-precompilation.md) — Converts template source into standalone JavaScript functions during a build step to maximize runtime speed. ([source](https://github.com/goofychris/art-template/blob/master/CHANGELOG.md))

### Security & Cryptography

- [Rendered Content Sanitization](https://awesome-repositories.com/f/security-cryptography/rendered-content-sanitization.md) — Automatically sanitizes and encodes output statements to protect web applications from cross-site scripting attacks. ([source](https://github.com/goofychris/art-template/blob/master/index.d.ts))
- [Output Escaping](https://awesome-repositories.com/f/security-cryptography/security/application-and-web/web-application/output-escaping.md) — Provides automatic output encoding to escape special characters and prevent cross-site scripting attacks.
- [XSS Protections](https://awesome-repositories.com/f/security-cryptography/xss-protections.md) — Automatically sanitizes template output to protect web applications from cross-site scripting attacks.

### Web Development

- [Block-Based Inheritance](https://awesome-repositories.com/f/web-development/content-insertion-utilities/dynamic-content-insertion/template-content-placeholders/block-based-inheritance.md) — Implements a layout system that organizes reusable components through nested blocks and template inheritance.
- [HTML Templating Engines](https://awesome-repositories.com/f/web-development/html-templating-engines.md) — Generates dynamic HTML output by processing a mix of custom template syntax and raw script statements. ([source](https://github.com/goofychris/art-template#readme))
- [Precompiled Render Engines](https://awesome-repositories.com/f/web-development/template-execution-engines/precompiled-render-engines.md) — Converts template source into standalone JavaScript functions during a build step to maximize runtime speed.
- [Template Inheritance Systems](https://awesome-repositories.com/f/web-development/template-inheritance-systems.md) — Provides a framework for organizing layouts through nesting, blocks, and inclusions of template files. ([source](https://github.com/goofychris/art-template#readme))
- [Template Layout Frameworks](https://awesome-repositories.com/f/web-development/template-layout-frameworks.md) — Provides a structure for organizing layouts using nesting, blocks, and inclusions across multiple files.
- [Frontend Performance Optimization](https://awesome-repositories.com/f/web-development/frontend-performance-optimization.md) — Optimizes frontend performance by precompiling templates and minifying the generated HTML output.
- [Template Logic](https://awesome-repositories.com/f/web-development/template-logic.md) — Defines unique markers and data filters to control how variables and logic are processed within templates.

### Part of an Awesome List

- [Layout Inheritance Workflows](https://awesome-repositories.com/f/awesome-lists/devtools/template-components/layout-inheritance-workflows.md) — Organizes complex layouts and shared components through nested blocks and included template files.

### Data & Databases

- [Template Caches](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/caching-performance/caching/template-caches.md) — Implements a shared cache for compiled templates and helper functions to avoid redundant processing during repeated renders. ([source](https://github.com/goofychris/art-template/blob/master/CHANGELOG.md))
- [Template Compilation Caches](https://awesome-repositories.com/f/data-databases/query-caching-strategies/template-compilation-caches.md) — Provides a global compilation cache to store precompiled templates and avoid redundant processing.

### DevOps & Infrastructure

- [Build-Time Compilers](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/core-build-engines/build-tooling/code-transformation-engines/build-time-compilers.md) — Converts templates into standalone JavaScript files during a build step to shift overhead from runtime to build time.
