--- layout: post author: Aaron title: How to create a static website with Jekyll and deploy it on GitHubPages ---

Install Git


Install Ruby


Install Jekyll and Bundler
$ gem install jekyll bundler

Create a GitHub-account
Create a repository on GitHub
(It has to be public if you use GitHub Free, note that your code will be visible to everyone!)

Clone the repository to a local directory:
SSH

$ git clone --recursive SSH_URL
HTTPS
$ git -c http.sslVerify=false clone --recursive HTTPS_URL

Create two directories: docs and localDev.

                $ mkdir docs

$ mkdir localDev
docs will contain the content of the website later on.
localDev will contain our Jekyll project.

Move to the localDev-directory:

                $ cd localDev

Create a new Jekyll-project at localDev-directory:

                $ jekyll new --skip-bundle .

(make sure you got the dot)

Open the Gemfile that Jekyll created and comment out the line which starts with gem "jekyll"
Add the github-pages gem by editing the line starting with # gem "github-pages".
Change this line (# gem "github-pages") to:
gem "github-pages", "~> GITHUB-PAGES-VERSION", group: :jekyll_plugins
You can find the actual version of GitHub-pages here
. Now save and close the Gemfile.

Now still being at the localDev-directory, install the bundle:

                $ bundle install
Optionally you can make changes at the _config.yml file.

Optionally you can create another branch called gh-pages from where GitHub Pages will take the website-files.

                $ git checkout -b gh-pages

Follow instructions on: https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll
Deploy: https://jekyllrb.com/docs/step-by-step/10-deployment/
JEKYLL_ENV=production bundle exec jekyll build https://jekyllrb.com/docs/step-by-step/01-setup/ https://jekyllrb.com/docs/structure/ https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll https://docs.github.com/en/get-started/quickstart/set-up-git https://docs.github.com/en/pages/quickstart https://github.com/WickedJack99/website/settings/pages https://wickedjack99.github.io/website/2022/09/20/jekyll_&_github.html https://nav.hs-offenburg.de/pflichtnavi/erklaerung-zur-barrierefreiheit https://duckduckgo.com/?q=german+english&t=newext&atb=v330-1&ia=web https://www.markdownguide.org/basic-syntax https://www.w3schools.com/html/default.asp https://www.w3schools.com/html/tryit.asp?filename=tryhtml_figcaption https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_section