Migrating all my writings to Github pages
Installations
- Ruby
- Gem
- Bundler
Installing / Updating ruby
from https://jekyllrb.com/docs/installation/macos/
brew upgrade ruby
For some reason, it didn’t succeed. I had to run a couple of more commands. It complained that homebrew-core
and homebrew-case
are shallow clones
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
Then I added the ruby path to my ~/.zshrc
export PATH="/usr/local/opt/ruby/bin:$PATH"
export PATH="$HOME/.gem/ruby/X.X.0/bin:$PATH"
Install jekyll
gem install --user-install bundler jekyll
Install bundler (https://bundler.io/)
gem install bundler
Create a new jekyll site
>> jekyll -v
jekyll 4.2.0
>> jekyll 4.2.0 new .
Open a gem file and enable gitub pages.
# comment this
# gem "jekyll", "~> 4.2.0"
# uncomment this
gem "github-pages", group: :jekyll_plugins
now run the site
bundle exec jekyll serve
favicon
Browsers from different vendors and also different mobile phones ask for favicons in their own way. Luckily, there is favicon generator.
Then create a custom header html and paste this
<!-- _includes/head/custom.html -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
Comments