I am an Engineer based in Pune, India. These are some of my DIY & IoT projects.
This first post describes the steps I followed to setup this site. (Last Updated: 2023-11-28 01:00:00 +0530)
sudo apt install git
git config --global user.name "Anurag Chugh"
git config --global user.email "me@email.com"
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh -y
gh auth login
sudo apt-get install ruby-full build-essential zlib1g-dev
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
gem install jekyll bundler
git init lithiumhead.github.io
cd lithiumhead.github.io
mkdir docs
cd docs
git checkout --orphan gh-pages
git rm -rf
jekyll new --skip-bundle .
nano Gemfile
)#
to the beginning of the line that starts with gem "jekyll"
to comment out this line.gem "github-pages", "~> GITHUB-PAGES-VERSION", group: :jekyll_plugins
GITHUB-PAGES-VERSION
in the above line with the version number from here. (It was 228 on 2023-11-28)bundle install
bundle add webrick # Solves https://github.com/github/pages-gem/issues/752
git add .
git commit -m 'Initial GitHub pages site with Jekyll'
git remote add origin https://github.com/lithiumhead/lithiumhead.github.io
git push -u origin gh-pages
gh-pages
/docs
lithiumhead.github.io/docs/_posts/
and commit and push to gh-pages
branch.
Each markdown file needs to have certain front matter for it to be parsed properly by Jekyll.
Here are the raw content of the markdown file behind this very post:
https://github.com/lithiumhead/lithiumhead.github.io/raw/gh-pages/docs/_posts/2022-02-24-my-first-post.markdownbundle exec jekyll serve
Post Categories: jekyll-howtos