v0.1.5 #67
regisphilibert
announced in
Announcements
v0.1.5
#67
Replies: 1 comment
-
In order to start "experimenting" with Tailwind JIT, all you need to do is
styles:
- name: main
path: css/style.scss
use:
- tailwind-jit Also be aware this will produce a new |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This release mostly addresses fonts and adds an experimental "Tailwind JIT" transformation to styles.
huge/Fonts: performance optimization with
preload
and more!preload
A past mistake was to use
prefetch
in order to direct browsers to load the font files ASAP. This has been corrected by implementing apreload
setting and retiringprefetch
. Huge will no longer userel="prefetch"
for fonts "preloading". but arel="preload"
along side other proper attributes:WARNING: This for now is limited to
woff2
files as this is the most supported, most efficient format. Other file formats won't be "preloaded".Only
preload
certain fonts.It's good practice to only preload certain font files (needed above the fold, or on most of the pages), so while by default, Huge will preload every
woff2
file, users can overwrite thepreload
setting as per declaration regardless of the globalpreload
setting.@font-face
src
list order.It recently came to the attention of this project's maintainers that the browser will load the first "supported" font file from the
@font-face
declaration! So listing the font files in alphabetical order would result inwoff
being used instead of the much betterwoff2
and for projects also usingttf
, making the much heavierttf
used overwoff
orwoff2
.From now on, Huge will declare the font files in the following order:
woff2
,woff
,ttf
,svg
,eot
.huge/Styles: Tailwind JIT
This is an experimental feature based on the work of @Gioni06 detailed here. It allows Hugo users to upgrade to Tailwind 3 pending resolution of gohugoio/hugo#8343
It introduced a new transformation called
tailwind-jit
for use in theuse
array of a registered style.This won't be documented while it's experimental but you should know using this will generate a new resource in your
resource/_gen
directory every time you save. It's perfectly fine if like many your whole resource folder is ignored by git, but be aware and use it at your own risk.What's Changed
preload
, retireprefetch
by @regisphilibert in Fonts: Fine tunepreload
, retireprefetch
#64preload
setting by @regisphilibert in Allow per-declarationpreload
setting #66Full Changelog: v0.1.4...v0.1.5
This discussion was created from the release v0.1.5.
Beta Was this translation helpful? Give feedback.
All reactions