[{"data":1,"prerenderedAt":590},["ShallowReactive",2],{"series-\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api":3,"series-context-\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api":196,"article-link-en-43c95b33-041c-4108-ab98-0d21ef60ed7f":348,"series-chapters-\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api":581},{"id":4,"title":5,"body":6,"contentId":176,"date":177,"description":178,"extension":179,"github":180,"meetTheInstructor":181,"meta":182,"navigation":183,"part":180,"path":184,"rawbody":185,"robots":180,"schemaOrg":180,"seo":186,"seriesSlug":187,"sitemap":188,"stem":189,"subtitle":190,"topics":191,"__hash__":195},"series\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api.md","Empower and Enhance Your VitePress Blog with a Laravel API",{"type":7,"value":8,"toc":171},"minimark",[9,13,16,19,23,34,37,46,49,52,138,141,144,147,160,165],[10,11,12],"p",{},"Hello! 👋",[10,14,15],{},"After building our VitePress blog, we are ready to make it more dynamic with a Laravel API.",[10,17,18],{},"In the previous series, we explored VitePress from the initial project setup to deployment on Cloudflare Pages. We built a functional, automated blog with SEO metadata, Open Graph images, and a GitHub projects page. The blog handled everything at build time, so publishing content was the only task left.",[20,21],"callout-read-more",{"id":22},"43c95b33-041c-4108-ab98-0d21ef60ed7f",[10,24,25,26,33],{},"This series introduces back-end development by creating a ",[27,28,32],"a",{"href":29,"rel":30},"https:\u002F\u002Flaravel.com",[31],"nofollow","Laravel"," API that gives our blog a few interactive features.",[10,35,36],{},"Until now, our blog has been mostly static. Content was generated at build time, with a small amount of data loaded dynamically, and the resulting HTML files were distributed through a CDN. By adding a Laravel API, we will let readers interact with the blog through features such as post reactions and comments.",[10,38,39,40,45],{},"Although the focus is on the back end, we will also integrate the API into our VitePress blog. We will use Vue.js and ",[27,41,44],{"href":42,"rel":43},"https:\u002F\u002Fpinia-colada.esm.dev\u002F",[31],"Pinia Colada"," as our data-fetching framework. VitePress is a Vue.js application, so we can extend it with the components we need.",[10,47,48],{},"The examples are designed to be easy to follow. Unnecessary complexity and over-engineering are neither desirable nor necessary here. We will focus on simplicity, clarity, and efficiency.",[10,50,51],{},"Throughout the series, we will build a Laravel API and integrate it with our VitePress blog. We will cover:",[53,54,55,63,92,104,110,120,126,132],"ul",{},[56,57,58,62],"li",{},[59,60,61],"strong",{},"Setting up the Laravel project",": Create a new Laravel project and become familiar with its structure.",[56,64,65,68,69,74,75,74,80,85,86,91],{},[59,66,67],{},"Improving the development workflow",": Configure ",[27,70,73],{"href":71,"rel":72},"https:\u002F\u002Flaravel.com\u002Fdocs\u002F11.x\u002Fpint",[31],"Pint",", ",[27,76,79],{"href":77,"rel":78},"https:\u002F\u002Fgithub.com\u002Frectorphp\u002Frector",[31],"Rector",[27,81,84],{"href":82,"rel":83},"https:\u002F\u002Fgithub.com\u002Flarastan\u002Flarastan",[31],"Larastan",", and ",[27,87,90],{"href":88,"rel":89},"https:\u002F\u002Fpestphp.com\u002F",[31],"Pest"," for formatting, refactoring, static analysis, and testing.",[56,93,94,97,98,103],{},[59,95,96],{},"Adding social authentication",": Let users sign in with GitHub through ",[27,99,102],{"href":100,"rel":101},"https:\u002F\u002Flaravel.com\u002Fdocs\u002F11.x\u002Fsocialite",[31],"Laravel Socialite",".",[56,105,106,109],{},[59,107,108],{},"Connecting the applications",": Configure Sanctum, CORS, CSRF protection, and the first requests between the VitePress frontend and the Laravel API.",[56,111,112,115,116,119],{},[59,113,114],{},"Managing authentication state",": Use ",[27,117,44],{"href":42,"rel":118},[31]," to retrieve the current user and log out with an optimistic update.",[56,121,122,125],{},[59,123,124],{},"Building the comment API",": Create the models, relationships, endpoints, validation, authorization, and tests for comments.",[56,127,128,131],{},[59,129,130],{},"Keeping the backend in sync",": Generate post metadata from VitePress and synchronize it with the Laravel database.",[56,133,134,137],{},[59,135,136],{},"Building the comment interface",": Fetch, create, edit, and delete comments from the VitePress frontend.",[10,139,140],{},"By the end of the series, you will have a blog backed by a Laravel API. Readers will be able to sign in with GitHub and leave comments, and the architecture will be ready for additional interactive features.",[10,142,143],{},"Testing is part of the development process and will be included at each stage, so it does not need a dedicated article.",[10,145,146],{},"If you have questions, feedback, or suggestions, feel free to share them in the comments. Your input helps improve the series.",[148,149,152],"callout",{"color":150,"icon":151},"info","i-ph-info-duotone",[10,153,154,155,159],{},"This series assumes prior knowledge of TypeScript, Vue.js, and Laravel. If you are unfamiliar with any of these technologies, review the ",[27,156,158],{"href":157},"\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch","Create a Blog with VitePress and Vue.js from Scratch"," first.",[161,162,164],"h2",{"id":163},"chapters","Chapters",[166,167],"series-chapters-list",{"className":168},[169,170],"mx-auto","max-w-5xl",{"title":172,"searchDepth":173,"depth":173,"links":174},"",2,[175],{"id":163,"depth":173,"text":164},"676d45dd-eb18-42ec-803e-b9d6b7f04b42","2024-11-19","Transform your VitePress blog into a dynamic platform with a Laravel API. Leverage backend API capabilities to create advanced features.","md",null,"I create this series because I love \u003Cstrong>VitePress\u003C\u002Fstrong> and \u003Cstrong>Laravel\u003C\u002Fstrong>. I truly believe that combining the two results in a simple yet \u003Cstrong>powerful solution\u003C\u002Fstrong> for creating a blog. I want to empower developers to enhance their VitePress blogs with a Laravel API to create advanced features.",{},true,"\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api","---\ncontentId: 676d45dd-eb18-42ec-803e-b9d6b7f04b42\ntitle: Empower and Enhance Your VitePress Blog with a Laravel API\nsubtitle: Transform your VitePress blog into a dynamic platform with an API\ndescription: Transform your VitePress blog into a dynamic platform with a Laravel API. Leverage backend API capabilities to create advanced features.\ndate: 2024-11-19\ntopics:\n  - laravel\n  - vitepress\n  - api\nmeetTheInstructor: I create this series because I love \u003Cstrong>VitePress\u003C\u002Fstrong> and \u003Cstrong>Laravel\u003C\u002Fstrong>. I truly believe that combining the two results in a simple yet \u003Cstrong>powerful solution\u003C\u002Fstrong> for creating a blog. I want to empower developers to enhance their VitePress blogs with a Laravel API to create advanced features.\nseriesSlug: empower-and-dynamize-our-vitepress-blog-with-a-laravel-api\n---\n\nHello! 👋\n\nAfter building our VitePress blog, we are ready to make it more dynamic with a Laravel API.\n\nIn the previous series, we explored VitePress from the initial project setup to deployment on Cloudflare Pages. We built a functional, automated blog with SEO metadata, Open Graph images, and a GitHub projects page. The blog handled everything at build time, so publishing content was the only task left.\n\n\u003CCalloutReadMore id=\"43c95b33-041c-4108-ab98-0d21ef60ed7f\" \u002F>\n\nThis series introduces back-end development by creating a [Laravel](https:\u002F\u002Flaravel.com) API that gives our blog a few interactive features.\n\nUntil now, our blog has been mostly static. Content was generated at build time, with a small amount of data loaded dynamically, and the resulting HTML files were distributed through a CDN. By adding a Laravel API, we will let readers interact with the blog through features such as post reactions and comments.\n\nAlthough the focus is on the back end, we will also integrate the API into our VitePress blog. We will use Vue.js and [Pinia Colada](https:\u002F\u002Fpinia-colada.esm.dev\u002F) as our data-fetching framework. VitePress is a Vue.js application, so we can extend it with the components we need.\n\nThe examples are designed to be easy to follow. Unnecessary complexity and over-engineering are neither desirable nor necessary here. We will focus on simplicity, clarity, and efficiency.\n\nThroughout the series, we will build a Laravel API and integrate it with our VitePress blog. We will cover:\n\n- **Setting up the Laravel project**: Create a new Laravel project and become familiar with its structure.\n- **Improving the development workflow**: Configure [Pint](https:\u002F\u002Flaravel.com\u002Fdocs\u002F11.x\u002Fpint), [Rector](https:\u002F\u002Fgithub.com\u002Frectorphp\u002Frector), [Larastan](https:\u002F\u002Fgithub.com\u002Flarastan\u002Flarastan), and [Pest](https:\u002F\u002Fpestphp.com\u002F) for formatting, refactoring, static analysis, and testing.\n- **Adding social authentication**: Let users sign in with GitHub through [Laravel Socialite](https:\u002F\u002Flaravel.com\u002Fdocs\u002F11.x\u002Fsocialite).\n- **Connecting the applications**: Configure Sanctum, CORS, CSRF protection, and the first requests between the VitePress frontend and the Laravel API.\n- **Managing authentication state**: Use [Pinia Colada](https:\u002F\u002Fpinia-colada.esm.dev\u002F) to retrieve the current user and log out with an optimistic update.\n- **Building the comment API**: Create the models, relationships, endpoints, validation, authorization, and tests for comments.\n- **Keeping the backend in sync**: Generate post metadata from VitePress and synchronize it with the Laravel database.\n- **Building the comment interface**: Fetch, create, edit, and delete comments from the VitePress frontend.\n\nBy the end of the series, you will have a blog backed by a Laravel API. Readers will be able to sign in with GitHub and leave comments, and the architecture will be ready for additional interactive features.\n\nTesting is part of the development process and will be included at each stage, so it does not need a dedicated article.\n\nIf you have questions, feedback, or suggestions, feel free to share them in the comments. Your input helps improve the series.\n\n::callout{icon=\"i-ph-info-duotone\" color=\"info\"}\nThis series assumes prior knowledge of TypeScript, Vue.js, and Laravel. If you are unfamiliar with any of these technologies, review the [Create a Blog with VitePress and Vue.js from Scratch](\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch) first.\n::\n\n## Chapters\n\n::series-chapters-list\n---\nclass: mx-auto max-w-5xl\n---\n::\n",{"title":5,"description":178},"empower-and-dynamize-our-vitepress-blog-with-a-laravel-api",{"loc":184},"series\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api","Transform your VitePress blog into a dynamic platform with an API",[192,193,194],"laravel","vitepress","api","JLBtX9BKfN72BkhcYisEXraNGTvZSnT5YHM05A_uemk",{"overview":197,"chapters":300},{"id":4,"title":5,"body":198,"contentId":176,"date":177,"description":178,"extension":179,"github":180,"meetTheInstructor":181,"meta":296,"navigation":183,"part":180,"path":184,"rawbody":185,"robots":180,"schemaOrg":180,"seo":297,"seriesSlug":187,"sitemap":298,"stem":189,"subtitle":190,"topics":299,"__hash__":195},{"type":7,"value":199,"toc":293},[200,202,204,206,208,213,215,220,222,224,276,278,280,282,288,290],[10,201,12],{},[10,203,15],{},[10,205,18],{},[20,207],{"id":22},[10,209,25,210,33],{},[27,211,32],{"href":29,"rel":212},[31],[10,214,36],{},[10,216,39,217,45],{},[27,218,44],{"href":42,"rel":219},[31],[10,221,48],{},[10,223,51],{},[53,225,226,230,246,253,257,264,268,272],{},[56,227,228,62],{},[59,229,61],{},[56,231,232,68,234,74,237,74,240,85,243,91],{},[59,233,67],{},[27,235,73],{"href":71,"rel":236},[31],[27,238,79],{"href":77,"rel":239},[31],[27,241,84],{"href":82,"rel":242},[31],[27,244,90],{"href":88,"rel":245},[31],[56,247,248,97,250,103],{},[59,249,96],{},[27,251,102],{"href":100,"rel":252},[31],[56,254,255,109],{},[59,256,108],{},[56,258,259,115,261,119],{},[59,260,114],{},[27,262,44],{"href":42,"rel":263},[31],[56,265,266,125],{},[59,267,124],{},[56,269,270,131],{},[59,271,130],{},[56,273,274,137],{},[59,275,136],{},[10,277,140],{},[10,279,143],{},[10,281,146],{},[148,283,284],{"color":150,"icon":151},[10,285,154,286,159],{},[27,287,158],{"href":157},[161,289,164],{"id":163},[166,291],{"className":292},[169,170],{"title":172,"searchDepth":173,"depth":173,"links":294},[295],{"id":163,"depth":173,"text":164},{},{"title":5,"description":178},{"loc":184},[192,193,194],[301,307,312,318,324,330,336,342],{"contentId":302,"title":303,"description":304,"path":305,"part":306,"github":180,"topics":180},"06469e25-715e-4a92-87b9-0db6db845a50","Setting Up Your Laravel Project Structure and Essentials","A comprehensive guide to setting up your Laravel project and understanding its structure for a better development experience.","\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api\u002Fsetting-up-your-laravel-project-structure-and-essentials",1,{"contentId":308,"title":309,"description":310,"path":311,"part":173,"github":180,"topics":180},"d566d5f4-3c4a-44e5-89cb-b3c547673ffa","Pint, Rector, Larastan, and Pest: Essentials for Success","Explore the four indispensable tools for maintaining code quality and consistency in Laravel projects: Pint, Rector, Larastan, and Pest.","\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api\u002Fpint-larastan-rector-and-pest-essential-for-success",{"contentId":313,"title":314,"description":315,"path":316,"part":317,"github":180,"topics":180},"3729f419-a8b6-486c-a845-ab5ba1a33172","Effortless Social Authentication with Laravel Socialite","Add GitHub authentication to Laravel with Socialite, OAuth callbacks, database synchronization, secure sessions, and test-first development.","\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api\u002Feffortless-social-authentication-with-laravel-socialite",3,{"contentId":319,"title":320,"description":321,"path":322,"part":323,"github":180,"topics":180},"b07ec3b5-ca56-4d14-ae2f-8c0702218293","Building a Simple Comment System for User Engagement","Build a Laravel comment API with models, migrations, resources, policies, form requests, controllers, routes, and comprehensive tests.","\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api\u002Fbuilding-a-simple-comment-system-for-user-engagement",4,{"contentId":325,"title":326,"description":327,"path":328,"part":329,"github":180,"topics":180},"53a607df-d10e-4423-966c-500d2885e6e0","Automating Your Backend to Stay in Sync Effortlessly","Generate frontend metadata with VitePress, synchronize posts with Laravel, and keep the backend database aligned automatically.","\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api\u002Fautomating-your-backend-to-stay-in-sync-effortlessly",5,{"contentId":331,"title":332,"description":333,"path":334,"part":335,"github":180,"topics":180},"e6040e0a-4997-40d6-bde8-332cbca0f307","Bridging the Gap: Connecting Your Frontend and Backend","Connect a VitePress frontend to a Laravel API with Sanctum, CORS, CSRF protection, shared credentials, and a reusable API client.","\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api\u002Fbridging-the-gap-connecting-your-frontend-and-backend",6,{"contentId":337,"title":338,"description":339,"path":340,"part":341,"github":180,"topics":180},"d507f8af-7c76-4660-859e-23af11c0728e","Streamlining User Authentication from Frontend to Backend","Connect frontend authentication to Laravel with a current-user query, GitHub logout flow, Pinia Colada caching, and optimistic state updates.","\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api\u002Fstreamlining-user-authentication-from-frontend-to-backend",7,{"contentId":343,"title":344,"description":345,"path":346,"part":347,"github":180,"topics":180},"1b2a6cc0-c10f-421a-9344-60cb1583a136","Simplifying Comment Querying and Editing with Pinia Colada","Build the VitePress comment interface with Pinia Colada queries, mutations, optimistic updates, reusable Vue components, and permissions.","\u002Fseries\u002Fempower-and-dynamize-our-vitepress-blog-with-a-laravel-api\u002Fsimplifying-comment-querying-and-editing-with-pinia-colada",8,{"id":349,"title":158,"body":350,"contentId":22,"date":563,"description":564,"extension":179,"github":565,"meetTheInstructor":568,"meta":569,"navigation":183,"part":180,"path":157,"rawbody":570,"robots":180,"schemaOrg":180,"seo":571,"seriesSlug":572,"sitemap":573,"stem":576,"subtitle":577,"topics":578,"__hash__":580},"series\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch.md",{"type":7,"value":351,"toc":560},[352,355,370,384,520,531,542,549,552,555,557],[10,353,354],{},"Hello and welcome! 👋",[10,356,357,358,361,362,365,366,369],{},"You're about to embark on the \"Create a ",[59,359,360],{},"Blog"," with ",[59,363,364],{},"VitePress"," and ",[59,367,368],{},"Vue.js"," from Scratch\" series!",[10,371,372,373,379,380,383],{},"Throughout this journey, we will construct a practical blog from the ground up using ",[27,374,377],{"href":375,"rel":376},"https:\u002F\u002Fvitepress.dev\u002F",[31],[59,378,364],{},". We will explore a range of topics from initial configuration to deploying on ",[59,381,382],{},"Cloudflare Pages",", including:",[53,385,386,411,421,427,440,446,456,466,476,488,505,511],{},[56,387,388,391,392,395,396,365,403,410],{},[59,389,390],{},"Getting Started with VitePress: Project Setup and Essentials",": Learn to set up a fresh ",[59,393,394],{},"VitePress project"," by incorporating ",[27,397,400],{"href":398,"rel":399},"https:\u002F\u002Ftailwindcss.com\u002F",[31],[59,401,402],{},"Tailwind CSS",[27,404,407],{"href":405,"rel":406},"https:\u002F\u002Fgithub.com\u002Funplugin\u002Funplugin-vue-components",[31],[59,408,409],{},"unplugin-vue-components"," for an enhanced development process.",[56,412,413,416,417],{},[59,414,415],{},"From Default to Custom: Building a VitePress Blog Theme",": We will entirely remove the default theme and create a personalized theme. ",[418,419,420],"em",{},"You'll be surprised by its simplicity!",[56,422,423,426],{},[59,424,425],{},"Optimize Your VitePress Blog's Architecture Design",": Discover how to organize code and design your blog for scalability and maintainability.",[56,428,429,432,433,103],{},[59,430,431],{},"Implementing Blog Index with VitePress and Tailwind CSS",": Create a list of blog posts. This will introduce ",[27,434,437],{"href":435,"rel":436},"https:\u002F\u002Fvitepress.dev\u002Fguide\u002Fdata-loading",[31],[59,438,439],{},"data loaders from VitePress",[56,441,442,445],{},[59,443,444],{},"Single Blog Rendering in VitePress with Tailwind Typography",": Create a page dedicated to reading each blog post.",[56,447,448,451,452,455],{},[59,449,450],{},"Deploy VitePress Blog Globally with Cloudflare Pages",": Integrate ",[59,453,454],{},"SEO metadata"," for improved search engine visibility, eliminating the need for manual updates.",[56,457,458,461,462,465],{},[59,459,460],{},"Showcase Your GitHub Projects on Your VitePress Blog",": Develop a page to display your ",[59,463,464],{},"GitHub"," endeavors, extending the use of data loaders and demonstrating their flexibility.",[56,467,468,471,472,475],{},[59,469,470],{},"Creating Open Graph Images Automatically for Each Blog Post",": Efficiently create ",[59,473,474],{},"Open Graph images"," for each post, saving time and enhancing appeal.",[56,477,478,480,481,487],{},[59,479,450],{},": Seamlessly deploy your blog to ",[27,482,485],{"href":483,"rel":484},"https:\u002F\u002Fpages.cloudflare.com\u002F",[31],[59,486,382],{},", achieving this in just a few clicks!",[56,489,490,493,494,361,497,504],{},[59,491,492],{},"Ensure Blog Quality with Playwright Automated Testing",": Implement ",[59,495,496],{},"end-to-end testing",[27,498,501],{"href":499,"rel":500},"https:\u002F\u002Fplaywright.dev\u002F",[31],[59,502,503],{},"Playwright"," to ensure your blog functions as expected.",[56,506,507,510],{},[59,508,509],{},"An Internal Refactor for the Future Growth of our Blog",": Prepare your blog for future growth by refactoring the codebase, ensuring it remains maintainable and scalable.",[56,512,513,516,517,519],{},[59,514,515],{},"Migrating Our VitePress Blog to Tailwind CSS Version 4",": Upgrade our blog to the latest version of ",[59,518,402],{}," to leverage its new features and improvements.",[10,521,522,523,526,527,530],{},"By the conclusion, you will possess a fully operational and captivating ",[59,524,525],{},"blog",", allowing you to concentrate exclusively on producing ",[59,528,529],{},"content",", which is paramount. Simply write and publish, as the blog will autonomously manage the rest.",[532,533,534,539],"figure",{},[535,536],"img",{"alt":537,"src":538},"Home Page of our Blog","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages\u002Fvitepress-home.png",[540,541,537],"figcaption",{},[10,543,544,545,548],{},"This series offers a detailed, step-by-step ",[59,546,547],{},"guide",". Rest assured, each aspect will be thoroughly elucidated, from selecting to implementing every feature. While each feature will be minimal and focused on the core, this does not mean we will forgo creating a visually pleasing and functional blog.",[10,550,551],{},"Should you have any inquiries, please feel free to engage in the comments section under each article.",[10,553,554],{},"I hope you find this series truly enjoyable! 🚀",[161,556,164],{"id":163},[166,558],{"className":559},[169,170],{"title":172,"searchDepth":173,"depth":173,"links":561},[562],{"id":163,"depth":173,"text":164},"2024-10-10","Build a dynamic blog with VitePress and Vue.js from scratch. Learn setup, SEO, and deployment for a seamless blogging experience.",{"name":566,"repository":567},"garabit","barbapapazes\u002Fgarabit","I create this series because \u003Cstrong>VitePress\u003C\u002Fstrong> is way more powerful than it seems at the first glance. I was amazed by the \u003Cstrong>flexibility\u003C\u002Fstrong> and the \u003Cstrong>simplicity\u003C\u002Fstrong> of the tool while building my blog and wanted the community to know about it.",{},"---\ncontentId: 43c95b33-041c-4108-ab98-0d21ef60ed7f\ntitle: Create a Blog with VitePress and Vue.js from Scratch\nsubtitle: A new perspective on blogging with VitePress and Vue.js\ndescription: Build a dynamic blog with VitePress and Vue.js from scratch. Learn setup, SEO, and deployment for a seamless blogging experience.\ndate: 2024-10-10\ntopics:\n  - vuejs\n  - vitepress\n  - blog\ngithub:\n  name: garabit\n  repository: barbapapazes\u002Fgarabit\nmeetTheInstructor: I create this series because \u003Cstrong>VitePress\u003C\u002Fstrong> is way more powerful than it seems at the first glance. I was amazed by the \u003Cstrong>flexibility\u003C\u002Fstrong> and the \u003Cstrong>simplicity\u003C\u002Fstrong> of the tool while building my blog and wanted the community to know about it.\nseriesSlug: create-a-blog-with-vitepress-and-vue-js-from-scratch\n---\n\nHello and welcome! 👋\n\nYou're about to embark on the \"Create a **Blog** with **VitePress** and **Vue.js** from Scratch\" series!\n\nThroughout this journey, we will construct a practical blog from the ground up using [**VitePress**](https:\u002F\u002Fvitepress.dev\u002F). We will explore a range of topics from initial configuration to deploying on **Cloudflare Pages**, including:\n\n- **Getting Started with VitePress: Project Setup and Essentials**: Learn to set up a fresh **VitePress project** by incorporating [**Tailwind CSS**](https:\u002F\u002Ftailwindcss.com\u002F) and [**unplugin-vue-components**](https:\u002F\u002Fgithub.com\u002Funplugin\u002Funplugin-vue-components) for an enhanced development process.\n- **From Default to Custom: Building a VitePress Blog Theme**: We will entirely remove the default theme and create a personalized theme. _You'll be surprised by its simplicity!_\n- **Optimize Your VitePress Blog's Architecture Design**: Discover how to organize code and design your blog for scalability and maintainability.\n- **Implementing Blog Index with VitePress and Tailwind CSS**: Create a list of blog posts. This will introduce [**data loaders from VitePress**](https:\u002F\u002Fvitepress.dev\u002Fguide\u002Fdata-loading).\n- **Single Blog Rendering in VitePress with Tailwind Typography**: Create a page dedicated to reading each blog post.\n- **Deploy VitePress Blog Globally with Cloudflare Pages**: Integrate **SEO metadata** for improved search engine visibility, eliminating the need for manual updates.\n- **Showcase Your GitHub Projects on Your VitePress Blog**: Develop a page to display your **GitHub** endeavors, extending the use of data loaders and demonstrating their flexibility.\n- **Creating Open Graph Images Automatically for Each Blog Post**: Efficiently create **Open Graph images** for each post, saving time and enhancing appeal.\n- **Deploy VitePress Blog Globally with Cloudflare Pages**: Seamlessly deploy your blog to [**Cloudflare Pages**](https:\u002F\u002Fpages.cloudflare.com\u002F), achieving this in just a few clicks!\n- **Ensure Blog Quality with Playwright Automated Testing**: Implement **end-to-end testing** with [**Playwright**](https:\u002F\u002Fplaywright.dev\u002F) to ensure your blog functions as expected.\n- **An Internal Refactor for the Future Growth of our Blog**: Prepare your blog for future growth by refactoring the codebase, ensuring it remains maintainable and scalable.\n- **Migrating Our VitePress Blog to Tailwind CSS Version 4**: Upgrade our blog to the latest version of **Tailwind CSS** to leverage its new features and improvements.\n\nBy the conclusion, you will possess a fully operational and captivating **blog**, allowing you to concentrate exclusively on producing **content**, which is paramount. Simply write and publish, as the blog will autonomously manage the rest.\n\n![Home Page of our Blog](\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages\u002Fvitepress-home.png)\n\nThis series offers a detailed, step-by-step **guide**. Rest assured, each aspect will be thoroughly elucidated, from selecting to implementing every feature. While each feature will be minimal and focused on the core, this does not mean we will forgo creating a visually pleasing and functional blog.\n\nShould you have any inquiries, please feel free to engage in the comments section under each article.\n\nI hope you find this series truly enjoyable! 🚀\n\n## Chapters\n\n::series-chapters-list\n---\nclass: mx-auto max-w-5xl\n---\n::\n",{"title":158,"description":564},"create-a-blog-with-vitepress-and-vue-js-from-scratch",{"loc":157,"images":574},[575],{"loc":538},"series\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch","A new perspective on blogging with VitePress and Vue.js",[579,193,525],"vuejs","H9cubHgLKM0Siblzkwf7mDsFVYr2CLbh_ciFOpQrSVk",[582,583,584,585,586,587,588,589],{"contentId":302,"title":303,"description":304,"path":305,"part":306,"topics":180},{"contentId":308,"title":309,"description":310,"path":311,"part":173,"topics":180},{"contentId":313,"title":314,"description":315,"path":316,"part":317,"topics":180},{"contentId":319,"title":320,"description":321,"path":322,"part":323,"topics":180},{"contentId":325,"title":326,"description":327,"path":328,"part":329,"topics":180},{"contentId":331,"title":332,"description":333,"path":334,"part":335,"topics":180},{"contentId":337,"title":338,"description":339,"path":340,"part":341,"topics":180},{"contentId":343,"title":344,"description":345,"path":346,"part":347,"topics":180},1795016665694]