1
2
3
npm install
# or if using yarn:
yarn install
1
2
3
4
5
# One-time build
grunt
# Or watch for changes during development
npm run dev
1
2
3
npm run start
# or manually:
bundle exec jekyll serve
The site will be available at http://localhost:4000
The build system compiles LESS to CSS and minifies JavaScript:
less/*.less → css/*.css
hux-blog.less (expanded version)hux-blog.min.css (minified version)JavaScript Minification: js/hux-blog.js → js/hux-blog.min.js
/js/theme-toggle.js - Theme switching logic/less/theme.less - Color definitions for light/dark themes/less/material-design.less - Material Design system tokens/less/variables.less - Added Material You color tokens/less/hux-blog.less - Updated to use CSS variables/_includes/head.html - Added theme flash prevention script/_includes/nav.html - Added theme toggle button/_layouts/default.html - Included theme toggle scriptThe theme system uses CSS custom properties. Key color tokens:
1
2
3
4
5
6
7
8
9
10
:root {
--primary: /* primary brand color */
--secondary: /* secondary accent color */
--surface: /* background surface */
--on-surface: /* text on surface */
--border-color: /* borders */
--shadow-color: /* shadows */
--hover-overlay: /* hover state overlay */
/* ... and more */
}
master or gh-pages branch1
2
3
4
5
6
7
# Build all assets
grunt
# Commit and push
git add -A
git commit -m "feat: Material You theme system implementation"
git push origin master
GitHub Actions will automatically build and deploy if configured, or:
If LESS compilation fails, ensure:
.less files are syntactically correcttheme-toggle.js is loadedgrunt to rebuild CSShux-blog.min.css is referenced in head.html1
2
3
npm run dev
# Runs: grunt watch & npm run start
# Automatically rebuilds on file changes
.less files in /less/grunt watch automatically compiles to /css//js/ (except .min.js files)grunt watch automatically minifies1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
project/
├── less/
│ ├── hux-blog.less (main stylesheet)
│ ├── theme.less (color definitions) NEW
│ ├── material-design.less (design system) NEW
│ ├── variables.less (color tokens) MODIFIED
│ ├── mixins.less
│ └── ...
├── css/
│ ├── hux-blog.css (compiled, expanded)
│ └── hux-blog.min.css (compiled, minified)
├── js/
│ ├── hux-blog.js
│ ├── hux-blog.min.js
│ └── theme-toggle.js (theme switching) NEW
├── _includes/
│ ├── head.html (MODIFIED)
│ ├── nav.html (MODIFIED)
│ └── ...
├── _layouts/
│ ├── default.html (MODIFIED)
│ └── ...
├── Gruntfile.js
└── package.json
Edit theme colors in /less/theme.less:
.theme-light block for light mode.theme-dark block for dark modeAdd more design tokens in /less/material-design.less:
For issues with:
THEME_README.md