[Blog] 이모티콘 & 수식 추가
이모티콘과 수식을 사용할 수 있게끔 적용해보자!
- 이모티콘 사용 예시 :
- 수식 사용 예시 : \( 𝑐 = \frac{1}{2}(a+b) \)
이모티콘 추가
_config.yml
에 jemoji 추가 (jemoji는 jekyll을 위한 emoji 플러그인)
# Plugins (previously gems:)
plugins:
- jekyll-paginate
- jekyll-sitemap
- jekyll-gist
- jekyll-feed
- jekyll-include-cache
- jemoji # 이부분 입니다.
혹시나 에러가 발생시 github-pages 설치 유무, 버전의 유무를 참고!
- github-pages 설치
-
Gemfile
의gem "github-pages", group: :jekyll_plugins
코드 주석 해제 -
bundle install
명령어 사용
-
- 버전 업데이트
-
bundle update
명령어 사용
-
사용법
- emoji 목록 을 보고 원하는 이모티콘 사용
- 스마일 이모티콘 예시 :
:smile:
입력 ->
수식 추가
_include/scripts.html
에 아래 코드 추가
<!-- mathjax 문법 사용가능하게 하기 위해 추가 -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" defer
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
</script>
_config.yml
에 mathjax: true 를 추가
# Defaults
defaults:
# _posts
- scope:
path: ""
type: posts
values:
layout: single
author_profile: true
read_time: true
comments: true
share: true
related: true
show_date : true
sidebar_main: true
mathjax: true # 이부분입니다.
사용법
- inline :
\\(
와\\)
사이에 문법대로 수식 작성 - 블록 :
\\[
와\\]
사이에 문법대로 수식 작성 - inline 예시 :
\\( 𝑐 = \frac{1}{2}(a+b) \\)
-> \( 𝑐 = \frac{1}{2}(a+b) \)
댓글남기기