Skip to the content.

Jekyll Setup


install jekyll prerequisites
install_prerequisites
check prerequisites installed

# check ruby, rubygems, gcc and make installed
ruby-v
gem-v
gcc -v
g++ -v
make -v

install jekyll bundle
install_jekyll_and_bundler
create jekyll project
create_jekyll_project
run jekyll server

cd myblog directory

# generate new html pages
bundle exec jekyll build

# run in http://localhost:4000
bundle exec jekyll serve

# run in http://192.168.43.127:4000/
bundle exec jekyll serve --host 192.168.43.127 --port 4000

run_jekyll_server

install jekyll theme, use gem install github-pages
install_github_pages

Debug Local Page


install git and clone jekyll github pages repo in jekyll server

sudo apt-get install git
git clone https://github.com/ivanlevsky/ivanlevsky.github.io.git

generate gem file, use bundle init jekyll_bundle_init

upload local files to remote Jekyll Server
cd local github pages path D:\..\IdeaProjects\ivanlevsky_github_io\

sftp zelda@xxx.xxx.xxx.xxx
cd /home/zelda/Downloads/ivanlevsky.github.io
put -r ./index.md
cd /home/zelda/Downloads/ivanlevsky.github.io/doc
put -r ./doc
cd /home/zelda/Downloads/ivanlevsky.github.io/images
put -r ./images

Error Fix


run_jekyll_server_error follow this instruction: https://idratherbewriting.com/documentation-theme-jekyll/mydoc_install_jekyll_on_mac.html#githuberror

# in debian home folder
cd ~
# generate token in github develop setting/ Developer settings/Personal access tokens's page
echo "export JEKYLL_GITHUB_TOKEN=ghp_v*********WmC" > .bash_profile
# download cacert.pem file in https://curl.haxx.se/ca/cacert.pem add following text add in .bash_profile
export SSL_CERT_FILE=/home/zelda/Downloads/ivanlevsky.github.io/cacert.pem
source ~/.bash_profile
# restart jekyll server
bundle exec jekyll serve --host 192.168.43.127 --port 4000
# add this text in the top of .bash_profile
if [ -f ~/.bashrc ];then
     source .bashrc
fi

Reference:
https://github.com/jekyll/jekyll
https://jekyllrb.com/docs/installation/
https://github.com/pages-themes/cayman