Created
January 10, 2020 22:49
-
-
Save alexharris/2b838aac7a27bd8234c02eb209b95750 to your computer and use it in GitHub Desktop.
Notes on how to make a Wordpress theme with Tailwind CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. First, download a theme from https://underscores.me/ | |
| 2. Follow this tutorial: https://paulund.co.uk/using-tailwind-css-in-your-wordpress-theme | |
| 3. Replace the contents of webpack.mix.js with the following: | |
| ``` | |
| const mix = require('laravel-mix'); | |
| const tailwindcss = require('tailwindcss'); | |
| mix.postCss('./theme-style.css', './style.css', | |
| tailwindcss('./tailwind.config.js') | |
| ).options({ // this disables the feature of moving assets to images | |
| processCssUrls: false | |
| }); | |
| mix.browserSync('http://localhost/~alexharris/whatever/'); | |
| ``` | |
| 4. Run `npm run watch` (it might need to be run twice) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/borma425/2222press