Skip to content

Commit

Permalink
Adjust README, bump Hugo version
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed May 23, 2023
1 parent d0981df commit f0ae373
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hugo-starter-tailwind-basic
# Hugo Basic Starter for TailwindCSS v3.x

[![Netlify Status](https://api.netlify.com/api/v1/badges/5a510ba1-96b4-4834-9a07-913dce4b5061/deploy-status)](https://app.netlify.com/sites/lucid-nightingale-60a4e2/deploys)

Expand All @@ -18,18 +18,41 @@ hugo server

## As a Theme

Import `github.com/bep/hugo-starter-tailwind-basic/v2` (use `github.com/bep/hugo-starter-tailwind-basic` if you want/need Tailwind 1.x.) into your project, and then run:
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:

```bash
hugo mod npm pack
npm install
```

You need to add this to your `config.toml` (the stats are used by the CSS purging):
You need to add (something like) this to your `hugo.toml`:

```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
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.
2 changes: 1 addition & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ disableKinds = ["page", "section", "taxonomy", "term"]
[module]
[module.hugoVersion]
extended = false
min = "0.111.0"
min = "0.112.0"
[[module.mounts]]
source = "assets"
target = "assets"
Expand Down
6 changes: 3 additions & 3 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ publish = "public"
command = "hugo --gc --minify -d public;"

[context.production.environment]
HUGO_VERSION = "0.79.1"
HUGO_VERSION = "0.112.0"

[context.branch-deploy]
command = "hugo --minify --gc -d public -b $DEPLOY_PRIME_URL"

[context.branch-deploy.environment]
HUGO_VERSION = "0.79.1"
HUGO_VERSION = "0.112.0"

[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.deploy-preview.environment]
HUGO_VERSION = "0.79.1"
HUGO_VERSION = "0.112.0"

[[headers]]
for = "/*.jpg"
Expand Down

0 comments on commit f0ae373

Please sign in to comment.