-
Notifications
You must be signed in to change notification settings - Fork 0
Local Development Setup
Running the Veterans Information Resource website on your local machine is the best way to test your changes before submitting a contribution. This guide will walk you through the process.
Before you begin, ensure you have the following software installed on your system:
- Git: For cloning the repository. Download Git.
-
Ruby: The programming language Jekyll is built on. It is highly recommended to use a version manager like
rbenvorRVM. You can also download Ruby here. -
Bundler: The package manager for Ruby. You can install it by running:
gem install bundler.
-
Clone the Repository: Open your terminal and clone the project from GitHub.
git clone https://github.com/hadcomfort/hadcomfort.github.io.git
-
Navigate to the Directory:
cd hadcomfort.github.io -
Install Dependencies: Bundler will read the
Gemfileand install all the necessary gems (like Jekyll).bundle install
-
Start the Jekyll Server: Use Bundler to execute Jekyll in a way that respects the versions in the
Gemfile.lock.bundle exec jekyll serveThis command builds the site and starts a local web server. You should see output similar to this:
Configuration file: /path/to/hadcomfort.github.io/_config.yml Source: /path/to/hadcomfort.github.io Destination: /path/to/hadcomfort.github.io/_site Incremental build: disabled. Enable with --incremental Generating... done in 0.529 seconds. Auto-regeneration: enabled for '/path/to/hadcomfort.github.io' Server address: http://127.0.0.1:4000/ Server running... press ctrl-c to stop. -
View the Site: Open your web browser and navigate to
http://localhost:4000. You should see a local version of the website.
-
Dependency Errors: If
bundle installfails, ensure your Ruby version is compatible. Sometimes runningbundle updatecan resolve dependency conflicts. -
Jekyll Build Errors: Pay close attention to the terminal output when you run
bundle exec jekyll serve. It will often tell you exactly which file and line has a syntax error.