In an ideal scenario, your Github served website could be build locally, with the same output structure and layout.
However, you need to install a local version of the theme first & get this to be compiled by Jekyll. The Github page has some more information (but see OS X comment below).
The sudo
in the following commands may not be tequired, depending on your setup.
sudo gem install jekyll bundler rouge
sudo gem install github-pages
Change to your site’s source directory, and then:
bundle install
… to install the specific components.
From this site directory, you issue:
bundle exec jekyll build
… to generate the html file structure, or
bundle exec jekyll serve --incremental
… to run a server. Which should then answer with (more stuff) and
Server address: http://127.0.0.1:4000
baseurl
parameter in your _config.yml
(e.g. the name og the repository you are running the site from), you will have to specify an empty baseurl
when starting your localhost test server:
bundle exec jekyll serve --baseurl "" --incremental
brew uninstall --ignore-dependencies --force xz
sudo gem install github-pages
brew install xz
listen
lead to failing execution under Ruby 3. This has been fixed in the latest versions of listen
, but you have to update this directly via bundle update
or bundle update listen
.Please see the Jekyll documentation for more options (e.g. how to generate your site into a specific target directory).