Menu icon Foundation
Foundation not picking up YML file

I've set up a YML file in the src/data so I can call in images using a shortcut, like this:

<img src="{{ img-url.headers }}2018-tr-canada.png" class="align-image-center" alt="Total Rewards Canada" />

It works on my machine just fine. I am setting up a member of my team with Foundation for Email for the first time. I am migrating my settings over to his machine. When we run foundation build on the new machine, it isn't displaying images in the files. It isn't picking up the image's path from the YML file. Do I need to change a setting somewhere or add a line of code to the babel file to tell Foundation to look for the YML file?

Foundation for Emailymldataimages

I've set up a YML file in the src/data so I can call in images using a shortcut, like this:

<img src="{{ img-url.headers }}2018-tr-canada.png" class="align-image-center" alt="Total Rewards Canada" />

It works on my machine just fine. I am setting up a member of my team with Foundation for Email for the first time. I am migrating my settings over to his machine. When we run foundation build on the new machine, it isn't displaying images in the files. It isn't picking up the image's path from the YML file. Do I need to change a setting somewhere or add a line of code to the babel file to tell Foundation to look for the YML file?

Rafi Benkual over 1 year ago

The data folder is not being watched for changes by the Gulpfile though this is something you can change. If you see the bottom of the gulpfile you can see all the watch events and add one for the data folder.

Brad Shomer over 1 year ago

Thanks Rafi,

The only thing I found in the gulp file is this:

// Compile layouts, pages, and partials into flat HTML files
// Then parse using Inky templates
function pages() {
  return gulp.src('src/pages/**/*.html')
  	.pipe(newer('dist'))
  	.pipe(newer('src/partials/**/*.html'))
    .pipe(panini({
      root: 'src/pages',
      layouts: 'src/layouts',
      partials: 'src/partials',
      data: 'src/data',      // Added the ability to use data
      helpers: 'src/helpers'
    }))
    .pipe(inky())
    .pipe(gulp.dest('dist'));
}

I added the line "data: 'src/data', and ran "foundation build" in the command line. Doesn't seem to be picking up my yml file.

Brad Shomer over 1 year ago

I discovered that the data is getting pulled into the dist file, but it wasn't showing in Browser Sync. Turned out to be a problem with MS Edge. I set Firefox as my default browser and it works!

Thanks for your help.

Sam Tusi over 1 year ago

Thanks for this awesome info....

Watch FIFA Live Online

Jhon Akash over 1 year ago

thanks for awesome information..

What is Kentucky Derby