vuepress / vuepress-theme-blog

Default blog theme for VuePress.
https://vuepress-theme-blog.billyyyyy3320.com/
MIT License
211 stars 129 forks source link

fix: fonts are inaccessible (fix #40) #47

Closed billyyyyy3320 closed 4 years ago

billyyyyy3320 commented 4 years ago

Summary

Relevant PR: #43 Relevant issue: #40

Why the fonts are inaccessible?

Because our style is implemented by index.stly(ref1,ref2)

index.stly will be generated into the final CSS file in the ready phase (source code). ready is executed before creating webpack config, you can take a look at my post.

We definitely can't refer our path such as, url(/fonts/EJRVQgYoZZY2vCFuvAFbzr-_dSb_nco.woff2) because we are in the temp dir.

Leveraging webpack alias is a better approach than what I did in #43 to resolve it.

What kind of change does this PR introduce? (check at least one)