Web root

Your project’s web root is located at directory web.

File server

Your web root is the root directory of your web server.


Files with extension .tmpl are rendered. The request path of a template is the file path relative to your web root, without the file extension : .tmpl. For example, a file with path web/sample.tmpl would be requested as GET /sample.

Template syntax

Your GXML methods will be available to your web root templates as custom pipelines.


Templates in your web root are assigned the following struct type.

type Page struct {
	R *http.Request
	Session *"github.com/gorilla/sessions".Session