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 gitgit 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.gpgsudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpgecho "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/nullsudo apt updatesudo apt install gh -ygh auth loginsudo apt-get install ruby-full build-essential zlib1g-devecho '# Install Ruby Gems to ~/gems' >> ~/.bashrcecho 'export GEM_HOME="$HOME/gems"' >> ~/.bashrcecho 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrcsource ~/.bashrcgem install jekyll bundlergit init lithiumhead.github.iocd lithiumhead.github.iomkdir docscd docsgit checkout --orphan gh-pagesgit rm -rfjekyll 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_pluginsGITHUB-PAGES-VERSION in the above line with the version number from here. (It was 228 on 2023-11-28)bundle installbundle add webrick # Solves https://github.com/github/pages-gem/issues/752git add .git commit -m 'Initial GitHub pages site with Jekyll'git remote add origin https://github.com/lithiumhead/lithiumhead.github.iogit push -u origin gh-pagesgh-pages/docslithiumhead.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 servePost Categories: jekyll-howtos