Troubleshooting Guide for DC916 Website
This guide addresses common issues you might encounter when working with the DC916 website and provides solutions to help you resolve them.
Table of Contents
- Installation Issues
- Build Issues
- Development Issues
- Content Issues
- Deployment Issues
- Browser Compatibility Issues
- Performance Issues
- Getting Help
Installation Issues
Ruby Version Problems
Issue: Jekyll requires Ruby version 2.5.0 or higher, but you have an older version.
Solution:
- Check your Ruby version:
ruby -v - If outdated, install a newer version:
- Windows: Download from RubyInstaller
- macOS:
brew install ruby - Linux:
sudo apt-get install ruby-fullor equivalent
Bundler Installation Fails
Issue: Error when installing Bundler.
Solution:
- Try installing with sudo (Unix-based systems):
sudo gem install bundler - If that fails, try:
gem install bundler --user-install
Dependency Installation Errors
Issue: bundle install fails with dependency errors.
Solution:
- Update RubyGems:
gem update --system - Clear Bundler cache:
bundle clean --force - Try installing again:
bundle install
SSL Certificate Errors
Issue: SSL certificate verification errors when installing gems.
Solution:
gem sources -r https://rubygems.org/
gem sources -a http://rubygems.org/
Build Issues
Jekyll Build Fails
Issue: jekyll build or bundle exec jekyll build fails.
Solution:
- Check for syntax errors in your Markdown or Liquid templates
- Look for missing front matter in content files
- Try running with verbose output:
bundle exec jekyll build --verbose
SCSS Compilation Errors
Issue: SCSS compilation fails during build.
Solution:
- Check for syntax errors in your SCSS files
- Ensure all variables are defined before use
- Try running with verbose output:
bundle exec jekyll build --verbose
Missing Dependencies
Issue: Build fails due to missing dependencies.
Solution:
- Ensure all required gems are in your Gemfile
- Run
bundle installto install missing dependencies - If using plugins, ensure they’re listed in
_config.yml
Development Issues
Local Server Won’t Start
Issue: jekyll serve or bundle exec jekyll serve fails to start.
Solution:
- Check if another process is using port 4000:
lsof -i :4000 # Unix-based systems - Kill the process or use a different port:
bundle exec jekyll serve --port 4001
Changes Not Reflecting
Issue: Changes to files aren’t showing up in the browser.
Solution:
- Ensure you’re saving the files
- Try hard-refreshing your browser (Ctrl+F5 or Cmd+Shift+R)
- Restart the Jekyll server
- Use the
--livereloadoption:bundle exec jekyll serve --livereload
JavaScript Errors
Issue: JavaScript functionality isn’t working.
Solution:
- Check the browser console for errors
- Ensure scripts are properly included in the layout
- Verify that scripts are executed after the DOM is loaded
- Check for syntax errors in your JavaScript files
Content Issues
Markdown Not Rendering Correctly
Issue: Markdown content isn’t rendering as expected.
Solution:
- Ensure proper spacing in your Markdown
- Check for missing or incorrect front matter
- Validate your Markdown with a linter
- Ensure you’re using the correct Markdown syntax for Jekyll
Front Matter Problems
Issue: Front matter isn’t being processed correctly.
Solution:
- Ensure front matter is at the very top of the file
- Check for proper YAML syntax (indentation, colons, etc.)
- Ensure the front matter is enclosed by triple dashes (
---) - Validate your YAML with a linter
Images Not Displaying
Issue: Images aren’t showing up on the site.
Solution:
- Check file paths (case-sensitive)
- Ensure images are in the correct directory
- Use relative paths from the root of the site
- Check image file formats and sizes
Deployment Issues
GitHub Pages Build Failures
Issue: GitHub Pages fails to build your site.
Solution:
- Check the build logs in the GitHub repository settings
- Ensure your repository is properly configured for GitHub Pages
- Verify that your Jekyll configuration is compatible with GitHub Pages
- Use our local build and deploy strategy with the
deploy.shscript:./deploy.shThis script builds the site locally and pushes the built files to the main branch, bypassing GitHub Pages’ built-in Jekyll processing.
Plugin Compatibility Issues
Issue: GitHub Pages doesn’t support certain Jekyll plugins that you want to use.
Solution:
- Use our local build and deploy strategy with the
deploy.shscript - This approach allows you to use any Jekyll plugin, not just those supported by GitHub Pages
- The key insight is that GitHub Pages will serve static HTML files without trying to build them if they’re already in the repository
- Our deployment strategy takes advantage of this by building the site locally and pushing the built files to the main branch
Custom Domain Issues
Issue: Custom domain isn’t working with GitHub Pages.
Solution:
- Ensure your CNAME file is in the root directory
- Verify DNS settings with your domain provider
- Wait for DNS propagation (can take up to 48 hours)
- Check HTTPS settings in the GitHub repository settings
Broken Links After Deployment
Issue: Links that worked locally are broken after deployment.
Solution:
- Check for hardcoded URLs that should be relative
- Ensure
baseurlis properly configured in_config.yml - Use `` prefix for internal links
- Test with the
--baseurloption locally:bundle exec jekyll serve --baseurl '/Cybersecurity-Sacramento'
Browser Compatibility Issues
CSS Rendering Differences
Issue: Site looks different in different browsers.
Solution:
- Use a CSS reset or normalize.css
- Test in multiple browsers during development
- Use vendor prefixes for experimental CSS properties
- Consider using autoprefixer
JavaScript Compatibility
Issue: JavaScript works in some browsers but not others.
Solution:
- Use modern JavaScript features with caution
- Consider using Babel for transpiling
- Test in multiple browsers
- Use feature detection instead of browser detection
Performance Issues
Slow Build Times
Issue: Jekyll builds are taking too long.
Solution:
- Use incremental builds during development:
bundle exec jekyll serve --incremental - Minimize the number of files and dependencies
- Optimize image sizes
- Consider using Jekyll’s caching options
Slow Page Load Times
Issue: Pages take too long to load in the browser.
Solution:
- Optimize image sizes and formats
- Minify CSS and JavaScript
- Reduce the number of HTTP requests
- Consider lazy-loading for non-critical resources
- Use browser developer tools to identify bottlenecks
Getting Help
If you encounter issues not covered in this guide:
- Check Jekyll Documentation: Jekyll Docs
- Search GitHub Issues: Look for similar issues in the repository
- Ask the Community:
- Discord: Join our Discord server
- Twitter: @DC916
- Email: info@dc916.com
- Open an Issue: If you’ve found a bug or have a feature request, open an issue on GitHub
Remember that troubleshooting is often an iterative process. Start with the simplest solution and work your way up to more complex fixes. Document any unusual solutions you find to help others who might encounter the same issues.