You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Themes |`light`, `glass`, `dark` — tokens in `assets/css/theme-tokens.css`; overrides in `modern-dark-theme.css` and `modern-glass-theme.css` (copied to `static/css/` on build) |
| Themes |`light`, `glass`, `dark` — tokens in `assets/css/theme-tokens.css`; overrides in `modern-dark-theme.css` and `modern-glass-theme.css` (bundled into `site.min.css` on build) |
22
22
| Icons | Phosphor Icons (CDN) |
23
23
| Deploy | GitHub Actions → GitHub Pages |
24
24
@@ -33,17 +33,15 @@ Static site for [codefrydev.in](https://codefrydev.in/) — free online tools, g
33
33
# Install JS dependencies (first time)
34
34
npm install
35
35
36
-
# Build Tailwind + theme CSS
37
-
npm run build:css
36
+
# Build CSS + start Hugo dev server (recommended)
37
+
npm run dev
38
38
39
-
# Watch CSS while editing (optional, second terminal)
40
-
npm run watch:css
41
-
42
-
# Run dev server
43
-
hugo server
39
+
# Or separately:
40
+
npm run build:css # build Tailwind + bundle → static/css/site.min.css
41
+
hugo server # start dev server (requires site.min.css to already exist)
44
42
```
45
43
46
-
Open [http://localhost:1313/](http://localhost:1313/). After changing templates or `assets/css/tailwind-input.css`, run `npm run build:css` (or use `watch:css`).
44
+
Open [http://localhost:1313/](http://localhost:1313/). Use `npm run dev` rather than `hugo server` directly — it ensures `static/css/site.min.css` is built first. After editing any file in `assets/css/`, re-run `npm run build:css` (or restart `npm run dev`). Use `watch:css` in a second terminal for live Tailwind rebuilds, then run `npm run build:css` once more to regenerate the full bundle.
47
45
48
46
Production build:
49
47
@@ -111,6 +109,8 @@ When [`data/history.yaml`](data/history.yaml) includes dates for a new year:
111
109
- Edit shared color tokens in [`assets/css/theme-tokens.css`](assets/css/theme-tokens.css).
112
110
- Edit dark-mode overrides in [`assets/css/modern-dark-theme.css`](assets/css/modern-dark-theme.css).
113
111
- Edit glass-mode overrides in [`assets/css/modern-glass-theme.css`](assets/css/modern-glass-theme.css).
112
+
- All six global CSS sources are bundled and minified into `static/css/site.min.css` by [`scripts/bundle-site-css.mjs`](scripts/bundle-site-css.mjs). Every page loads only this one file for global styles.
113
+
- Page-specific CSS (`search.css`, `ladybug.css`, `history.css`, `cfddc.css`, `cookie-consent.css`) is still loaded individually where needed.
114
114
- Always run `npm run build:css` before committing CSS-related changes (CI runs this on deploy).
0 commit comments