Skip to content

prevuelta/jekyll-mustache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

jekyll-mustache

Site template using Jekyll & Mustache templates

How it works

Static content is handled by the jekyll templating system while dynamic content is handled via mustache views. These are handled by a page controller loaded by a var in the jekyll YAML eg.

---
layout: default
title: Welcome to this site
weight: 1
controller: homepage
---
{% if page.controller %}
	{% capture controller %}pages/{{ page.controller}}{% endcapture %}
	{{ controller | javascript }}
 {% endif %}

This will then generate / load the model and perform any pre-render functions before loading the mustache views.

Example of basic page controller:

var callback = function() {
	// Stuff to run after views are added
}

setupPage(
	[ // This is an array of views.
		{
			"template" : "message", // Mustache template used
			"data": {
				"message" : "Hello World!" // All your data goodness
			}
		}
	], callback
);

About

Site template using Jekyll & Mustache templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages