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

feat: add support for self-hosted fonts #50

Merged
merged 4 commits into from
Dec 10, 2022
Merged

Conversation

jfgilmore
Copy link
Contributor

As per draft PR #10 basic support of self-hosted fonts based on the work of @visualfanatic & @damianstasik

Made some changes to allow for custom font dir.

Added e2e tests.

@hupe1980 Could you please give feedback?

Building on the work done by @visualfanatic fonts can now be hosted outside of the `/static` folder and will be copied across by the plugin. From my recollection this is what is suggested in the Gatsby docs. Updated README. Included the Gatsby reporter to throw a panic if file copy to `/public` fails.
Copy link
Owner

@hupe1980 hupe1980 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from one small thing it looks very good. Thx for your support

gatsby-plugin-webfonts/src/modules/selfHosted.js Outdated Show resolved Hide resolved
@jfgilmore jfgilmore marked this pull request as ready for review September 8, 2022 12:05
gatsby-plugin-webfonts/src/gatsby-node.js Outdated Show resolved Hide resolved
gatsby-plugin-webfonts/src/modules/selfHosted.js Outdated Show resolved Hide resolved
- also delete pathPrefix from `publicFolder`
Copy link
Owner

@hupe1980 hupe1980 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hupe1980 hupe1980 merged commit 542d0ad into hupe1980:master Dec 10, 2022
@axe312ger
Copy link

Nice! Thx!

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.

3 participants