Learn NEXT.JS 14 ð¥ Build a Static Markdown Blog Site
Summary
TLDRãã®ãã¥ãŒããªã¢ã«ã§ã¯ãNext.js 14ã䜿çšããŠéçã«çæãããããã°ãµã€ãã®æ§ç¯æ¹æ³ãåŠã¶ããšãã§ããŸããMarkdownãã¡ã€ã«ã䜿çšããŠãããŒã«ã«ã§ããã°èšäºãæžãããšãã§ããŸãããNext.jsã¯å€æ°ã®WebããŒãžãæ§ç¯ããŠãéåžžã«çŽ æŽãããã¬ã·ãããã°ãäœæããããšãã§ããŸããéçãªãµã€ãã®å©ç¹ãšããŠãããŒã¿ããŒã¹ãžã®ãã©ãã£ãã¯ãæžãããã¢ããªã±ãŒã·ã§ã³ã®ã³ã¹ããåæžããæ€çŽ¢ãšã³ãžã³æé©åïŒSEOïŒã«ãåªããããŒãžã®èªã¿èŸŒã¿é床ãåçã«åäžããŸãããã¥ãŒããªã¢ã«ã§ã¯ãã¬ã·ãããã°ã¢ããªãBubbly Bakerãã®æ§ç¯ã«çŠç¹ãåœãŠãMarkdownãã¡ã€ã«ã§ä¿åãããã¬ã·ãã«ã¢ã¯ã»ã¹ãããµãã«ãŒãã«ç§»åããŠè©³çŽ°ã衚瀺ããæ¹æ³ãåŠã³ãŸãããŸããNext.jsã®ããŒãžãšã¬ã€ã¢ãŠãã®ç¹å¥ãªãã¡ã€ã«ãã³ã³ããŒãã³ãã®äœæãã¡ã¿ããŒã¿ã®è¡šç€ºããããŠéçãªããŒãžã®çææ¹æ³ã«ã€ããŠãåŠã¶ããšãã§ããŸããæåŸã«ããããžã§ã¯ãã«ç¬èªã®ã¹ã¿ã€ã«ãè¿œå ããèªåã ãã®ããã°ãµã€ããæ§ç¯ããããšãæšå¥šãããŠããŸãã
Takeaways
- ð ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãNext.js 14ã䜿çšããŠéçã«çæãããããã°ãŠã§ããµã€ãã®æ§ç¯æ¹æ³ãåŠã³ãŸãã
- ð Markdownãã¡ã€ã«ã䜿çšããŠãããŒã«ã«ã§èšäºãæžããåŸãNext.jsã䜿ã£ãŠãŠã§ãããŒãžãéçã«çæããããšãã§ããŸãã
- ð° éçãªãŠã§ãããŒãžã®çæã¯ãããŒã¿ããŒã¹ãžã®ã¢ã¯ã»ã¹ãå¿ èŠãšãããå¹ççãã€ã³ã¹ãåæžã«åªããæ¹æ³ã§ãã
- ð Next.jsã䜿çšãããšãSEOæé©åãé«éãªããŒãžèªã¿èŸŒã¿ãã¢ããªã±ãŒã·ã§ã³ã³ã¹ãã®åæžã«åœ¹ç«ã¡ãŸãã
- ð GitHubã¬ããžããªãããããžã§ã¯ãã®ã¹ã¿ã€ã«ã·ãŒããšã¬ã·ãã®Markdownãã¡ã€ã«ãååŸã§ããŸãã
- ð» Visual Studio Codeã§ãããžã§ã¯ããéãããšã§ããã¹ãŠã®ããã°ã©ãã³ã°äœæ¥ãå¯èœã§ãã
- ð ïž Next.jsã®`app`ãã£ã¬ã¯ããªã¯ãã«ãŒããšãµãããŒãžãè¡šããã¬ã€ã¢ãŠããšããŒãžã®ç¹å¥ãªãã¡ã€ã«ããããŸãã
- ð `getServerSideProps`ã䜿çšããŠãããŒãžã®ã¡ã¿ããŒã¿ãšã³ã³ãã³ããååŸããéçã«çæãããããŒãžãäœæããŸãã
- ð ããŒãžã®ã¡ã¿ããŒã¿ã¯ãSEOãåäžãããããã«éèŠã§ãããŒãžã¿ã€ãã«ã説æãå«ãã§ããŸãã
- ð MarkdownãJSXã«å€æããReactãšNext.jsãããŒãžã«ã¬ã³ããªã³ã°ã§ããããã«ããŸãã
- ðš ãã¥ãŒããªã¢ã«ã®æåŸã«ããããžã§ã¯ãã«ç¬èªã®ã¹ã¿ã€ã«ãè¿œå ããå人çãªããã°ãµã€ããäœæããããšãæšå¥šãããŠããŸãã
Q & A
Next.jsãšã¯äœã§ããïŒ
-Next.jsã¯ãReactã¢ããªã±ãŒã·ã§ã³ã®éçºã容æã«ããããã®ãã¬ãŒã ã¯ãŒã¯ã§ããéçãµã€ãçæãAPIã«ãŒããåçã«ãŒãã£ã³ã°ãªã©ã®æ©èœãæäŸããŠããŸãã
Next.jsã§éçã«çæãããããã°ãµã€ããšã¯äœã§ããïŒ
-Next.jsã§éçã«çæãããããã°ãµã€ãã¯ããã«ãæã«ãã¹ãŠã®ããŒãžãäºåã«äœæãããããŒã¿ããŒã¹ããããŒã¿ãååŸããå¿ èŠããªããéåžžã«å¹ççãã€é«éã«åäœããããã°ãµã€ãã§ãã
ããŒã¯ããŠã³ãã¡ã€ã«ãšã¯äœã§ããïŒ
-ããŒã¯ããŠã³ãã¡ã€ã«ã¯ãããã¹ãããŒã¹ã®ãã¡ã€ã«ã§ãã·ã³ãã«ãªèšæ³ã䜿ã£ãŠã³ã³ãã³ããæžãããšãã§ããŸããNext.jsã§ã¯ãããŒã¯ããŠã³ãã¡ã€ã«ãéçãªWebããŒãžã«å€æããããšãå¯èœã§ãã
ãã¥ãŒããªã¢ã«ã§äœæãããã¬ã·ãããã°ã¢ããªã®ååã¯äœã§ããïŒ
-ãã¥ãŒããªã¢ã«ã§äœæãããã¬ã·ãããã°ã¢ããªã®åå㯠'Bubbly Baker' ã§ãã
éçã«çæããããµã€ãã®å©ç¹ã¯äœã§ããïŒ
-éçã«çæããããµã€ãã¯ãã³ã¹ãåæžãæ€çŽ¢ãšã³ãžã³æé©åãé«éãªããŒãžããŒãã£ã³ã°ãªã©ããããŸãããŸããããŒã¿ããŒã¹ãžã®ãã©ãã£ãã¯ãæžããããšã§å¹çæ§ãåäžããŸãã
Next.jsã§ã¢ããªãåæåããã³ãã³ãã¯äœã§ããïŒ
-Next.jsã§ã¢ããªãåæåããã³ãã³ã㯠`npx create-next-app@latest` ã§ãã
Next.jsã®ããŒãžãšã¬ã€ã¢ãŠããã¡ã€ã«ã®äºçŽèªã¯äœã§ããïŒ
-Next.jsã®ããŒãžãšã¬ã€ã¢ãŠããã¡ã€ã«ã®äºçŽèªã¯ããããã `page` ãš `layout` ã§ãã
ã°ããŒãã«CSSãã¡ã€ã«ãšã¯äœã§ããïŒ
-ã°ããŒãã«CSSãã¡ã€ã«ã¯ãã¢ããªã±ãŒã·ã§ã³å šäœã§å ±æãããã¹ã¿ã€ã«ãå®çŸ©ããCSSãã¡ã€ã«ã§ãããã®ãã¡ã€ã«ã§å®çŸ©ãããã¹ã¿ã€ã«ã¯ãã¢ããªã±ãŒã·ã§ã³ã®ã©ã®éšåããã§ãå©çšå¯èœã§ãã
Next.jsã§åçã«ãŒãã£ã³ã°ãå®çŸããã«ã¯ã©ãããã°ããã§ããïŒ
-Next.jsã§åçã«ãŒãã£ã³ã°ãå®çŸããã«ã¯ãããŒãžãã¡ã€ã«åã®åã«ã¹ã©ãã·ã¥ `/` ãã€ããã ãã§ãèªåçã«åçã«ãŒãã£ã³ã°ãæ©èœããŸãã
Next.jsã§éçãªããŒãžãçæããããã«å¿ èŠãªé¢æ°ã¯äœã§ããïŒ
-Next.jsã§éçãªããŒãžãçæããããã«å¿ èŠãªé¢æ°ã¯ `generateStaticParams` ã§ãããã®é¢æ°ã¯ãéçãªãã©ã¡ãŒã¿ãçæãããã«ãæã«äœ¿çšãããŸãã
Next.jsã®Markdownã³ã³ãã³ããJSXã«å€æããããã«äœ¿çšãããã©ã€ãã©ãªã¯äœã§ããïŒ
-Next.jsã®Markdownã³ã³ãã³ããJSXã«å€æããããã«äœ¿çšãããã©ã€ãã©ãªã¯ `markdown-to-jsx` ã§ãã
Outlines
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowMindmap
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowKeywords
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowHighlights
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowTranscripts
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowBrowse More Related Video
5.0 / 5 (0 votes)