About

GoHT is a Go-based implementation of the Haml templating language. It is a code generator that takes Haml templates and generates Go code. The generated Go code can then be used to render the Haml templates into HTML.

package pages

@goht HelloWorld() {
	!!!
	%html
		%head
			%title= "Hello, World!"
		%body
			%h1= "Hello, World!"
}

Why GoHT?

GoHT was created to provide a way to use Haml templates in Go projects. Haml is a concise templating language that is straightforward to read and write. It is a great way to generate HTML without having to write a lot of boilerplate code. GoHT provides a way to use Haml templates in Go projects without having to rely on Ruby or other languages.

Features

  • Concise Syntax: Haml is a concise whitespace-based templating language that is straightforward to read and write. It is a great way to generate HTML without having to write a lot of boilerplate code.
  • Go Based: You can use Go inside Haml templates and can also call out to Go functions from Haml templates. Types and functions from Go code can be used directly in the templates.
  • Go Code Generation: GoHT generates Go code from Haml templates. The generated Go code can then be used to render the Haml templates into HTML.
  • Type-Safe: GoHT generates type-safe Go code. This means that the generated code will be checked for type errors at compile time. This can help catch errors early in the development process.