๐Ÿ“’Github Blog ๋งŒ๋“ค๊ธฐ-1

silver_gyeongยท2022๋…„ 7์›” 31์ผ
0

CODE STUDYโœ๏ธ

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

22/07/31(1)

์ฝ”๋”ฉ๋‰ด๋น„์˜ Git Blog ๋งŒ๋“ค๊ธฐ!

โ•ฐ(ยฐโ–ฝยฐ)โ•ฏ๐Ÿ‘๐Ÿ‘๐Ÿ‘

ํ˜ธ๊ธฐ๋กญ๊ฒŒ ์‹œ์ž‘ํ•˜์˜€์œผ๋‚˜...

๋งŽ์€ ์‹œํ–‰์ฐฉ์˜ค๋ฅผ ๊ฒช์—ˆ์Šต๋‹ˆ๋‹ค.


์ œ ๋ฐํƒ‘ ํ™˜๊ฒฝ์€ Window ์˜€๋Š”๋ฐ

blog๋ฅผ ์„œ์นญํ•ด ๋ณธ ๊ฒฐ๊ณผ MAC ํ™˜๊ฒฝ์—์„œ ์ž‘์—…ํ•œ ๊ฒƒ๋“ค์ด ๋งŽ์•˜๊ณ ๐Ÿ˜‚

MAC๊ณผ ๊ฐ™์€ ๋ฆฌ๋ˆ…์Šค ํ™˜๊ฒฝ์„ ๊ตฌ์ถ•ํ•ด ๋ณด๊ณ ์ž

ubuntu๋ฅผ ๋‹ค์šด ๋ฐ›์•„ ์ž‘์—… ํ–ˆ๋Š”๋ฐ ์—ฌ๋Ÿฌ ์˜ค๋ฅ˜๋กœ ์ผ๋‹จ STOP! (์ฐจํ›„ ubuntu๋กœ ๋‹ค์‹œ ๋งŒ๋“ค์–ด๋ณผ ์ƒ๊ฐ)


์ œ๊ฐ€ git blog builder๋กœ ์ด์šฉํ•  ๊ธฐ๋Šฅ์€ Ruby์™€ Jekyll์ž…๋‹ˆ๋‹ค.

๋จผ์ € ๋‘˜์— ๋Œ€ํ•ด ๊ฐ„๋‹จํ•˜๊ฒŒ ์ •๋ฆฌํ•ด ๋ณผ๊นŒ์š”?


  • Ruby๋Š” ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด๋ช…์œผ๋กœ ์ •์  ์‚ฌ์ดํŠธ ์ƒ์„ฑ๊ธฐ(static website builder) jekyll์—์„œ ์‚ฌ์šฉํ•˜๋Š” ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด์ด๋‹ค.

  • Jekyll์€ Ruby programming languge๋กœ ๋งŒ๋“ค์–ด์ ธ ์žˆ๋‹ค.

  • jekyll์€ Github์— ๋ฌด๋ฃŒ๋กœ ํ˜ธ์ŠคํŒ… ๊ฐ€๋Šฅํ•˜๋‹ค.

  • jekyll๊ณผ Github๋Š” markdown์–ธ์–ด๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.


ใ…‡ใ…‡๊ทธ๋ ‡๊ตฌ๋‚˜!


๐Ÿ“šbolg build ์‹œ์ž‘!

โœ”๏ธVSCode์™€ Github์˜ ์—ฐ๋™๋ฒ•์„ ์ตํžŒ ํ›„ ์•„๋ž˜ ์ž‘์—… ์ฐฉ์ˆ˜.

ใ€€1. Ruby download ํ™ˆํŽ˜์ด์ง€์—์„œ ์•ˆ์ •์ ์ธ ๋ฆด๋ฆฌ์ฆˆ ๋ฒ„์ „์„ ๋‹ค์šด๋กœ๋“œ. (๋‚˜๋Š” 3.1.2-1 ver์„ ๋‹ค์šด ๋ฐ›์•˜๋‹ค. jekyll๊ฐ€ 32bit๋ผ๋Š” ๊ธ€์„ ์–ด๋””์„œ ์ž ๊น๋ณด์•˜๊ธฐ์—.)


