Skip to content

stanislas-m/pongo2buffalo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ec36c80 · Mar 8, 2018

History

4 Commits
Mar 8, 2018
Mar 8, 2018
Nov 15, 2017
Nov 15, 2017

Repository files navigation

Pongo2Buffalo

Build Status

An adapter to use Pongo2 with Buffalo.

Usage

Configure the adapter to replace Plush for html files, in the render.go file:

package actions

import (
	"github.com/gobuffalo/buffalo/render"
	"github.com/gobuffalo/packr"
	"github.com/stanislas-m/pongo2buffalo"
)

var r *render.Engine
var assetsBox = packr.NewBox("../public/assets")

func init() {
	r = render.New(render.Options{
		TemplateEngines: map[string]render.TemplateEngine{
			"html": pongo2.BuffaloRenderer,
		},

		// HTML layout to be used for all HTML requests:
		HTMLLayout: "application.html",

		// Box containing all of the templates:
		TemplatesBox: packr.NewBox("../templates"),
		AssetsBox:    assetsBox,

		// Add template helpers here:
		Helpers: render.Helpers{},
	})
}

About

An adapter to use Pongo2 with Buffalo

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages