|
1 тиждень тому | |
---|---|---|
.. | ||
.vscode | 1 тиждень тому | |
assets | 1 тиждень тому | |
content | 1 тиждень тому | |
layouts | 1 тиждень тому | |
.gitignore | 1 тиждень тому | |
LICENSE | 1 тиждень тому | |
README.md | 1 тиждень тому | |
go.mod | 1 тиждень тому | |
hugo.toml | 1 тиждень тому | |
netlify.toml | 1 тиждень тому | |
package-lock.json | 1 тиждень тому | |
package.hugo.json | 1 тиждень тому | |
package.json | 1 тиждень тому | |
postcss.config.js | 1 тиждень тому | |
tailwind.config.js | 1 тиждень тому |
A very simple starter set up with TailwindCSS and its typography plugin and a build setup using PostCSS and PurgeCSS (when running the production build).
In the preview deployment on Netlify it currently has a 100 score on both mobile and desktop on Google PageSpeed.
This setup can be used both as a starter project and a theme.
npm install
hugo server
Import github.com/bep/hugo-starter-tailwind-basic/v3
(use github.com/bep/hugo-starter-tailwind-basic/v2
if you want/need Tailwind 2.x.) into your project, and then run:
hugo mod npm pack
npm install
You need to add (something like) this to your hugo.toml
:
[module]
[module.hugoVersion]
extended = false
min = "0.112.0"
[[module.mounts]]
source = "assets"
target = "assets"
[[module.mounts]]
source = "hugo_stats.json"
target = "assets/watching/hugo_stats.json"
[build]
writeStats = true
[[build.cachebusters]]
source = "assets/watching/hugo_stats\\.json"
target = "styles\\.css"
[[build.cachebusters]]
source = "(postcss|tailwind)\\.config\\.js"
target = "css"
[[build.cachebusters]]
source = "assets/.*\\.(js|ts|jsx|tsx)"
target = "js"
[[build.cachebusters]]
source = "assets/.*\\.(.*)$"
target = "$1"
Then run your project as usual.