Skip to content

Commit

Permalink
My second post on GitHub Pages
Browse files Browse the repository at this point in the history
Instructions on cloning your existing repo and recreating the environment
on an Ubuntu Computer
  • Loading branch information
lithiumhead committed Nov 27, 2023
1 parent b5fac0e commit d668d45
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 81 deletions.
4 changes: 3 additions & 1 deletion docs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source "https://rubygems.org"
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
#gem "jekyll", "~> 4.2.1"
gem "github-pages", "~> 223", group: :jekyll_plugins
gem "github-pages", "~> 228", group: :jekyll_plugins
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
Expand All @@ -29,3 +29,5 @@ end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]


gem "webrick", "~> 1.8"
148 changes: 68 additions & 80 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,63 +1,53 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.4.6)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.2.0)
bigdecimal (3.1.4)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.9)
dnsruby (1.61.9)
simpleidn (~> 0.1)
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
dnsruby (1.70.0)
simpleidn (~> 0.2.1)
drb (2.2.0)
ruby2_keywords
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.15.0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.8.1)
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
execjs (2.9.1)
faraday (2.7.12)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.15.5)
faraday-net_http (3.0.2)
ffi (1.16.3)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (223)
github-pages (228)
github-pages-health-check (= 1.17.9)
jekyll (= 3.9.0)
jekyll (= 3.9.3)
jekyll-avatar (= 0.7.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.6)
jekyll-commonmark-ghpages (= 0.4.0)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.15.1)
jekyll-gist (= 1.5.0)
Expand All @@ -71,7 +61,7 @@ GEM
jekyll-relative-links (= 0.6.1)
jekyll-remote-theme (= 0.4.3)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.7.1)
jekyll-seo-tag (= 2.8.0)
jekyll-sitemap (= 1.4.0)
jekyll-swiss (= 1.0.0)
jekyll-theme-architect (= 0.2.0)
Expand All @@ -89,12 +79,12 @@ GEM
jekyll-theme-time-machine (= 0.2.0)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.12.0)
kramdown (= 2.3.1)
kramdown (= 2.3.2)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.3)
liquid (= 4.0.4)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.12.5, < 2.0)
nokogiri (>= 1.13.6, < 2.0)
rouge (= 3.26.0)
terminal-table (~> 1.4)
github-pages-health-check (1.17.9)
Expand All @@ -103,17 +93,17 @@ GEM
octokit (~> 4.0)
public_suffix (>= 3.0, < 5.0)
typhoeus (~> 1.3)
html-pipeline (2.14.0)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (0.9.5)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (3.9.0)
jekyll (3.9.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (>= 1.17, < 3)
Expand All @@ -127,13 +117,13 @@ GEM
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
jekyll-commonmark (1.3.1)
commonmarker (~> 0.14)
jekyll (>= 3.7, < 5.0)
jekyll-commonmark-ghpages (0.1.6)
commonmarker (~> 0.17.6)
jekyll-commonmark (~> 1.2)
rouge (>= 2.0, < 4.0)
jekyll-commonmark (1.4.0)
commonmarker (~> 0.22)
jekyll-commonmark-ghpages (0.4.0)
commonmarker (~> 0.23.7)
jekyll (~> 3.9.0)
jekyll-commonmark (~> 1.4.0)
rouge (>= 2.0, < 5.0)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.15.1)
Expand Down Expand Up @@ -164,7 +154,7 @@ GEM
rubyzip (>= 1.3.0, < 3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.7.1)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
Expand Down Expand Up @@ -217,37 +207,35 @@ GEM
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (2.3.1)
kramdown (2.3.2)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.15.0)
multipart-post (2.1.1)
nokogiri (1.13.3-x86_64-linux)
minitest (5.20.0)
mutex_m (0.2.0)
nokogiri (1.15.5-x86_64-linux)
racc (~> 1.4)
octokit (4.22.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
racc (1.6.0)
rb-fsevent (0.11.1)
public_suffix (4.0.7)
racc (1.7.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rexml (3.2.6)
rouge (3.26.0)
ruby-enum (0.9.0)
i18n
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
safe_yaml (1.0.5)
Expand All @@ -256,34 +244,34 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.2)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
faraday (>= 0.17.3, < 3)
simpleidn (0.2.1)
unf (~> 0.1.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (1.4.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8)
unf_ext (0.0.9.1)
unicode-display_width (1.8.0)
zeitwerk (2.5.4)
webrick (1.8.1)

PLATFORMS
x86_64-linux

DEPENDENCIES
github-pages (~> 223)
github-pages (~> 228)
jekyll-feed (~> 0.12)
minima (~> 2.5)
tzinfo (~> 1.2)
tzinfo-data
wdm (~> 0.1.1)
webrick (~> 1.8)

BUNDLED WITH
2.3.8
60 changes: 60 additions & 0 deletions docs/_posts/2023-11-28-my-second-post.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
layout: post
title: "My Second Post on GitHub Pages with Jekyll"
date: 2022-02-28 02:20:00 +0530
categories: howto
---

This post shows you how to clone your existing repo that has been previously been setup to serve GiHub Pages and replicate the setup on a computer with freshly installed Ubuntu so that you can continue to add pages and publish to the same repo.

References
==========

* {% post_url 2022-02-24-my-first-post %}

Prerequisites
=============

* Ubuntu Computer
* Account on Github

Cloning your existing repo and recreating the environment
=========================================================

1. Install and setup git on your Ubuntu Computer to work with your GitHub account
1. `sudo apt install git`
2. `git config --global user.name "Anurag Chugh"`
3. `git config --global user.email "[email protected]"`
2. Install Github CLI
1. `curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg`
2. `sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg`
3. `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`
4. `sudo apt update`
5. `sudo apt install gh -y`
3. Setup Github Authentication
1. `gh auth login`
2. Follow on screen instructions
4. Install Ruby
1. `sudo apt-get install ruby-full build-essential zlib1g-dev`
5. Avoid installing RubyGems packages (called gems) as the root user.
1. `echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc`
2. `echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc`
3. `echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc`
4. `source ~/.bashrc`
6. Install Jekyll and Bundler
1. `gem install jekyll bundler`
7. Clone the repo
1. `gh repo clone lithiumhead/lithiumhead.github.io`
8. Run commands
1. `cd ~/lithiumhead.github.io/docs`
2. `bundle install`
9. If your the version specified for gh-pages in your Gemfile is old, now is a good time to update it
1. `nano Gemfile`
2. Change the `223` in `gem "github-pages", "~> 223"` to the latest version thats specified [here](https://pages.github.com/versions/). (It was 228 on 2023-11-28)
3. `bundle update`
4. `bundle add webrick # Solves https://github.com/github/pages-gem/issues/752`
10. To render existing posts locally
1. `bundle exec jekyll serve`
2. Open [http://127.0.0.1:4000/](http://127.0.0.1:4000/) in Browser
11. To add a new post, just add a new markdown file to `lithiumhead.github.io/docs/_posts/` and then add, commit and push to gh-pages branch.

0 comments on commit d668d45

Please sign in to comment.