foundation / panini

A super simple flat file generator.
Other
592 stars 104 forks source link

Doc doesn't tell to update gulpfile when using global vars #167

Closed R4YM3 closed 2 years ago

R4YM3 commented 6 years ago

On the page and section https://foundation.zurb.com/sites/docs/panini.html#custom-data is explained how to implement global vars. I followed these steps, but didn't get it to work. After some research is saw i need to update the gulp file.

from:

function pages() {
  return gulp.src(['src/pages/**/*.html', '!src/pages/archive/**/*.html'])
    .pipe(panini({
      root: 'src/pages',
      layouts: 'src/layouts',
      partials: 'src/partials',
      helpers: 'src/helpers'
    }))
    .pipe(inky())
    .pipe(gulp.dest('dist'));
}

into:

function pages() {
  return gulp.src(['src/pages/**/*.html', '!src/pages/archive/**/*.html'])
    .pipe(panini({
      root: 'src/pages',
      layouts: 'src/layouts',
      partials: 'src/partials',
      helpers: 'src/helpers',
      data: 'src/data'
    }))
    .pipe(inky())
    .pipe(gulp.dest('dist'));
}

Please add this to the docs, for other people trying to work with this.

Regards, Raymond