블로그 운영 - references

1 분 소요

이 블로그는 Jekyll로 만들어져 있습니다.

Install Jekyll

$ sudo apt-get install ruby ruby-dev build-essential
$ 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 update
$ sudo gem update --system
$ gem install jekyll bundler

Upgrade Jekyll

$ jekyll --version
$ gem list jekyll
$ bundle update jekyll
$ gem update jekyll

Run Jekyll

$ jekyll serve --draft --host 0.0.0.0

References

...
# Analytics
analytics:
  provider               : google-gtag # false (default), "google", "google-universal", "google-gtag", "custom"
  google:
    tracking_id          : UA-111111111-1
...

Type-on-Strap theme

...
 {% include adsense.html %} 
</head>
  • URL을 /:categories/:title/ 형태로 만들기 위해 _config.yml 파일에 아래와 같이 permalink 라인을 추가
...
# PAGINATION
permalink: /:categories/:title/
paginate: 5
paginate_path: "blog/page:num"
...

minimal-mistakes theme

git clone https://github.com/mmistakes/minimal-mistakes.git YourDirectory
cd YourDirectory
rm -rf .editorconfig .gitattributes .github docs/ test/ CHANGELOG.md minimal-mistakes-jekyll.gemspec README.md screenshot-layouts.png screenshot.png    # remove unnecessary files
cat << EOF > Gemfile     # overwrite Gemfile
source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!

# gem "github-pages", group: :jekyll_plugins

# To upgrade, run `bundle update`.

gem "jekyll"
gem "minimal-mistakes-jekyll"

# The following plugins are automatically loaded by the theme-gem:
#   gem "jekyll-paginate"
#   gem "jekyll-sitemap"
#   gem "jekyll-gist"
#   gem "jekyll-feed"
#   gem "jekyll-include-cache"
#
# If you have any other plugins, put them here!
group :jekyll_plugins do
end
EOF
bundle install     # install gems then Gemfile.lock is created

카테고리: ,

업데이트: