Skip to content

neko-contrib/amber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Amber Render wercker status GoDoc GoCover

Amber template for Neko.

Usage

package main

import (
  "github.com/neko-contrib/amber"
  "github.com/rocwong/neko"
)
func main() {
  app := neko.Classic()
  //default: Options{BaseDir: "views", Extension: ".amber", PrettyPrint: true}
  //app.Use(amber.Renderer())
  app.Use(amber.Renderer(&amber.Options{BaseDir: "template", Extension: ".jade", PrettyPrint: true}))
  app.Run(":3000")
}

####type Options

type Options struct {
  // BaseDir represents a base directory of the amber templates.
  BaseDir string
  // Extension represents an extension of files.
  Extension string
  // Setting if pretty printing is enabled.
  // Pretty printing ensures that the output html is properly indented and in human readable form.
  // If disabled, produced HTML is compact. This might be more suitable in production environments.
  // Default: true
  PrettyPrint bool
}

Releases

No releases published

Packages

No packages published

Languages