Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Separators and Relative Image Paths #2

Merged
merged 1 commit into from
Jul 29, 2016

Conversation

swyphcosmo
Copy link

On Windows, images from metalsmith show up as src/images\imagename.png. On any other system key.split('/') would work to get the file name, but not on Windows. Instead, I switched the code to use path.basename which will work independent of Windows or POSIX separators.

When picking images in src/images and a css-dest in src/css, images in the output css file are relative to src/ instead of src/css. path.relative is used to add the proper path.

…parators

* Set image url relative to the `css_dest` location instead of `build`
@Noamyoungerm Noamyoungerm merged commit 78773f0 into Noamyoungerm:master Jul 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants