Raspberry Pi First Steps on Github Pages
During this month, have decided to create a more detailed guide on Github Pages on how to get started with a Raspberry Pi.
I will use this content as a personal wiki, so whenever I find some block that requires some effort to find out on the internet, will make a concise guide right here: https://jalcocert.github.io/RPi/
So this is kind of website project + IoT and Linux with a Raspberry Pi kind of thing.
Jekyll uses Ruby language.
And thanks to the community, there are Themes that you can use completely free.
So: Free Theme, Free Hosting, Free Github(sub)domain…Let’s create something interesting with it.
Ruby + jekyll + Chirpy Setup 📌
There are two ways!
- Clone the starter and name it as
urusername.github.io
This will spin up GHPages & GH Action automatically and provide the theme ready for action.
- Pro way: Also with GH Pages + Actions WF
git clone https://github.com/cotes2020/jekyll-theme-chirpy && cd ./jekyll-theme-chirpy
sudo apt install ruby-full build-essential zlib1g-dev
#https://jekyllrb.com/docs/ruby-101/#gems
echo '# Install Ruby Gems to ~/.gem' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/.gem"' >> ~/.bashrc
echo 'export PATH="$HOME/.gem/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
gem update --system
gem install jekyll bundler
##ARM64 not there yet
# curl -sSL https://get.rvm.io | bash -s stable
# source ~/.rvm/scripts/rvm
# rvm install 3.1
# sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev
# rvm install 3.1 --disable-binary
See the magic of Jekyll+Chirpy at work:
#git clone https://github.com/cotes2020/jekyll-theme-chirpy && cd ./jekyll-theme-chirpy
sudo apt install -y nodejs npm #you need npm, (tried with 7.2.0)
bash tools/init.sh #initialize
bundle
bundle exec jekyll s #local server - http://127.0.0.1:4000
#bundle exec jekyll serve --host 192.168.1.100 --port 4000
The page logo (favicon) can be changed thanks to the folder assets/img
.
Another important files are _data/authors.yml
and _config.yml
baseurl: "/internetofthings"
url: "https://jalcocert.github.io"
References
- The Jekyll Theme I use - https://github.com/cotes2020/jekyll-theme-chirpy
- https://zweilosec.github.io/posts/jekyll-chirpy-github-pages-blog/
- Adding Web Analytics to Jekyll Chirpy - https://aouledissa.com/posts/Jekyll-Google-Analytics-4-Integration-With-Chirpy-Theme/
Other Interesting jekyll Themes