Skip to content

Commit 89c2df0

Browse files
replace postcss with tailwindcli
1 parent 24ffbc8 commit 89c2df0

File tree

8 files changed

+367
-893
lines changed

8 files changed

+367
-893
lines changed

.github/workflows/gh-pages.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
cache: 'npm'
2323
cache-dependency-path: package-lock.json
2424
registry-url: 'https://npm.pkg.github.com/'
25-
- name: Install Tools
26-
run: npm install -g postcss-cli autoprefixer
2725
- name: NPM install
2826
run: |
2927
npm config set "@skymatic:registry" https://npm.pkg.github.com/

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# Usage
44
## Requirements
55
* Hugo
6-
* NPM
7-
* postcss-cli (`npm install -g postcss-cli`)
8-
* autoprefixer (`npm install -g autoprefixer`)
96
* Fontawesome Pro `npm config set "@skymatic:registry" https://npm.pkg.github.com/ && npm config set "//npm.pkg.github.com/:_authToken" TOKEN`
107

118
## Building

assets/css/main.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* purgecss start ignore */
22
@import 'tailwindcss';
33
/* purgecss end ignore */
4-
@import './custom.css' layer(components);
5-
@import './fonts.css' layer(components);
4+
@import './custom.css';
5+
@import './fonts.css';
66
@import '@skymatic/fontawesome-pro/css/all' layer(components);
77

88
@plugin '@tailwindcss/forms';

hugo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ enableemoji = true
1414
languageName = "Deutsch"
1515
languageCode = "de_DE"
1616

17+
[build]
18+
[[build.cachebusters]]
19+
source = 'layouts/.*'
20+
target = 'css'
21+
1722
[outputs]
1823
home = ["HTML", "RSS"]
1924
section = ["HTML"]

layouts/_default/baseof.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@
5252
{{ end }}
5353
<meta name="apple-itunes-app" content="app-id=1560822163">
5454
{{ if hugo.IsServer }}
55-
{{ $css := resources.Get "css/main.css" | postCSS }}
55+
{{ $css := resources.Get "css/main.css" | css.TailwindCSS }}
5656
<link rel="stylesheet" href="{{ $css.RelPermalink }}" media="screen" />
5757
{{ else }}
58-
{{ $css := resources.Get "css/main.css" | postCSS | minify | fingerprint }}
58+
{{ $tailwindOpts := dict "minify" true }}
59+
{{ $css := resources.Get "css/main.css" | css.TailwindCSS $tailwindOpts | fingerprint }}
5960
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}" media="screen" />
6061
{{ end }}
6162
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="{{ .Site.LanguagePrefix }}/feed.xml" />

0 commit comments

Comments
 (0)