[GIT/GITHUB] github.io

ktmihsยท2021๋…„ 10์›” 3์ผ
0

GIT-GITHUB

๋ชฉ๋ก ๋ณด๊ธฐ
2/5
post-thumbnail

CH2. create github.io

1. create github.io

1) install && posting

$ hexo install -g hexo-cli  # ์„ค์น˜
$ hexo version  # version check

$ hexo init [reponame] # ํฌ์ŠคํŠธ ๊ด€๋ฆฌ repo ์ƒ์„ฑ

$ hexo new post "[title]"
$ vi [title]
	# ์ƒ์„ฑ๋œ md file์„ ์ˆ˜์ •ํ•˜์—ฌ ํฌ์ŠคํŒ… ์ž‘์„ฑ
	# --- ๋กœ ๊ตฌ๋ถ„๋œ 3์ค„์˜ ํ˜•ํƒœ๋Š” ๊ฐ€๊ธ‰์  ๊ฑด๋“œ๋ฆฌ์ง€ ๋ง ๊ฒƒ.
	# ๋‚ด์šฉ๋งŒ ๋ณ€๊ฒฝ

$ hexo clean && hexo generate // ๋ณ€๊ฒฝ์‚ฌํ•ญ ์žˆ์„ ๋•Œ๋งˆ๋‹ค ์ฃผ๊ธฐ์ ์œผ๋กœ ์ž‘์„ฑ
$ hexo server  // server open (localhost:4000)

2) themes

# theme ์„ค์น˜
https://theme-next.js.org/docs/
	# ์›ํ•˜๋Š” theme ์„ ํƒํ•ด์„œ url clone
$ git clone https://github.com/next-theme/hexo-theme-next themes/next
$ vi _config.yml
	# theme next ์„ค์ •

$ hexo clean && hexo generate 
$ hexo server 

๐Ÿ™†โ€โ™€๏ธ ์›น ์ƒˆ๋กœ๊ณ ์นจ

ctrl+ shift + r

3) custom

# custom
$ cd themes/next
$ cp _config.yml ../../_config.next.yml
$ cd ../../
$ ls
$ vi _config.next.yml
# ์›ํ•˜๋Š” ์„ค์ •ํ•˜๊ธฐ

4) deploy

# github repo 
# [name].github.io ๋ผ๋Š” ์ด๋ฆ„์˜ repo ์ƒ์„ฑ

# deploy
$ npm install hexo-deployer-git --save	# ์„ค์น˜
$ vi _config.yml
	# ํ•˜๋‹จ๋ถ€๋ถ„ ์ถ”๊ฐ€(๋‚ด git url ์ถ”๊ฐ€)
		
		# Deployment
		## Docs: https://hexo.io/docs/one-command-deployment
		deploy:
		  type: git
		  repo: https://github.com/ktmihs/ktmihs.github.io.git
		  branch: main
	

2. REF

HEXO

theme

0๊ฐœ์˜ ๋Œ“๊ธ€