Skip to content

Commit 5ad5826

Browse files
Dale KunceDale Kunce
authored andcommitted
Update README with comprehensive asset building instructions
- Add detailed step-by-step explanation of what 'npm run serve' does - Include all available npm scripts with descriptions - Update environment setup with current Node.js 20+ and Ruby 3.3+ requirements - Add troubleshooting section for common development issues - Clarify difference between Browsersync (localhost:3000) and Jekyll (127.0.0.1:4000) - Improve setup instructions for version managers (nvm, rbenv) Documentation now clearly shows how to build all assets properly.
1 parent e798043 commit 5ad5826

1 file changed

Lines changed: 80 additions & 23 deletions

File tree

README.md

Lines changed: 80 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,56 +45,113 @@ If the Jeykll build is failing when parsing one of the `/app/_data/*.yml` files,
4545
### Environment
4646
To set up the development environment for this website, you'll need to install the following on your system:
4747

48-
- [Node and npm](http://nodejs.org/) (version in `.nvmrc` file - currently Node.js 20+)
49-
- Ruby and [Bundler](http://bundler.io/), preferably through something like [rvm](https://rvm.io/) (version in `.ruby-version` file)
50-
- Gulp
48+
- **Node.js and npm** (version 20+ LTS - see `.nvmrc` file)
49+
- **Ruby** (version 3.3+ - see `.ruby-version` file) and [Bundler](http://bundler.io/)
50+
- Recommended: Install via [rbenv](https://github.com/rbenv/rbenv) or [rvm](https://rvm.io/)
5151

52+
**Global dependencies:**
5253
```bash
53-
$ gem install bundler -v 2.6.9
54-
$ npm install -g gulp-cli
54+
$ gem install bundler
55+
$ npm install -g gulp-cli # Optional - npm scripts work without global gulp
5556
```
5657

57-
After these basic requirements are met, run the following commands in the website's folder:
58+
**Project setup:**
5859
```bash
59-
$ npm install
60-
$ bundle install
60+
$ npm install # Installs Node.js dependencies and automatically runs bundle install
61+
$ bundle install # Installs Ruby gems (if not already run by npm install)
6162
```
6263

63-
If you get a `jekyll-4.0.0 requires rubygems version >= 2.7.0, which is incompatible with the current version` error then try running: `gem update --system`
64+
**Version managers (recommended):**
65+
```bash
66+
# For Node.js version management
67+
$ nvm use # Uses version specified in .nvmrc
68+
69+
# For Ruby version management
70+
$ rbenv install # Installs version specified in .ruby-version
71+
$ rbenv shell # Activates the correct Ruby version
72+
```
73+
74+
If you encounter a `jekyll-4.0.0 requires rubygems version >= 2.7.0` error, try: `gem update --system`
6475

6576
### Getting started
6677

78+
To build and serve the site locally with all assets:
79+
6780
```bash
6881
$ npm run serve
69-
# or
70-
$ gulp serve
7182
```
72-
Compiles the compass files, javascripts, and launches the server making the site available at `http://localhost:3000/`
73-
The system will watch files and execute tasks whenever one of them changes.
74-
The site will automatically refresh since it is bundled with livereload.
7583

76-
### Other commands
84+
This command will:
85+
1. **Clean** previous builds
86+
2. **Clone blog posts** from the blog repository
87+
3. **Fetch events** data and helpers
88+
4. **Build Jekyll** site with both `_config.yml` and `_config-dev.yml`
89+
5. **Compile JavaScript** and process all scripts
90+
6. **Process CSS/Styles** with modern dependencies
91+
7. **Generate icons** and optimize images
92+
8. **Create downloadable materials** (zip files)
93+
9. **Copy assets** to the build directory
94+
10. **Start Browsersync** server with file watching
7795

78-
Build for production:
96+
The site will be available at:
97+
- **Primary (Browsersync)**: `http://localhost:3000` - *Recommended for development*
98+
- **Browsersync UI**: `http://localhost:3001` - Controls and sync options
99+
- **Jekyll only**: `http://127.0.0.1:4000` - Basic Jekyll server
100+
101+
The system automatically watches files and rebuilds when changes are detected. The site will auto-refresh in your browser.
102+
103+
### Manual asset building
104+
105+
If you need to run specific build steps manually:
106+
107+
**Build all assets for production:**
79108
```bash
80109
$ npm run build
81-
# or
82-
$ gulp prod
110+
# Equivalent to: gulp prod
83111
```
84112

85-
Clean the compiled site:
113+
**Clean compiled assets:**
86114
```bash
87115
$ npm run clean
88-
# or
89-
$ gulp clean
116+
# Equivalent to: gulp clean
117+
```
118+
119+
**Development build (same as serve but without server):**
120+
```bash
121+
$ npm run build:dev
122+
# Equivalent to: gulp serve (without server)
90123
```
91124

92-
Run tests and linting:
125+
### Code quality and testing
126+
127+
**Run full test suite:**
93128
```bash
94129
$ npm test
95-
$ npm run lint
130+
# Runs linting + production build to verify everything works
131+
```
132+
133+
**Lint JavaScript code:**
134+
```bash
135+
$ npm run lint # Check for issues
136+
$ npm run lint:fix # Auto-fix issues where possible
96137
```
97138

139+
### Troubleshooting
140+
141+
**Assets not loading properly:**
142+
- Make sure you ran `npm run serve` (not just Jekyll)
143+
- Check that both Gulp and Jekyll servers are running
144+
- Use `http://localhost:3000` (Browsersync) instead of `http://127.0.0.1:4000` (Jekyll only)
145+
146+
**Build failures:**
147+
- Try `npm run clean` then `npm run serve` to start fresh
148+
- Ensure Node.js 20+ and Ruby 3.3+ are installed
149+
- Check that all dependencies are up to date: `npm install && bundle install`
150+
151+
**Jekyll warnings about missing gems:**
152+
- Run `bundle install` to ensure all Ruby gems are installed
153+
- Check `.ruby-version` and use the correct Ruby version
154+
98155
## CI/CD
99156

100157
### GitHub Actions

0 commit comments

Comments
 (0)