Menu icon Foundation
F6 Sass image path dist wrong

I work with Foundation a long time and have made the move to Sass now with F6. When I install a new project on my Mac using foundation new --framework sites --template zurb all seems to be set up correctly. But, as soon as I include an image with the path "../assets/img/myimage.png" and compile with npm run build the final path in the dist folder is wrong. The structure of the dist folder is different to the src folder i.e. the folder pages, which requires "../" at the beginning of the path, is not there anymore and the final path would therefore not require "../" anymore.
Is this a bug in the setup or do I need to change something in gulpfile.js to fix this? Would not everyone run into the same issue?
Many thanks
otti

Sassimage pathdistfolder structureF66

I work with Foundation a long time and have made the move to Sass now with F6. When I install a new project on my Mac using foundation new --framework sites --template zurb all seems to be set up correctly. But, as soon as I include an image with the path "../assets/img/myimage.png" and compile with npm run build the final path in the dist folder is wrong. The structure of the dist folder is different to the src folder i.e. the folder pages, which requires "../" at the beginning of the path, is not there anymore and the final path would therefore not require "../" anymore.
Is this a bug in the setup or do I need to change something in gulpfile.js to fix this? Would not everyone run into the same issue?
Many thanks
otti

Brandon Arnold over 3 years ago

Are you saying that because the src directory has a different structure than the dist that the file path you assumed would work didn't?

We may need to specify this, but in general you should always set your paths based on their outputted files, on their src directory.

Otti Ott over 3 years ago

Thanks Brandon for your reply. I think it is not necessary to document this as one can clearly see the different file structure - a bit of documentation about Panini and the combination of default and index would help though.
I wasn't aware that I should set the paths to the output directory, but will try.