diff --git a/modules/wowchemy-tailwind/assets/dist/font/Inter.var.woff2 b/modules/wowchemy-tailwind/assets/dist/font/Inter.var.woff2 new file mode 100644 index 00000000..365eedc5 Binary files /dev/null and b/modules/wowchemy-tailwind/assets/dist/font/Inter.var.woff2 differ diff --git a/modules/wowchemy-tailwind/layouts/partials/site_head.html b/modules/wowchemy-tailwind/layouts/partials/site_head.html index a53bdb37..8af53f45 100644 --- a/modules/wowchemy-tailwind/layouts/partials/site_head.html +++ b/modules/wowchemy-tailwind/layouts/partials/site_head.html @@ -283,6 +283,20 @@ {{$title}} + {{/* Load font theme */}} + {{ $font_family := "Inter var" }} + {{ $font_file := "Inter.var.woff2" }} + {{ $font := resources.Get (printf "dist/font/%s" $font_file) }} + + {{/* EXTENSIBILITY HOOK: HEAD-END */}} {{/* Deprecated custom_head hook */}} {{ if templates.Exists "partials/custom_head" }} diff --git a/modules/wowchemy-tailwind/package.json b/modules/wowchemy-tailwind/package.json index 0bfd9018..50dba3a3 100644 --- a/modules/wowchemy-tailwind/package.json +++ b/modules/wowchemy-tailwind/package.json @@ -28,5 +28,6 @@ "scripts": { "build:blog": "npx tailwindcss -i ./assets/css/styles.css -o ../../starters/blog/assets/dist/wc.css --minify" }, + "browserslist": "last 2 versions", "version": "0.1.0" } diff --git a/modules/wowchemy-tailwind/tailwind.config.js b/modules/wowchemy-tailwind/tailwind.config.js index 158091b2..00e2826a 100644 --- a/modules/wowchemy-tailwind/tailwind.config.js +++ b/modules/wowchemy-tailwind/tailwind.config.js @@ -1,3 +1,5 @@ +const defaultTheme = require('tailwindcss/defaultTheme') + module.exports = { content: ['./hugo_stats.json', './layouts/**/*.html'], plugins: [ @@ -6,5 +8,12 @@ module.exports = { safelist: [ 'task-list', ], - darkMode: ['class'] + darkMode: ['class'], + theme: { + extend: { + fontFamily: { + 'sans': ['"Inter var"', ...defaultTheme.fontFamily.sans], + }, + } + } }