JSON-OBJECT Software Engineering Blog

Professional Senior Backend Engineer. Specializing in high volume traffic and distributed processing with Kotlin and Spring Boot as core technologies.

View on GitHub
27 June 2023

GitHub Pages와 Jekyll을 이용하여 무료 블로그 구축하기

by Taehyeong Lee

개요

GitHub Pages 리포 생성

Jekyll 설치

$ 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 bundler

# Jekyll 설치
$ gem install jekyll --version="~> 4.2.0"

# kramdown 설치
$ gem install kramdown rouge

Jekyll 페이지 생성

# GitHub Pages 리포 클로닝
$ git clone git@github.com:{username}/{username}.github.io.git
$ cd {username}.github.io.git

# Jekyll 페이지 생성
$ jekyll new --skip-bundle .

# GitHub Pages 플러그인 활성화
$ nano Gemfile
# 1. 주석 처리
# gem "jekyll", "~> 4.2.2"
# 2. 내용 추가
gem "github-pages", "~> 228", group: :jekyll_plugins

$ Jekyll 페이지 빌드
$ bundle install

_config.yml

title: JSON-OBJECT Software Engineering Blog
email: jsonobject@gmail.com
description: >-
  Professional Senior Backend Engineer. Specializing in high volume traffic and distributed processing with Kotlin and Spring Boot as core technologies.
github_username: JSON-OBJECT

# Hacker 테마 적용, 기본값은 minma
theme: jekyll-theme-hacker

plugins:
  - jekyll-feed

# kramdown 구문 활성화
markdown: kramdown
kramdown:
  input: GFM
  syntax_highlighter: rouge

# Pagination 활성화
paginate: 5
paginate_path: "/posts/:num/"
permalink: "/:title.html"

index.html

```
---
layout: default
---
<!DOCTYPE html>
<html lang="ko">
  <head>
    <meta charset="utf-8">
    <title>JSON-OBJECT Software Engineering Blog</title>
  </head>
  <body>

    <h1>Recent Posts</h1>
      <ul>
        
      </ul>

<div class="pagination">
  
    <span class="previous">Previous</span>
  
  <span class="page_number ">
    Page:  of 
  </span>
  
    <span class="next ">Next</span>
  
</div>

  </body>
</html>
```

참고 글

tags: GitHub - Jekyll