Goats Html

screenshot of Goats Html

goats-html is an atribute-based template system specialized for HTML.

Overview

Goats-html is an innovative attribute-based template system tailored for HTML, taking inspiration from the Template Attribute Language (TAL). This system streamlines the process of HTML templating by pre-processing templates and translating them into Go language, which results in the generation of specific Go structs for each template. This unique approach enhances the readability and maintainability of templates, ensuring a more straightforward coding experience.

With the release of version 0.3, goats-html has undergone significant enhancements, including the ability to generate JavaScript from HTML templates and official support for Protocol Buffers. While these features offer substantial benefits, it's important for users to note the compatibility break from the previous version.

Features

  • JavaScript Generation: Version 0.3 allows users to generate JavaScript code from HTML templates, enhancing integration with client-side scripts.

  • Protocol Buffers Support: Official support for Protocol Buffers brings powerful data serialization capabilities, essential for modern web applications.

  • Stricter Syntax Rules: The introduction of the special "[pb]" specifier ensures correct handling of Protocol Buffer arguments, promoting clearer template definitions.

  • No Runtime Engine: Goats-html operates without a runtime rendering engine, allowing for faster, statically linked templates in your Go applications.

  • Readable ATL Syntax: The syntax borrowed from TAL makes templates more readable and maintainable compared to classic systems like Velocity.

  • Dual Execution Modes: The option to switch between production and development modes enables easy testing and template modifications without the need for constant server restarts.

  • Optimized Output: Generated JavaScript is designed to be compatible with Google Closure Library, allowing for obfuscation while still exposing necessary APIs for integration.

  • Developer-Friendly Features: The specially designed developer server allows immediate template modifications without the hassle of rebuilding the server, making it easier to test changes on the fly.

template
Templates & Themes

A template or theme refers to a pre-designed layout or structure that provides a basic framework for building a specific type of application or website. It typically includes good design, placeholder content and functional features, allowing developers to customize and fill in the details according to their specific needs.