ใ€€2. start command prompt with Ruby์—์„œ ๋ธ”๋กœ๊ทธ๋ฅผ ๊ฐœ์„คํ•  git ํด๋”๋กœ ๊ฒฝ๋กœ ์ด๋™!

>cd {๋กœ์ปฌ repo ํด๋” ๊ฒฝ๋กœ.}

ใ€€4. Ruby์— Jekyll ์„ค์น˜.

โœ

>gem install jekyll bundler

๐Ÿ‘‰๊ฒฐ๊ณผ
โœ”๏ธ์„ฑ๊ณต

๋งŒ์•ฝ 3.0์ด์ƒ์˜ ๋ฒ„์ „์„ ๋‹ค์šด ๋ฐ›๋Š” ๋‹ค๋ฉด webrick ์„ ์„ค์น˜ํ•ด ์ค์‹œ๋‹ค. Ruby 3.0 ๋ฒ„์ „ ๋ถ€ํ„ฐ serve๋ฅผ ๋™์ž‘ ์‹œ webrick ์˜ค๋ฅ˜๊ฐ€ ์ƒ๊ฒจ ๋‚  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.
์˜ค๋ฅ˜๊ฐ€ ์ƒ๊ฒจ๋‚˜๊ณ  webrick install์„ ํ•ด์ฃผ์–ด๋„ ์ƒ๊ด€์€ ์—†์Šต๋‹ˆ๋‹ค.

โœ

>gem install webrick

๐Ÿ‘‰๊ฒฐ๊ณผ
โœ”๏ธ์„ฑ๊ณต


ใ€€5. jekyll ์ƒ์„ฑ.

โœ

>jekyll new ./

โ—๏ธ ์—ฌ๊ธฐ์„œ ์—๋Ÿฌ๊ฐ€ ๋œจ๋„ค์š”??

ใ€€๐Ÿ‘‡์ด๋ ‡๊ฒŒ๐Ÿ‘‡

Error๋ฅผ ์ž์„ธํžˆ ์ฝ์–ด๋ณด๋ฉด {ํด๋”} is not empty๋ผ๊ณ  ๋‚˜์™€ ์žˆ์Šต๋‹ˆ๋‹ค.


โœ”๏ธํ•ด๊ฒฐ ๋ฐฉ์•ˆ

  • ๋‹นํ™ฉํ•˜์ง€ ๋ง๊ณ  ํ•ด๋‹น ํด๋”๋กœ ๊ฐ€์„œ ํŒŒ์ผ์„ ์ „๋ถ€ '์‚ญ์ œ' ํ•ด ์ค๋‹ˆ๋‹ค.

์ด์ œ jekyll new ๋ฅผ ํ•˜๊ธฐ ์ „์— ํด๋” ์•ˆ์— ํŒŒ์ผ์„ ์ „๋ถ€ ์‚ญ์ œํ•ด ์ฃผ๋„๋ก ํ•ฉ์‹œ๋‹ค. (.git ํด๋” ์ œ์™ธ.)


ใ€€5-1. ๋‹ค์‹œ jekyll ์ƒ์„ฑ!

โœ

>jekyll new ./

๐Ÿ‘‰๊ฒฐ๊ณผ
โœ”๏ธ์„ฑ๊ณต


6. bundle install.


  • bundle์€ ์˜์–ด๋ช… ๊ทธ๋Œ€๋กœ ๋ฌด์–ธ๊ฐ€๋ฅผ ๋ฌถ์–ด์ฃผ๋Š” ์—ญํ• ์„ ํ•œ๋‹ค.

    Q. ๋ญ˜ ๋ฌถ์„๊นŒ?

    A. ์„œ๋กœ ์ฐธ์กฐ๊ด€๊ณ„๊ฐ€ ์žˆ๋Š” ํŒŒ์ผ์„ ๋ฌถ๋Š”๋‹ค.

  • ์˜์กด์„ฑ์ด ์žˆ๋Š” ๋ชจ๋“ˆ์„ ๋ฌถ์–ด์ฃผ๊ธฐ ๋•Œ๋ฌธ์— ์‹œ๊ฐ„๋„ ์ ˆ์•ฝ๋˜๊ณ  ํŒŒ์ผ ํฌ๊ธฐ๋„ ์ค„์–ด๋“ ๋‹ค.


โœ

