Documentation ¶
Overview ¶
Jade.go - template engine. Package implements Jade-lang templates for generating Go html/template output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Pretty print if true PrettyOutput = true // Output indent strring for pretty print OutputIndent = " " // Tabulation size of parse file TabSize = 4 // Left go-template delim LeftDelim = "{{" // Right go-template delim RightDelim = "}}" )
Functions ¶
func Parse ¶
Parse parses the template definition string to construct a representation of the template for execution.
Trivial usage:
package main import ( "fmt" "github.com/alphayan/jade" ) func main() { tpl, err := jade.Parse("tpl_name", "doctype 5: html: body: p Hello world!") if err != nil { fmt.Printf("Parse error: %v", err) return } fmt.Printf( "Output:\n\n%s", tpl ) }
Output:
<!DOCTYPE html> <html> <body> <p>Hello world!</p> </body> </html>
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.