bluelion2.github.io

Build Status Greenkeeper badge Total alerts Lighthouse score: 100/100 contributions welcome Netlify Status

Twitter: JbeeLjyhanll

screenshot

In this template…

이 λΈ”λ‘œκ·Έ ν…œν”Œλ¦Ώμ— λŒ€ν•œ 정보

Demo

Use case

demo-image

이 ν…œν”Œλ¦Ώμ„ μ‚¬μš©ν•˜μ—¬ λΈ”λ‘œκ·Έλ₯Ό λ§Œλ“€μ—ˆλ‹€λ©΄ μœ„ β€˜μ‚¬μš©ν•œ λΈ”λ‘œκ·Έβ€™ λ¦¬μŠ€νŠΈμ— μΆ”κ°€ν•΄μ£Όμ„Έμš”! PR을 톡해 λ“±λ‘ν•΄μ£Όμ‹œλ©΄ λ©λ‹ˆλ‹€!

😎 Quick Start

1. Gatsby ν”„λ‘œμ νŠΈλ₯Ό μ‹œμž‘

# 이 λΈ”λ‘œκ·Έ μŠ€νƒ€ν„°λ₯Ό μ‚¬μš©ν•˜μ—¬ gatsby ν”„λ‘œμ νŠΈλ₯Ό μ‹œμž‘ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
npx gatsby new my-blog-starter https://github.com/JaeYeopHan/gatsby-starter-bee

λ§Œμ•½ npxλ₯Ό μ‚¬μš©ν•˜κ³  μžˆμ§€ μ•ŠλŠ”λ‹€λ©΄, Gatsby Getting Started 글을 μ°Έκ³ ν•˜κ±°λ‚˜ μ•„λž˜ μ»€λ§¨λ“œλ₯Ό μ‹€ν–‰ν•΄μ£Όμ„Έμš”.

npm install -g gatsby-cli
gatsby new my-blog-starter https://github.com/JaeYeopHan/gatsby-starter-bee

2. 이제 λ‘œμ»¬μ—μ„œ ν™•μΈν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€

cd my-blog-starter/
npm start
# λΈŒλΌμš°μ €μ—μ„œ localhost:8000둜 μ ‘κ·Όν•©λ‹ˆλ‹€.

3. ν¬μŠ€νŒ…μ„ μΆ”κ°€ν•˜μ„Έμš”

λ‹€μŒ 두 κ³³μ—μ„œ ν¬μŠ€νŒ…μ„ μΆ”κ°€ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

λͺ‡ κ°€μ§€μ˜ 메타데이터와 λ§ˆν¬λ‹€μš΄ λ¬Έλ²•μœΌλ‘œ ν¬μŠ€νŒ…μ„ μž‘μ„±ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

μƒˆλ‘œμš΄ 포슀트λ₯Ό μž‘μ„±ν•  λ•Œ μ»€λ§¨λ“œλΌμΈμ„ 톡해 ν•  수 μžˆμŠ΅λ‹ˆλ‹€

cli-tool-example

npm run post

μœ„ μ»€λ§¨λ“œλ₯Ό μž…λ ₯ν•˜λ©΄ μƒˆλ‘œμš΄ ν¬μŠ€νŠΈκ°€ μƒμ„±λ©λ‹ˆλ‹€.

πŸ‘‰ gatsby-post-gen CLI 도ꡬλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€. (https://github.com/JaeYeopHan/gatsby-post-gen)

4. 메타데이터 μˆ˜μ •

/gatsby-meta-config.js νŒŒμΌμ—μ„œ λΈ”λ‘œκ·Έλ₯Ό μ„€μ •ν•˜λŠ” μ—¬λŸ¬ μš”μ†Œλ₯Ό μˆ˜μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

5. Netlify둜 배포

Deploy to Netlify

:bulb: github pagesλ₯Ό 톡해 λ°°ν¬ν•˜κ³  μ‹Άλ‹€λ©΄ μ•„λž˜ npm scriptλ₯Ό package.json에 μΆ”κ°€ν•΄μ£Όμ„Έμš”.

"scripts": {
    "deploy": "gatsby build && gh-pages -d public -b master -r 'git@github.com:${your github id}/${github page name}.github.io.git'"
}

gh-pages λͺ¨λ“ˆμ΄ ν•„μš”ν•  경우 μ„€μΉ˜κ°€ ν•„μš”ν•©λ‹ˆλ‹€.

🧐 μž…λ§›μ— 맞게 λ°”κΎΈκΈ°

βš™ μ„€μ •

/root
β”œβ”€β”€ gatsby-browser.js // font, polyfill, onClientRender ...
β”œβ”€β”€ gatsby-config.js // Gatsby config
β”œβ”€β”€ gatsby-meta-config.js // Template meta config
└── gatsby-node.js // Gatsby Node config

β›‘ ꡬ쑰

src
β”œβ”€β”€ components // Just component with styling
β”œβ”€β”€ layout // home, post layout
β”œβ”€β”€ pages // routing except post: /(home), /about
β”œβ”€β”€ styles
β”‚   β”œβ”€β”€ code.scss
β”‚   β”œβ”€β”€ dark-theme.scss
β”‚   β”œβ”€β”€ light-theme.scss
β”‚   └── variables.scss
└── templates
    β”œβ”€β”€ blog-post.js
    └── home.js

🎨 μŠ€νƒ€μΌ

src/styles λ””λ ‰ν† λ¦¬μ—μ„œ CSS 속성듀을 μˆ˜μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

src/styles
β”œβ”€β”€ code.scss
β”œβ”€β”€ dark-theme.scss
β”œβ”€β”€ light-theme.scss
└── variables.scss

🍭 κΏ€νŒ

β˜• λ§ˆμŒμ— λ“œμ…¨λ‚˜μš”?

Buy Me A Coffee

πŸ€” λ§Œμ•½μ—β€¦

λ§Œμ•½ ν˜„μž¬ λ―Έλ””μ—„μ—μ„œ λΈ”λ‘œκ·Έλ₯Ό μš΄μ˜μ€‘μ΄μ‹œλΌλ©΄ λ§ˆμ΄κ·Έλ ˆμ΄μ…˜μ„ κ³ λ €ν•΄λ³΄μ„Έμš”! medium-to-own-blog!

:bug: λ²„κ·Έμ œλ³΄

Issue

🎁 κΈ°μ—¬ν•˜κΈ°

Contributing guide

LICENSE

MIT

Project by @Jbee✌