Hack for LA's website https://www.hackforla.org
This is a standard Jekyll site hosted right here on GitHub pages.
There are a few options for developing the site locally.
This is the recommended approach to quickly getting started.
There are two pre-requisites: Docker and Docker Compose. The recommended installation method is Docker Desktop for Windows 10 64-bit, Mac, and Linux users. Users of unsupported operating systems may check out Docker Toolbox instead.
More on using Docker and the concepts of containerization:
This command starts a jekyll server locally. The server watches for changes to the source files and rebuilds and refreshes the site automatically in your browser.
docker-compose up
Now browse to http://localhost:4000
To stop and completely remove the jekyll server (i.e. the running Docker container):
(do this anytime Docker or jekyll configuration or other repository settings change)
docker-compose down
To stop the server, but not destroy it (often sufficient for day-to-day work):
docker-compose stop
Bring the same server back up later with:
docker-compose up
With ruby
and jekyll
installed locally, use the jekyll
CLI commands directly to build and serve the site:
jekyll serve
Now browse to http://localhost:4000.
Due to the difficulty of getting a consistent environment running, this method is not recommended, particularly for Windows users.
Your fork of this repository on GitHub, and your local clone of that fork, will get out of sync with this (upstream) repository from time to time.
A few git
commands is all it takes to get your local clone up to date.
Assuming you have a local clone with remotes upstream
(this repo) and origin
(your GitHub fork of this repo):
# WARNING: this will erase local pending changes!
# commit them to a different branch or use git stash
git checkout gh-pages
git fetch upstream
git reset --hard upstream/gh-pages
Creating a new branch for feature/bugfix work now results in a clean, easy merge down the line.
Now that local is up to date with upstream
, update your GitHub fork with:
git push --force origin/gh-pages