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

Include web fonts #173

Open
ghost opened this issue Nov 7, 2019 · 1 comment
Open

Include web fonts #173

ghost opened this issue Nov 7, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 7, 2019

thanks for this great tool.
my files are locates in the root/assets folder where I have a folder called fonts (root/assets/fonts)
In my sass file, I am loading the font

@font-face {
...
src: url("../fonts/..."),
...
}

I changed the setting so the compiled files are now in root/compiled

styleSRC: './assets/style/style.scss',
styleDestination: './compiled/css/', 

but now in console I get errors

Failed to load resource: the server responded with a status of 404 (Not Found)

what is the best way to include fonts in the theme and sass file?

@sschat
Copy link

sschat commented Jun 24, 2020

i ran into this too, so i added the copy task for fonts:

`/**

  • copy the fonts to the dist
    */

gulp.task('fonts', function (done) {
return gulp.src(config.fontSRC)
.pipe(plumber({errorHandler: errorHandler}))
.pipe(gulp.dest(config.fontDST));
});
`

Add this to the tasks in the gulp files on the right places, and to the default task.
Plus make sure the css is pointing to this folder as it is in the end-directory.

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

No branches or pull requests

1 participant