[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-489279-105":59,"doc-detail-489279-en":131,"doc-similar-489279":245},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","build-a-blog-using-nextjs","Build a Blog Using Next.js","","A practical guide to building a modern personal blog with Next.js in 2024, emphasizing up-to-date workflows and a static export approach. The book walks through setting up a Next.js site and editor tooling, then building content with local MDX files that combine Markdown, JSX, and rich material. It covers styling strategies for both site and MDX content, image handling, metadata and navigation, and developer experience features like syntax highlighting and linked headings. It also addresses production essentials including RSS, favicons and dark mode, analytics, sitemap, robots.txt, Open Graph images, and error/404 handling.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/build-a-blog-using-nextjs/489279/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/build-a-blog-using-nextjs/489279.png","ImageObject",300,407,{"name":92,"@type":93},"PakDamar76","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-30","2026-10-01",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",17,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What approach does the book use for exporting and deploying the blog?","Question",{"text":113,"@type":114},"It uses a static export workflow so the site doesn’t require an app server for production.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How does the book help authors write blog posts?",{"text":118,"@type":114},"It uses local MDX files, allowing posts to be written with Markdown, JSX, and richer content.",{"name":120,"@type":111,"acceptedAnswer":121},"Which production features are covered before launching?",{"text":122,"@type":114},"It covers RSS, favicons and dark mode, Google Analytics, sitemap, robots.txt, Open Graph images, and 404 handling.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},489279,1791297536,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":147,"preview_urls":148},962090893057,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","Build a Blog Using Next.js  \nDiana MacDonald  \nBuild a Blog Using Next.js  \nDiana MacDonald Queensland, Australia  \n[https://didoesdigital.com/project/nextjs-blog-book/](https://didoesdigital.com/project/nextjs-blog-book/)  \nCopyright © 2024 by Diana MacDonald  \nThis work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.  \nWhile the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors northe publisher can accept any legal responsibility for any errors oromissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.  \nPublished by Diana MacDonald.  \nFor enquiries, please [e-mail](e-mail nextjs@didoesdigital.com)[ ](e-mail nextjs@didoesdigital.com)[nextjs@didoesdigital.com](e-mail nextjs@didoesdigital.com)  \nThe companion repository of source code for this book is available to readers on GitHub via the book’s product page, located at [https://](https://)[ ](https://)[didoesdigital.com/project/nextjs-blog-book/](didoesdigital.com/project/nextjs-blog-book/)  \nTable of Contents  \n• Introduction  \n• Chapter 1: Set Up a Next.js Site and VS Code  \n• Chapter 2: MDX and Metadata  \n• Chapter 3: Site Styling  \n• Chapter 4: Markdown Styling  \n• Chapter 5: Next.js Images  \n• Chapter 6: Blog Metadata and Navigation  \n• Chapter 7: Syntax Highlighting  \n• Chapter 8: Heading IDs and Links  \n• Chapter 9: RSS  \n• Chapter 10: Favicons and Dark Mode  \n• Chapter 11: Google Analytics and Sitemap  \n• Chapter 12: Robots file, 404s, and Open Graph images  \n• Conclusion: Production  \nIntroduction  \nThis book describes how to build a Next.js blog in 2024 using all the latest practices, and a static export. It includes using local MDX files that let you write posts with Markdown, JSX, and rich content. I’ve included considerations for tech choices along the way. There are caveats before getting started and some editor setup guidance.  \nThere is an accompanying Git repository with the code for the blog on GitHub: [https://github.com/](https://github.com/)[ ](https://github.com/)[didoesdigital/nextjs-blog](didoesdigital/nextjs-blog. Refer to this if you get)[. Refer to this if you get](didoesdigital/nextjs-blog. Refer to this if you get)[ ](didoesdigital/nextjs-blog. Refer to this if you get)stuck.  \nIf you find this book useful, please consider supporting my work by paying for the book on Ko‑fi: [https://ko-fi.com/didoesdigital](https://ko-fi.com/didoesdigital).  \nHere are the main technologies used in the blog:  \n• Next.js v14 with App Router  \n• A static export  \n• TypeScript v5  \n• Tailwind CSS v3  \n• MDX v3 via @next/ mdx v14  \n• RSS via the rss package  \n• Eslint  \n• Prettier  \n• Tailwind Prettier plugin  \n• Google Analytics  \nWe’ll also cover setting up dark mode, favicons, Open Graph images, syntax highlighting, styling MDX content, linked headings, a sitemap, robots.txt, and static sites for production. Static  \nsites don’t require an app server. I’ll assume you have some familiarity with React and web fundamentals.  \nThere are better choices than Next.js for personal blogs  \n Before we get started, a word of warning so you know what you’re getting into.  \nWhile this book demonstrates how you might build a personal blog using Next.js, it’s just an example of a something you could build with Next.js to get the hang ofit and even take advantage of static exports.  \nI had specific motivations to build my site and blog in Next.js using React Server Components with lots of customisation, but ifI were looking for ","cbCaic4CG0KmHOAM","https://ap.wps.com/l/cbCaic4CG0KmHOAM","pdf",6600306,219,"English","# Introduction\n# Chapter 1: Set Up a Next.js Site and VS Code\n# Chapter 2: MDX and Metadata\n# Chapter 3: Site Styling\n# Chapter 4: Markdown Styling\n# Chapter 5: Next.js Images\n# Chapter 6: Blog Metadata and Navigation\n# Chapter 7: Syntax Highlighting\n# Chapter 8: Heading IDs and Links\n# Chapter 9: RSS\n# Chapter 10: Favicons and Dark Mode\n# Chapter 11: Google Analytics and Sitemap\n# Chapter 12: Robots file, 404s, and Open Graph images\n# Conclusion: Production","[{\"question\":\"What approach does the book use for exporting and deploying the blog?\",\"answer\":\"It uses a static export workflow so the site doesn’t require an app server for production.\"},{\"question\":\"How does the book help authors write blog posts?\",\"answer\":\"It uses local MDX files, allowing posts to be written with Markdown, JSX, and richer content.\"},{\"question\":\"Which production features are covered before launching?\",\"answer\":\"It covers RSS, favicons and dark mode, Google Analytics, sitemap, robots.txt, Open Graph images, and 404 handling.\"}]","Build a Blog Using Next.js | PDF",1790821930,552,22,[149,153,157,161,165,169,173,177,181,185,189,194,199,204,209,214,219,223,228,232,236,241],{"page_no":8,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/fb9e38873555564c0d7c7df7d29854ff.webp",983,1394,{"page_no":14,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/2a817945362d13a16eeae30af307fba0.webp",982,1393,{"page_no":81,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/1b61e2bde6bc3455105cf03bd388ab05.webp",981,1391,{"page_no":19,"url":162,"width":163,"height":164},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/9b20e582ddf7c02508fee27306905b3c.webp",980,1390,{"page_no":24,"url":166,"width":167,"height":168},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/6f62a42810320494298189646c48230c.webp",979,1389,{"page_no":29,"url":170,"width":171,"height":172},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/3c7c97e878df6e489415c5d31c1d076d.webp",978,1387,{"page_no":34,"url":174,"width":175,"height":176},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/a1e0168ca3894665dee787848e975638.webp",977,1386,{"page_no":39,"url":178,"width":179,"height":180},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f1b0882d693b2d1d74b9db4065679ed2.webp",976,1384,{"page_no":44,"url":182,"width":183,"height":184},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e8d33a36b5391b3f7c2cfcf7e54e7c72.webp",975,1383,{"page_no":52,"url":186,"width":187,"height":188},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/93b0fa3812c7ceb1a5621dbd2597ac25.webp",974,1381,{"page_no":190,"url":191,"width":192,"height":193},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/55a61625bd9f806752c75467c87b19f2.webp",973,1380,{"page_no":195,"url":196,"width":197,"height":198},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/c15c3e66467c60a3174d29674e86e9e9.webp",972,1379,{"page_no":200,"url":201,"width":202,"height":203},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ac8362e6baaa2a565d88d20c7a2a76a6.webp",971,1377,{"page_no":205,"url":206,"width":207,"height":208},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/23e05c1b44681171938abd559a7bbd25.webp",970,1376,{"page_no":210,"url":211,"width":212,"height":213},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f54bbf9d85f88d6690e7123c96dc3ef8.webp",969,1374,{"page_no":215,"url":216,"width":217,"height":218},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/06ae5ac6e52e23d6d4ccd84f1c60daa7.webp",968,1373,{"page_no":105,"url":220,"width":221,"height":222},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/06b58170978a2ff0014aecc0f867b2eb.webp",967,1372,{"page_no":224,"url":225,"width":226,"height":227},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f71eb5b0fd0123c20f067acc6ae58308.webp",966,1370,{"page_no":56,"url":229,"width":230,"height":231},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/521e90afea61bfafbda5a80de9fff778.webp",965,1369,{"page_no":46,"url":233,"width":234,"height":235},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/0e8f173758317fc22da0b0edfe116c3f.webp",964,1367,{"page_no":237,"url":238,"width":239,"height":240},21,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e97b451e3f9efd743322fbe7b2630bae.webp",963,1366,{"page_no":147,"url":242,"width":243,"height":244},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/5769dc65657b9dd084a97c31d5bbdfdd.webp",962,1364,{"list":246,"token":66},[247,253,259,265,271,277,283,289,295,301],{"doc_id":248,"doc_title":249,"file_type":138,"home_preview_img_url":250,"slug":251,"view_count":29,"category_name":30,"create_tm":252},489283,"TECHNEST MENTORSHIP PROGRAM - WEEK 6 JOB LIFE - Add a Blog System","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229926987403/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=tSOWOQLliPLIM6mcumt9LVNqm98%3D","technest-mentorship-program-week-6-job-life-add-a-blog-system",1790821942,{"doc_id":254,"doc_title":255,"file_type":138,"home_preview_img_url":256,"slug":257,"view_count":215,"category_name":30,"create_tm":258},489290,"React JS Full Course E-book Content - Introduction to React - Course Outline","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229927222694/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=4neeUI98c7obAM87ZQe8vNijO6I%3D","react-js-full-course-e-book-content-introduction-to-react-course-outline",1790822011,{"doc_id":260,"doc_title":261,"file_type":138,"home_preview_img_url":262,"slug":263,"view_count":19,"category_name":30,"create_tm":264},703193,"92kramdown-Bormann - Writing RFCs in kramdown-rfc","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230013446221/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=KZykxz7%2FH28sSlwGf7snROrUpls%3D","92kramdown-bormann-writing-rfcs-in-kramdown-rfc",1794562585,{"doc_id":266,"doc_title":267,"file_type":138,"home_preview_img_url":268,"slug":269,"view_count":24,"category_name":30,"create_tm":270},698003,"md4r - R package Markdown parser using the MD4C library","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010155849/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=A9Wet7b70TSYYOCg2%2FypiguLV%2Fg%3D","md4r-r-package-markdown-parser-using-the-md4c-library",1794446945,{"doc_id":272,"doc_title":273,"file_type":138,"home_preview_img_url":274,"slug":275,"view_count":205,"category_name":30,"create_tm":276},489293,"The Ultimate React Handbook - Introduction - Starter Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229926988787/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=8j7KwbBu4jPfKG4Dc5z%2FabmvGis%3D","the-ultimate-react-handbook-introduction-starter-guide",1790822020,{"doc_id":278,"doc_title":279,"file_type":138,"home_preview_img_url":280,"slug":281,"view_count":24,"category_name":30,"create_tm":282},707157,"Google Search Engine Optimization - Starter Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230015644632/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=abIdpgP8G3wib4ubg1LplSsXwrQ%3D","google-search-engine-optimization-starter-guide",1794696162,{"doc_id":284,"doc_title":285,"file_type":138,"home_preview_img_url":286,"slug":287,"view_count":81,"category_name":30,"create_tm":288},692283,"Learning React - Second Edition - A Hands-On Guide to Building Web Applications Using React and Redux","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003186963/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=sQEUrZ9kkJ7%2BxVMnqf2AaNl0kbc%3D","learning-react-second-edition-a-hands-on-guide-to-building-web-applications-using-react-and-redux",1794192412,{"doc_id":290,"doc_title":291,"file_type":138,"home_preview_img_url":292,"slug":293,"view_count":81,"category_name":30,"create_tm":294},701084,"R Markdown: The Definitive Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011578502/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=OGfHIFnzJF3DphvWqQrC8dkstT8%3D","r-markdown-the-definitive-guide",1794523292,{"doc_id":296,"doc_title":297,"file_type":138,"home_preview_img_url":298,"slug":299,"view_count":200,"category_name":30,"create_tm":300},400395,"Access to the 'FMP Cloud' and 'Financial Modeling Prep' API - Version 0.1.7 - R package","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229919688286/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=ULmR4z3tEjheG7d3pD8p5RAJT5I%3D","access-to-the-fmp-cloud-and-financial-modeling-prep-api-version-017-r-package",1790510931,{"doc_id":302,"doc_title":303,"file_type":138,"home_preview_img_url":304,"slug":305,"view_count":29,"category_name":30,"create_tm":306},685844,"Markdown By Example - Simple text - sample chapter","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000227784/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112059&Signature=lF4LaGUMHf6QFNVHLAMNkEIEjYc%3D","markdown-by-example-simple-text-sample-chapter",1794019538]