Skip to content

Commit

Permalink
fix(site): simplifying build for tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
Vheissu committed Dec 16, 2024
1 parent 6a0cf2a commit cd00832
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
- name: Install Node.js dependencies
run: npm ci

# Add Tailwind CSS build step
- name: Build Tailwind CSS
run: npm run build:tw

# New steps for Aurelia 2 build
- name: Clean Aurelia 2 directory
run: |
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"version": "1.0.0",
"description": "Aurelia documentation website",
"scripts": {
"dev": "hugo server",
"build": "hugo --minify",
"start": "concurrently npm:watch:*",
"dev": "concurrently npm:watch:*",
"build": "npm run build:tw && hugo --minify",
"watch:tw": "tailwindcss -i ./themes/aurelia-theme/assets/css/main.css -o ./themes/aurelia-theme/static/css/style.css --watch",
"watch:hugo": "hugo server",
"build:tw": "tailwindcss -i ./themes/aurelia-theme/assets/css/main.css -o ./themes/aurelia-theme/static/css/style.css --minify"
Expand Down
7 changes: 0 additions & 7 deletions postcss.config.js

This file was deleted.

8 changes: 2 additions & 6 deletions themes/aurelia-theme/layouts/partials/head/css.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{{ $styles := resources.Get "css/main.css" }}
{{ $styles = $styles | css.TailwindCSS }}

{{ if hugo.IsProduction }}
{{ $styles = $styles | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous">
<link rel="stylesheet" href="/css/style.css">
{{ else }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}">
<link rel="stylesheet" href="/css/style.css">
{{ end }}

0 comments on commit cd00832

Please sign in to comment.