View app.js
var nunjucks = require('nunjucks')
, express = require('express')
, app = express()
, env
;
// view engine setup
app.set('views', path.join(__dirname, 'views'));
env = new nunjucks.Environment(
View gulp-browserify-task.js
//** found on this thread @ this comment: https://github.com/substack/node-browserify/issues/1044#issuecomment-72384131 **/
var through2 = require('through2');
var gulp = require('gulp');
gulp.task('browserify', function() {
gulp.src('./src/index.js')
.pipe(through2.obj(function (file, enc, next){
browserify(file.path)
.transform('stripify')
View fbog_meta.html
<meta property="fb:app_id" content="">
<meta property="og:type" content="website">
<!-- see: https://developers.facebook.com/docs/reference/opengraph/ for other types -->
<meta property="og:url" content="http://...">
<meta property="og:title" content="Your Website - Article">
<meta property="og:image" content="http://...png/jpg/etc">
<meta property="og:description" cotnent="Lorem ipsum dolor est...">
<meta property="og:site_name" content="Your Website">
View app.js
/*
* LESS-Middleware + Express
* Putting this here for now for reference later...
*
* LESS-Middleware Version 1.0.4
* Express Version Version 4.9.8
* - Caroline, 11/25/2014
*
* Dir structure...
* /sample-project
View month_select.nunjucks
/*
* For use with the nunjucks templating system
* http://mozilla.github.io/nunjucks
*
* I created a bunch of macros for quickly creating date/time fields.
* Import into your nunjucks template:
* "{% import "path/to/datefields.nunjucks" as datefields %}"
* And use...
* {{ datefields.month_select("yo_month", "M", "", "form-control") }}
*
View app.js
/*
* Nunjucks + Express
* I couldn't find anything that helped me setup the enviornment
* correctly for these in the latest vesion of Express 4 (at the time
* of writing this).
*
* This Gist for those that want to keep using Nunjucks with Express 4.
* This also goes over working with a Nunjucks environment to use custom
* filters, extensions, etc.
*