Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/filefabrik/hugo-tailwindcss-jit
Get Static Side Generator Hugo running with tailwind 2 and JIT
https://github.com/filefabrik/hugo-tailwindcss-jit
hugo tailwind tailwind-jit tailwindcss
Last synced: 1 day ago
JSON representation
Get Static Side Generator Hugo running with tailwind 2 and JIT
- Host: GitHub
- URL: https://github.com/filefabrik/hugo-tailwindcss-jit
- Owner: Filefabrik
- License: mit
- Created: 2021-05-22T11:42:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-27T12:25:38.000Z (over 3 years ago)
- Last Synced: 2024-03-29T18:28:54.845Z (11 months ago)
- Topics: hugo, tailwind, tailwind-jit, tailwindcss
- Language: HTML
- Homepage:
- Size: 54.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hugo-tailwind-jit
Get Static Side Generator Hugo running with tailwind 2 and JITnode.js: lts/fermium -> v14.17.0
hugo: hugo v0.83.1
IDE: PHPStorm 2021.1.2
My intension was to get Hugo working with tailwindcss and the new JIT compiler.
Honestly, I have saved myself a deep review of all existing possibilities.
Hugo should run with tailwindcss 2.* for development and with the new tailwind jit. No more and no less.
I had oriented myself on the following tutorial:
https://www.wimdeblauwe.com/blog/2021/01/18/using-hugo-with-tailwind-css-2/ .
Usually tailwindcss JIT compiler is needed when you work on the layout files. Possibly also in the content/*.md files. Otherwise rather not.
Application:
check out into a new folder the master-git here.
install all dependencies with
```shell
npm i -D
```start in the package.json
**devWatcherTailwindStartFirst**
then start the hugo-server
**server**open in browser
http://localhost:1313/
edit the layout-files under /layouts and, you will see the tailwind.css is not 3MB big but a few KB
for the build of the page i created an extra task "**buildTailwindAndHugo**".
Conclusion: if you don't work on the layouts you need the **devWatcherTailwindStartFirst**, then just start the server.
![ksnip_20210522-132900](https://user-images.githubusercontent.com/84433563/119225757-216e3280-bb06-11eb-903e-cd4ff937a339.png)
Hope that helps