2 posts tagged with "docusaurus"

View All Tags

๋„ํ์‚ฌ์šฐ๋ฅด์Šค์—์„œ ์ด๋ฏธ์ง€ ์ฒจ๋ถ€ํ•˜๊ธฐ

์ด์ „์— ์ž‘์„ฑํ–ˆ๋˜ ๊ธ€๋“ค์— ์ฒจ๋ถ€ํ•œ ์ด๋ฏธ์ง€๊ฐ€ ๊นจ์ง€๋Š” ํ˜„์ƒ์ด ์ผ์–ด๋‚˜๋Š” ์ด์œ ์™€ ์ด๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ ๊ณผ์ •์„ ๊ณต์œ ํ•ฉ๋‹ˆ๋‹ค.

๋„ํ์‚ฌ์šฐ๋ฃจ์Šค๋กœ ๋ธ”๋กœ๊ทธ ์‹œ์ž‘



npx @docusaurus/[email protected] init dezang.net classic
cd dezang.net
yarn start


yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.


๋„ํ์‚ฌ์šฐ๋ฃจ์Šค๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ๋ฐฐํฌ๋ฅผ ๊ฐ€์ด๋“œํ•ฉ๋‹ˆ๋‹ค.

GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy

์ฒ˜์Œ์—๋Š” ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ github page ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ–ˆ์ง€๋งŒ, ์ข€ ๋” ์„ฑ๋Šฅ์ด ์ข‹์€ (๋ธ”๋กœ๊ทธ์— ๋ฌด์Šจ ์„ฑ๋Šฅ ํƒ€๋ น์ธ์ง€... ์ง์—…๋ณ‘์ด๋ž€...) ์„œ๋น„์Šค๊ฐ€ ์—†์„๊นŒ ์ฐพ์•„๋ณด๋˜ ์ค‘ ๋น„๊ต ์ •๋ฆฌ๋ฅผ ์ž˜ํ•ด๋†“์€ nextJS ๋ญ˜๋กœ ๋ฐฐํฌํ• ๊นŒ? (Netlify, Vercel, Github page) ์„ ๋ณด๊ณ  ๊ฒฐ์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๊ธ€์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€์ด ๊ฒฐ์ •์— ์ค‘์š”ํ•œ ์š”์†Œ๊ฐ€ ๋˜์—ˆ๋Š”๋ฐ์š”.

๊นƒํ—ˆ๋ธŒ Netlify์— ๋น„ํ•ด Vercel์˜ ํŠน์žฅ์ ์€ ์œ ์ผํ•˜๊ฒŒ ์„œ์šธ์— CDN์ด ์žˆ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. Vercel์˜ ๊ฒฝ์šฐ ๊ตญ๋‚ด์—์„œ TTFB๊ฐ€ 30~40ms ๋กœ ์ตœ์ƒ๊ธ‰์„œ๋ฒ„์˜ ์„ฑ๋Šฅ์„ ๋Š๋‚„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!

์‹ค์ œ๋กœ vercel์— ๊ฒฝ์šฐ Vercel Docs-Edge Network-Regions ํŽ˜์ด์ง€๋ฅผ ๋ณด๋ฉด Seoul, South Korea ๊ฐ€ ๋‹น๋‹นํžˆ ์ž๋ฆฌ์žก๊ณ  ์žˆ๋Š” ๊ฒƒ์„ ํ™•์ธํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๋ฐ˜๋ฉด Netlify ๋Š” Netlify for Business ํ”Œ๋žœ์—๋งŒ 27 global edge locations ๋ผ๊ณ  ๋ช…์‹œํ•ด๋†“์•˜์„ ๋ฟ ํ”„๋ฆฌ ๋ฒ„์ „์— ์—ฃ์ง€๊ฐ€ ์–ด๋””์— ๋ช‡ ๊ฐœ์ธ์ง€๋Š” ๋น„๊ณต๊ฐœ๋กœ ํ•ด๋†“์•˜์ฃ . ํ•œ๊ธ€๋กœ ๋œ ๊ธ€์ด ๋Œ€๋‹ค์ˆ˜์ธ ํ•ด๋‹น ๋ธ”๋กœ๊ทธ๋Š” ํ•œ๊ตญ ์—ฃ์ง€๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๊ฒƒ์ด ์„ฑ๋Šฅ์ƒ ์ด์ ์ด ๋†’์„ ๊ฒƒ์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜์—ฌ ์ด์ „์— ์จ๋ณธ ์ ์€ ์—†์ง€๋งŒ vercel์— ๋ฐฐํฌํ•˜๊ธฐ๋กœ ๊ฒฐ์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

๊นƒํ—ˆ๋ธŒ ๋กœ๊ทธ์ธ ํ›„ ๋ช‡ ๊ฐ€์ง€ ์„ค์ •๋งŒํ•˜๋ฉด ๋ฐ”๋กœ ๋ฐฐํฌ๊ฐ€ ๋˜์—ˆ๊ณ , ์ปค์Šคํ…€ ๋„๋ฉ”์ธ๋„ ์•„์ฃผ ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์ ์šฉํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฌด์—‡๋ณด๋‹ค Let's Encrypt ์—์„œ SSL ์ธ์ฆ์„œ๋ฅผ ์ž๋™์œผ๋กœ ๋ฐœ๊ธ‰๋ฐ›์•„์„œ ์ ์šฉํ•ด์ฃผ๋Š” ๊ฒƒ๋„ ์ข‹์•˜๋„ค์š”.