>bundle install

๐Ÿ‘‰๊ฒฐ๊ณผ
โœ”๏ธ์„ฑ๊ณต


7. jekll sever.

์ง€ํ‚ฌ ์„œ๋ฒ„๋ฅผ ์ž‘๋™์‹œ์ผœ ๋ด…์‹œ๋‹ค.

โœ

>bundle exec jekyll serve

โ—๏ธ ์—ฌ๊ธฐ์„œ webrick ๊ด€๋ จ ์—๋Ÿฌ๊ฐ€ ์ƒ๊ธธ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

ใ€€๐Ÿ‘‡์ด๋ ‡๊ฒŒ๐Ÿ‘‡

๋ธ”๋ผ๋ธ”๋ผ~ ์ค‘๊ฐ„์— Error๊ฐ€ ๋ณด์ž…๋‹ˆ๋‹ค.
cannot load such file -- webrick (LoadError)

โœ”๏ธํ•ด๊ฒฐ ๋ฐฉ์•ˆ

  • ๋‹นํ™ฉํ•˜์ง€๋ง๊ณ  ๊ตฌ๊ธ€๋ง ํ•ฉ์‹œ๋‹ค.

  • https://tmjb.tistory.com/131 ์ด๋ถ„์ด ๋งค
    ์šฐ ์ •๋ฆฌ๋ฅผ ์ž˜ ํ•ด๋†“์œผ์…จ๋„ค์š”.๐Ÿ‘

    >bundle add webrick
  • webrick์„ ์„ค์น˜ํ•˜๋ฉด ํ•ด๊ฒฐ๋˜๋Š” ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค.

  • ์œ„์—์„œ ์„ค๋ช…ํ–ˆ๋˜ ๊ฒƒ ์ฒ˜๋Ÿผ Ruby 3.0 ver๋ถ€ํ„ฐ gem์— webrick๊ฐ€ ํฌํ•จ๋˜์ง€ ์•Š์•„์„œ ์ƒ๊ธด ์˜ค๋ฅ˜๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

  • webrick์€ Ruby์˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ž…๋‹ˆ๋‹ค.



7-1. ๋‹ค์‹œ jekyll sever ์ž‘๋™!

โœ

>bundle exec jekyll serve

๐Ÿ‘‰๊ฒฐ๊ณผ
โœ”๏ธ์„ฑ๊ณต



8. jeckyll ์ ‘์†

localhost:4000 or 127.0.0.1:4000 ์œผ๋กœ ์ ‘์†ํ•˜์—ฌ ์•„๋ž˜์™€ ๊ฐ™์€ ํ™”๋ฉด์ด ๋œจ๋ฉด ์„ฑ๊ณต!

ํœด๐Ÿ˜…


๐Ÿ“–์ฐธ์กฐ

๊ธ€๊ผด์ƒ‰์ƒ
https://velog.io/@euisuk-chung/%EA%BF%80%ED%8C%81-Velog-%EA%B8%80%EC%94%A8%EB%A5%BC-%EB%82%B4-%EB%A7%88%EC%9D%8C%EB%8C%80%EB%A1%9C-%EC%83%89%EC%83%81-%ED%98%95%EA%B4%91%ED%8E%9C

markdown
https://velog.io/@yuuuye/velog-%EB%A7%88%ED%81%AC%EB%8B%A4%EC%9A%B4MarkDown-%EC%9E%91%EC%84%B1%EB%B2%95
https://velog.io/@ybkim3603/Velog%EB%B2%A8%EB%A1%9C%EA%B7%B8-%EC%82%AC%EC%9A%A9%EB%B2%95-%ED%8A%9C%ED%86%A0%EB%A6%AC%EC%96%BC

์ด๋ชจ์ง€
https://kr.piliapp.com/twitter-symbols/

palaco
https://velog.io/@yeseolee/%EC%86%8C%EC%8A%A4%EC%BD%94%EB%93%9C%EB%A5%BC-%EB%B8%94%EB%A1%9C%EA%B7%B8%EC%97%90-%EC%98%AC%EB%A6%B4%EB%95%8C

github blog
https://wlqmffl0102.github.io/posts/Making-Git-blogs-for-beginners-2/

profile
์ฝ”๋”ฉ๋‰ด๋น„

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