[{"data":1,"prerenderedAt":1288},["ShallowReactive",2],{"series-\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fgetting-started-with-vitepress-project-setup-and-essentials":3,"series-context-\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch":990},{"id":4,"title":5,"body":6,"contentId":973,"date":974,"description":975,"extension":976,"github":977,"meetTheInstructor":979,"meta":980,"navigation":887,"part":297,"path":981,"rawbody":982,"robots":979,"schemaOrg":979,"seo":983,"seriesSlug":984,"sitemap":985,"stem":988,"subtitle":979,"topics":979,"__hash__":989},"series\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fgetting-started-with-vitepress-project-setup-and-essentials.md","Getting Started with VitePress: Project Setup and Essentials",{"type":7,"value":8,"toc":961},"minimark",[9,28,32,40,46,49,58,63,79,82,185,188,201,204,215,223,228,237,246,250,264,280,283,306,313,341,353,356,370,373,620,624,630,694,701,716,720,723,753,756,759,764,786,789,807,810,814,821,826,842,848,935,938,942,950,957],[10,11,12,13,23,24,27],"p",{},"Before embarking on creating our blog, it is essential to understand what ",[14,15,19],"a",{"href":16,"rel":17},"https:\u002F\u002Fvitepress.dev\u002F",[18],"nofollow",[20,21,22],"strong",{},"VitePress"," is and its origins. Familiarity with the ",[20,25,26],{},"tools"," we utilize for our blog creation is crucial.",[29,30,22],"h2",{"id":31},"vitepress",[10,33,34,35,39],{},"According to the ",[14,36,38],{"href":16,"rel":37},[18],"homepage",":",[41,42,43],"blockquote",{},[10,44,45],{},"Vite & Vue Powered Static Site Generator, Markdown to Beautiful Docs in Minutes",[10,47,48],{},"While the tagline's use of \"docs\" might suggest VitePress is exclusively for documentation websites, it can create any content-centric website.",[10,50,51,52,57],{},"The ",[14,53,56],{"href":54,"rel":55},"https:\u002F\u002Fvitepress.dev\u002Fguide\u002Fwhat-is-vitepress",[18],"\"What is VitePress?\""," section explains:",[41,59,60],{},[10,61,62],{},"VitePress is a Static Site Generator (SSG) designed for building fast, content-centric websites. In a nutshell, VitePress takes your source content written in Markdown, applies a theme to it, and generates static HTML pages that can be easily deployed anywhere.",[10,64,65,66,69,70,73,74,78],{},"In essence, VitePress builds upon a basic ",[20,67,68],{},"Vite"," and ",[20,71,72],{},"Vue"," application, similar to what you could generate with ",[75,76,77],"code",{},"npx create-vite --template vue",". However, VitePress offers much more.",[10,80,81],{},"It introduces three key features to the standard Vite and Vue application:",[83,84,85,123,149],"ol",{},[86,87,88,91,92,95,96,99,100,103,104,99,107,110,111,114,115,122],"li",{},[20,89,90],{},"Markdown Support",": VitePress comes with a pre-configured ",[20,93,94],{},"Markdown to HTML compiler"," based on markdown-it. It inherently supports ",[20,97,98],{},"frontmatter",", ",[20,101,102],{},"syntax highlighting",", GitHub-style alerts, ",[20,105,106],{},"emojis",[20,108,109],{},"Vue components",", and more. It leverages a comprehensive ",[20,112,113],{},"configuration with numerous plugins",". You can review the ",[14,116,119],{"href":117,"rel":118},"https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Fblob\u002Fmain\u002Fsrc\u002Fnode\u002Fmarkdown\u002Fmarkdown.ts",[18],[20,120,121],{},"source code"," for more insight.",[86,124,125,128,129,136,137,140,141,144,145,148],{},[20,126,127],{},"Data Loading",": VitePress enables ",[14,130,133],{"href":131,"rel":132},"https:\u002F\u002Fvitepress.dev\u002Fguide\u002Fdata-loading",[18],[20,134,135],{},"data loading"," from the ",[20,138,139],{},"file system",", networks, or any other sources. This potent feature facilitates the creation of ",[20,142,143],{},"dynamic websites"," using a ",[20,146,147],{},"static site generator",".",[86,150,151,154,155,158,159,162,163,166,167,170,171,174,175,178,179,148],{},[20,152,153],{},"Pre-rendering at Build-time",": VitePress operates as a ",[20,156,157],{},"Single Page Application (SPA)",", enhancing ",[20,160,161],{},"User Experience (UX)"," but challenging ",[20,164,165],{},"Search Engine Optimization (SEO)",". However, due to its markdown-centric ",[20,168,169],{},"static content"," nature, VitePress ",[20,172,173],{},"pre-renders pages during build-time",", resulting in ",[20,176,177],{},"static HTML files",". This approach is excellent for SEO while maintaining SPA benefits for UX. It cleverly employs Server Side Rendering (SSR) capabilities of Vue, which you can observe in the ",[14,180,183],{"href":181,"rel":182},"https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Fblob\u002Fmain\u002Fsrc\u002Fclient\u002Fapp\u002Fssr.ts#L10",[18],[20,184,121],{},[10,186,187],{},"These elements constitute VitePress's foundation, making it ideal for creating blogs, documentation, and other content-focused websites. While it supports dynamic data, that aspect will be explored in another series.",[10,189,190,191,195,196,200],{},"Equipped with a default theme, VitePress facilitates attractive documentation websites. The default theme, available for exploration in the ",[14,192,194],{"href":16,"rel":193},[18],"VitePress documentation"," and its ",[14,197,121],{"href":198,"rel":199},"https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Ftree\u002Fmain\u002Fsrc\u002Fclient\u002Ftheme-default",[18],", is simply a built-in Vue library comprising components, composables, and CSS, easy to override for creating custom themes.",[10,202,203],{},"Understanding the tagline's real implication clarifies why VitePress is chosen for developing a blog; it's a versatile tool for content-centric websites beyond just documentation.",[205,206,207,212],"figure",{},[208,209],"img",{"alt":210,"src":211},"VitePress Architecture","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fgetting-started-with-vitepress-project-setup-and-essentials\u002Fvitepress-architecture.png",[213,214,210],"figcaption",{},[216,217,220],"callout",{"color":218,"icon":219},"info","i-ph-info-duotone",[10,221,222],{},"Attempting to utilize a custom Vite and Vue application is ill-advised. VitePress's complexity and configuration management save considerable time, both now and during future blog updates.",[224,225,227],"h3",{"id":226},"history","History",[10,229,230,231,236],{},"Developed by ",[14,232,235],{"href":233,"rel":234},"https:\u002F\u002Fx.com\u002Fyouyuxi",[18],"Evan You"," alongside Vite, VitePress tested Vite in a real-world setting, ensuring its practicality and user-friendliness. VitePress evolved from its predecessor VuePress, upgrading from Webpack and Vue 2 to Vite and Vue 3, offering significant performance and developer experience enhancements.",[10,238,239,240,245],{},"VitePress is popular for creating documentation sites or blogs like ",[14,241,244],{"href":242,"rel":243},"https:\u002F\u002Fblog.vuejs.org\u002F",[18],"The Vue Point",", the official Vue.js blog. Its thin layer over Vite ensures it remains highly extendable and customizable, with assurances of continued support.",[29,247,249],{"id":248},"initializing-the-project","Initializing the project",[10,251,252,253,256,257,259,260,148],{},"Armed with a better understanding of VitePress, we can initiate a fresh project called \"",[20,254,255],{},"Garabit",".\" You can access the ",[20,258,121],{}," on ",[261,262],"git-hub-link",{"repo":263},"barbapapazes\u002Fgarabit",[10,265,266,267,69,272,148],{},"Despite being initially tailored for documentation sites within existing projects, the installation process could be smoother. I have highlighted this in two pull requests on the VitePress repository: ",[14,268,271],{"href":269,"rel":270},"https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Fpull\u002F4271",[18],"feat(cli): support custom npm scripts prefix",[14,273,276,277],{"href":274,"rel":275},"https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Fpull\u002F4270",[18],"feat(cli): support custom ",[75,278,279],{},"srcDir",[10,281,282],{},"First, create a folder for our project:",[284,285,291],"pre",{"className":286,"code":287,"filename":288,"language":289,"meta":290,"style":290},"language-bash shiki shiki-themes github-light github-light github-dark","mkdir garabit\n","terminal","bash","",[75,292,293],{"__ignoreMap":290},[294,295,298,302],"span",{"class":296,"line":297},"line",1,[294,299,301],{"class":300},"snPdu","mkdir",[294,303,305],{"class":304},"sIIMD"," garabit\n",[10,307,308,309,312],{},"Then, initialize ",[20,310,311],{},"npm"," inside this folder and install VitePress:",[284,314,316],{"className":286,"code":315,"filename":288,"language":289,"meta":290,"style":290},"pnpm init\npnpm add -D vitepress\n",[75,317,318,326],{"__ignoreMap":290},[294,319,320,323],{"class":296,"line":297},[294,321,322],{"class":300},"pnpm",[294,324,325],{"class":304}," init\n",[294,327,329,331,334,338],{"class":296,"line":328},2,[294,330,322],{"class":300},[294,332,333],{"class":304}," add",[294,335,337],{"class":336},"sBjJW"," -D",[294,339,340],{"class":304}," vitepress\n",[216,342,343],{"color":218,"icon":219},[10,344,345,346,352],{},"Throughout this series, I will use ",[14,347,350],{"href":348,"rel":349},"https:\u002F\u002Fpnpm.io\u002F",[18],[75,351,322],{}," as the package manager, but you can adapt the commands for your preferred package manager.",[10,354,355],{},"Finally, scaffold the VitePress project:",[284,357,359],{"className":286,"code":358,"filename":288,"language":289,"meta":290,"style":290},"pnpm vitepress init\n",[75,360,361],{"__ignoreMap":290},[294,362,363,365,368],{"class":296,"line":297},[294,364,322],{"class":300},[294,366,367],{"class":304}," vitepress",[294,369,325],{"class":304},[10,371,372],{},"Respond to the prompts (press enter for default values, which we will adjust later):",[284,374,376],{"className":286,"code":375,"filename":288,"language":289,"meta":290,"style":290},"┌  Welcome to VitePress!\n│\n◇  Where should VitePress initialize the config?\n│  .\u002F\n│\n◇  Site title:\n│  My Awesome Project\n│\n◇  Site description:\n│  A VitePress Site\n│\n◇  Theme:\n│  Default Theme\n│\n◇  Use TypeScript for config and theme files?\n│  Yes\n│\n◇  Add VitePress npm scripts to package.json?\n│  Yes\n│\n└  Done! Now run pnpm run docs:dev and start writing.\n",[75,377,378,392,397,421,430,435,446,460,465,475,488,493,501,512,517,543,551,556,577,584,589],{"__ignoreMap":290},[294,379,380,383,386,389],{"class":296,"line":297},[294,381,382],{"class":300},"┌",[294,384,385],{"class":304},"  Welcome",[294,387,388],{"class":304}," to",[294,390,391],{"class":304}," VitePress!\n",[294,393,394],{"class":296,"line":328},[294,395,396],{"class":300},"│\n",[294,398,400,403,406,409,412,415,418],{"class":296,"line":399},3,[294,401,402],{"class":300},"◇",[294,404,405],{"class":304},"  Where",[294,407,408],{"class":304}," should",[294,410,411],{"class":304}," VitePress",[294,413,414],{"class":304}," initialize",[294,416,417],{"class":304}," the",[294,419,420],{"class":304}," config?\n",[294,422,424,427],{"class":296,"line":423},4,[294,425,426],{"class":300},"│",[294,428,429],{"class":304},"  .\u002F\n",[294,431,433],{"class":296,"line":432},5,[294,434,396],{"class":300},[294,436,438,440,443],{"class":296,"line":437},6,[294,439,402],{"class":300},[294,441,442],{"class":304},"  Site",[294,444,445],{"class":304}," title:\n",[294,447,449,451,454,457],{"class":296,"line":448},7,[294,450,426],{"class":300},[294,452,453],{"class":304},"  My",[294,455,456],{"class":304}," Awesome",[294,458,459],{"class":304}," Project\n",[294,461,463],{"class":296,"line":462},8,[294,464,396],{"class":300},[294,466,468,470,472],{"class":296,"line":467},9,[294,469,402],{"class":300},[294,471,442],{"class":304},[294,473,474],{"class":304}," description:\n",[294,476,478,480,483,485],{"class":296,"line":477},10,[294,479,426],{"class":300},[294,481,482],{"class":304},"  A",[294,484,411],{"class":304},[294,486,487],{"class":304}," Site\n",[294,489,491],{"class":296,"line":490},11,[294,492,396],{"class":300},[294,494,496,498],{"class":296,"line":495},12,[294,497,402],{"class":300},[294,499,500],{"class":304},"  Theme:\n",[294,502,504,506,509],{"class":296,"line":503},13,[294,505,426],{"class":300},[294,507,508],{"class":304},"  Default",[294,510,511],{"class":304}," Theme\n",[294,513,515],{"class":296,"line":514},14,[294,516,396],{"class":300},[294,518,520,522,525,528,531,534,537,540],{"class":296,"line":519},15,[294,521,402],{"class":300},[294,523,524],{"class":304},"  Use",[294,526,527],{"class":304}," TypeScript",[294,529,530],{"class":304}," for",[294,532,533],{"class":304}," config",[294,535,536],{"class":304}," and",[294,538,539],{"class":304}," theme",[294,541,542],{"class":304}," files?\n",[294,544,546,548],{"class":296,"line":545},16,[294,547,426],{"class":300},[294,549,550],{"class":304},"  Yes\n",[294,552,554],{"class":296,"line":553},17,[294,555,396],{"class":300},[294,557,559,561,564,566,569,572,574],{"class":296,"line":558},18,[294,560,402],{"class":300},[294,562,563],{"class":304},"  Add",[294,565,411],{"class":304},[294,567,568],{"class":304}," npm",[294,570,571],{"class":304}," scripts",[294,573,388],{"class":304},[294,575,576],{"class":304}," package.json?\n",[294,578,580,582],{"class":296,"line":579},19,[294,581,426],{"class":300},[294,583,550],{"class":304},[294,585,587],{"class":296,"line":586},20,[294,588,396],{"class":300},[294,590,592,595,598,601,604,607,609,612,614,617],{"class":296,"line":591},21,[294,593,594],{"class":300},"└",[294,596,597],{"class":304},"  Done!",[294,599,600],{"class":304}," Now",[294,602,603],{"class":304}," run",[294,605,606],{"class":304}," pnpm",[294,608,603],{"class":304},[294,610,611],{"class":304}," docs:dev",[294,613,536],{"class":304},[294,615,616],{"class":304}," start",[294,618,619],{"class":304}," writing.\n",[29,621,623],{"id":622},"exploring-the-project","Exploring the project",[10,625,626,627,39],{},"We now have a freshly minted VitePress project. Let's examine the ",[20,628,629],{},"project structure",[284,631,633],{"className":286,"code":632,"filename":288,"language":289,"meta":290,"style":290},".\n├── .vitepress\n│   └── config.mts\n├── api-examples.md\n├── index.md\n├── markdown-examples.md\n├── package.json\n└── pnpm-lock.yaml\n",[75,634,635,640,648,658,665,672,679,686],{"__ignoreMap":290},[294,636,637],{"class":296,"line":297},[294,638,639],{"class":336},".\n",[294,641,642,645],{"class":296,"line":328},[294,643,644],{"class":300},"├──",[294,646,647],{"class":304}," .vitepress\n",[294,649,650,652,655],{"class":296,"line":399},[294,651,426],{"class":300},[294,653,654],{"class":304},"   └──",[294,656,657],{"class":304}," config.mts\n",[294,659,660,662],{"class":296,"line":423},[294,661,644],{"class":300},[294,663,664],{"class":304}," api-examples.md\n",[294,666,667,669],{"class":296,"line":432},[294,668,644],{"class":300},[294,670,671],{"class":304}," index.md\n",[294,673,674,676],{"class":296,"line":437},[294,675,644],{"class":300},[294,677,678],{"class":304}," markdown-examples.md\n",[294,680,681,683],{"class":296,"line":448},[294,682,644],{"class":300},[294,684,685],{"class":304}," package.json\n",[294,687,688,691],{"class":296,"line":462},[294,689,690],{"class":300},"└──",[294,692,693],{"class":304}," pnpm-lock.yaml\n",[10,695,696,697,700],{},"The root level contains our Markdown files, representing our blog's pages, with filenames (and directories) corresponding to page URLs. ",[75,698,699],{},"index.md"," serves as the homepage. Although this structure is basic, we will refine it in future articles.",[10,702,703,704,707,708,711,712,715],{},"Being content-focused, VitePress's configuration and theme-related elements reside within the ",[75,705,706],{},".vitepress"," directory, where the ",[75,709,710],{},"config.mts"," file configures the theme, plugins, data loading, and more, written in ",[20,713,714],{},"TypeScript",". We will delve into this in upcoming articles.",[29,717,719],{"id":718},"enhancing-the-developer-experience-dx","Enhancing the developer experience (DX)",[10,721,722],{},"While suitable for documentation websites, our custom blog requires additional dependencies to enhance the developer experience (DX). We will incorporate two dependencies:",[724,725,726,740],"ul",{},[86,727,728,735,736,739],{},[14,729,732],{"href":730,"rel":731},"https:\u002F\u002Ftailwindcss.com\u002F",[18],[20,733,734],{},"Tailwind CSS",": A utility-first ",[20,737,738],{},"CSS framework"," for efficiently crafting custom designs.",[86,741,742,749,750,148],{},[14,743,746],{"href":744,"rel":745},"https:\u002F\u002Fgithub.com\u002Funplugin\u002Funplugin-vue-components",[18],[20,747,748],{},"unplugin-vue-components",": A Vite plugin for ",[20,751,752],{},"automatic Vue components import",[224,754,734],{"id":755},"tailwind-css",[10,757,758],{},"We will leverage Tailwind CSS for styling our custom theme. This utility-first CSS framework offers powerful, user-friendly design capabilities.",[10,760,761,762,39],{},"Begin by installing ",[20,763,734],{},[284,765,767],{"className":286,"code":766,"filename":288,"language":289,"meta":290,"style":290},"pnpm add -D tailwindcss postcss autoprefixer\n",[75,768,769],{"__ignoreMap":290},[294,770,771,773,775,777,780,783],{"class":296,"line":297},[294,772,322],{"class":300},[294,774,333],{"class":304},[294,776,337],{"class":336},[294,778,779],{"class":304}," tailwindcss",[294,781,782],{"class":304}," postcss",[294,784,785],{"class":304}," autoprefixer\n",[10,787,788],{},"Create the configuration file for Tailwind CSS:",[284,790,792],{"className":286,"code":791,"filename":288,"language":289,"meta":290,"style":290},"npx tailwindcss init -p\n",[75,793,794],{"__ignoreMap":290},[294,795,796,799,801,804],{"class":296,"line":297},[294,797,798],{"class":300},"npx",[294,800,779],{"class":304},[294,802,803],{"class":304}," init",[294,805,806],{"class":336}," -p\n",[10,808,809],{},"We'll configure Tailwind CSS as we progress.",[224,811,813],{"id":812},"auto-import-vue-components","Auto-import Vue components",[10,815,816,817,820],{},"We'll use unplugin-vue-components for automatic Vue component importation, a ",[20,818,819],{},"Vite plugin"," enabling on-demand component importation. This automated process significantly saves time by eliminating manual importation per file. Components are not globally available, mitigating performance impact, as our files are transformed via a rollup plugin, adding an import at the file's top solely if the component is utilized, a testament to the on-demand philosophy.",[10,822,823,824,39],{},"First, install ",[20,825,748],{},[284,827,829],{"className":286,"code":828,"filename":288,"language":289,"meta":290,"style":290},"pnpm add -D unplugin-vue-components\n",[75,830,831],{"__ignoreMap":290},[294,832,833,835,837,839],{"class":296,"line":297},[294,834,322],{"class":300},[294,836,333],{"class":304},[294,838,337],{"class":336},[294,840,841],{"class":304}," unplugin-vue-components\n",[10,843,844,845,847],{},"Then, integrate it into the ",[75,846,710],{}," file:",[284,849,853],{"className":850,"code":851,"filename":710,"language":852,"meta":290,"style":290},"language-typescript shiki shiki-themes github-light github-light github-dark","import Components from 'unplugin-vue-components\u002Fvite'\nimport { defineConfig } from 'vitepress'\n\nexport default defineConfig({\n  \u002F\u002F ...\n  vite: {\n    plugins: [Components()],\n  },\n})\n","typescript",[75,854,855,871,883,889,903,909,914,925,930],{"__ignoreMap":290},[294,856,857,861,865,868],{"class":296,"line":297},[294,858,860],{"class":859},"s8jYJ","import",[294,862,864],{"class":863},"sxrX7"," Components ",[294,866,867],{"class":859},"from",[294,869,870],{"class":304}," 'unplugin-vue-components\u002Fvite'\n",[294,872,873,875,878,880],{"class":296,"line":328},[294,874,860],{"class":859},[294,876,877],{"class":863}," { defineConfig } ",[294,879,867],{"class":859},[294,881,882],{"class":304}," 'vitepress'\n",[294,884,885],{"class":296,"line":399},[294,886,888],{"emptyLinePlaceholder":887},true,"\n",[294,890,891,894,897,900],{"class":296,"line":423},[294,892,893],{"class":859},"export",[294,895,896],{"class":859}," default",[294,898,899],{"class":300}," defineConfig",[294,901,902],{"class":863},"({\n",[294,904,905],{"class":296,"line":432},[294,906,908],{"class":907},"sCsY4","  \u002F\u002F ...\n",[294,910,911],{"class":296,"line":437},[294,912,913],{"class":863},"  vite: {\n",[294,915,916,919,922],{"class":296,"line":448},[294,917,918],{"class":863},"    plugins: [",[294,920,921],{"class":300},"Components",[294,923,924],{"class":863},"()],\n",[294,926,927],{"class":296,"line":462},[294,928,929],{"class":863},"  },\n",[294,931,932],{"class":296,"line":467},[294,933,934],{"class":863},"})\n",[10,936,937],{},"We will configure unplugin-vue-components more thoroughly later.",[29,939,941],{"id":940},"ready-for-the-next-step","Ready for the next step",[10,943,944,945,69,947,949],{},"With our VitePress project now featuring ",[20,946,734],{},[20,948,748],{},", we are poised to begin developing our blog.",[10,951,952,953,956],{},"In the subsequent article, we will examine ",[20,954,955],{},"VitePress fundamentals"," and craft a personalized theme for our blog.",[958,959,960],"style",{},"html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":290,"searchDepth":328,"depth":328,"links":962},[963,966,967,968,972],{"id":31,"depth":328,"text":22,"children":964},[965],{"id":226,"depth":399,"text":227},{"id":248,"depth":328,"text":249},{"id":622,"depth":328,"text":623},{"id":718,"depth":328,"text":719,"children":969},[970,971],{"id":755,"depth":399,"text":734},{"id":812,"depth":399,"text":813},{"id":940,"depth":328,"text":941},"b1b99d95-ac6d-4f25-a121-0851988102a2","2024-10-10","From setup to styling with Tailwind CSS and automatic Vue imports, build your content-driven site effortlessly.","md",{"branch":978},"01.project-initialization",null,{},"\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fgetting-started-with-vitepress-project-setup-and-essentials","---\ncontentId: b1b99d95-ac6d-4f25-a121-0851988102a2\npart: 1\ntitle: \"Getting Started with VitePress: Project Setup and Essentials\"\ndescription: From setup to styling with Tailwind CSS and automatic Vue imports, build your content-driven site effortlessly.\ngithub:\n  branch: 01.project-initialization\ndate: 2024-10-10\nseriesSlug: create-a-blog-with-vitepress-and-vue-js-from-scratch\n---\n\nBefore embarking on creating our blog, it is essential to understand what [**VitePress**](https:\u002F\u002Fvitepress.dev\u002F) is and its origins. Familiarity with the **tools** we utilize for our blog creation is crucial.\n\n## VitePress\n\nAccording to the [homepage](https:\u002F\u002Fvitepress.dev\u002F):\n\n> Vite & Vue Powered Static Site Generator, Markdown to Beautiful Docs in Minutes\n\nWhile the tagline's use of \"docs\" might suggest VitePress is exclusively for documentation websites, it can create any content-centric website.\n\nThe [\"What is VitePress?\"](https:\u002F\u002Fvitepress.dev\u002Fguide\u002Fwhat-is-vitepress) section explains:\n\n> VitePress is a Static Site Generator (SSG) designed for building fast, content-centric websites. In a nutshell, VitePress takes your source content written in Markdown, applies a theme to it, and generates static HTML pages that can be easily deployed anywhere.\n\nIn essence, VitePress builds upon a basic **Vite** and **Vue** application, similar to what you could generate with `npx create-vite --template vue`. However, VitePress offers much more.\n\nIt introduces three key features to the standard Vite and Vue application:\n\n1. **Markdown Support**: VitePress comes with a pre-configured **Markdown to HTML compiler** based on markdown-it. It inherently supports **frontmatter**, **syntax highlighting**, GitHub-style alerts, **emojis**, **Vue components**, and more. It leverages a comprehensive **configuration with numerous plugins**. You can review the [**source code**](https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Fblob\u002Fmain\u002Fsrc\u002Fnode\u002Fmarkdown\u002Fmarkdown.ts) for more insight.\n2. **Data Loading**: VitePress enables [**data loading**](https:\u002F\u002Fvitepress.dev\u002Fguide\u002Fdata-loading) from the **file system**, networks, or any other sources. This potent feature facilitates the creation of **dynamic websites** using a **static site generator**.\n3. **Pre-rendering at Build-time**: VitePress operates as a **Single Page Application (SPA)**, enhancing **User Experience (UX)** but challenging **Search Engine Optimization (SEO)**. However, due to its markdown-centric **static content** nature, VitePress **pre-renders pages during build-time**, resulting in **static HTML files**. This approach is excellent for SEO while maintaining SPA benefits for UX. It cleverly employs Server Side Rendering (SSR) capabilities of Vue, which you can observe in the [**source code**](https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Fblob\u002Fmain\u002Fsrc\u002Fclient\u002Fapp\u002Fssr.ts#L10).\n\nThese elements constitute VitePress's foundation, making it ideal for creating blogs, documentation, and other content-focused websites. While it supports dynamic data, that aspect will be explored in another series.\n\nEquipped with a default theme, VitePress facilitates attractive documentation websites. The default theme, available for exploration in the [VitePress documentation](https:\u002F\u002Fvitepress.dev\u002F) and its [source code](https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Ftree\u002Fmain\u002Fsrc\u002Fclient\u002Ftheme-default), is simply a built-in Vue library comprising components, composables, and CSS, easy to override for creating custom themes.\n\nUnderstanding the tagline's real implication clarifies why VitePress is chosen for developing a blog; it's a versatile tool for content-centric websites beyond just documentation.\n\n![VitePress Architecture](\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fgetting-started-with-vitepress-project-setup-and-essentials\u002Fvitepress-architecture.png)\n\n::callout{icon=\"i-ph-info-duotone\" color=\"info\"}\nAttempting to utilize a custom Vite and Vue application is ill-advised. VitePress's complexity and configuration management save considerable time, both now and during future blog updates.\n::\n\n### History\n\nDeveloped by [Evan You](https:\u002F\u002Fx.com\u002Fyouyuxi) alongside Vite, VitePress tested Vite in a real-world setting, ensuring its practicality and user-friendliness. VitePress evolved from its predecessor VuePress, upgrading from Webpack and Vue 2 to Vite and Vue 3, offering significant performance and developer experience enhancements.\n\nVitePress is popular for creating documentation sites or blogs like [The Vue Point](https:\u002F\u002Fblog.vuejs.org\u002F), the official Vue.js blog. Its thin layer over Vite ensures it remains highly extendable and customizable, with assurances of continued support.\n\n## Initializing the project\n\nArmed with a better understanding of VitePress, we can initiate a fresh project called \"**Garabit**.\" You can access the **source code** on \u003CGitHubLink repo=\"barbapapazes\u002Fgarabit\" \u002F>.\n\nDespite being initially tailored for documentation sites within existing projects, the installation process could be smoother. I have highlighted this in two pull requests on the VitePress repository: [feat(cli): support custom npm scripts prefix](https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Fpull\u002F4271) and [feat(cli): support custom `srcDir`](https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress\u002Fpull\u002F4270).\n\nFirst, create a folder for our project:\n\n```bash [terminal]\nmkdir garabit\n```\n\nThen, initialize **npm** inside this folder and install VitePress:\n\n```bash [terminal]\npnpm init\npnpm add -D vitepress\n```\n\n::callout{icon=\"i-ph-info-duotone\" color=\"info\"}\nThroughout this series, I will use [`pnpm`](https:\u002F\u002Fpnpm.io\u002F) as the package manager, but you can adapt the commands for your preferred package manager.\n::\n\nFinally, scaffold the VitePress project:\n\n```bash [terminal]\npnpm vitepress init\n```\n\nRespond to the prompts (press enter for default values, which we will adjust later):\n\n```bash [terminal]\n┌  Welcome to VitePress!\n│\n◇  Where should VitePress initialize the config?\n│  .\u002F\n│\n◇  Site title:\n│  My Awesome Project\n│\n◇  Site description:\n│  A VitePress Site\n│\n◇  Theme:\n│  Default Theme\n│\n◇  Use TypeScript for config and theme files?\n│  Yes\n│\n◇  Add VitePress npm scripts to package.json?\n│  Yes\n│\n└  Done! Now run pnpm run docs:dev and start writing.\n```\n\n## Exploring the project\n\nWe now have a freshly minted VitePress project. Let's examine the **project structure**:\n\n```bash [terminal]\n.\n├── .vitepress\n│   └── config.mts\n├── api-examples.md\n├── index.md\n├── markdown-examples.md\n├── package.json\n└── pnpm-lock.yaml\n```\n\nThe root level contains our Markdown files, representing our blog's pages, with filenames (and directories) corresponding to page URLs. `index.md` serves as the homepage. Although this structure is basic, we will refine it in future articles.\n\nBeing content-focused, VitePress's configuration and theme-related elements reside within the `.vitepress` directory, where the `config.mts` file configures the theme, plugins, data loading, and more, written in **TypeScript**. We will delve into this in upcoming articles.\n\n## Enhancing the developer experience (DX)\n\nWhile suitable for documentation websites, our custom blog requires additional dependencies to enhance the developer experience (DX). We will incorporate two dependencies:\n\n- [**Tailwind CSS**](https:\u002F\u002Ftailwindcss.com\u002F): A utility-first **CSS framework** for efficiently crafting custom designs.\n- [**unplugin-vue-components**](https:\u002F\u002Fgithub.com\u002Funplugin\u002Funplugin-vue-components): A Vite plugin for **automatic Vue components import**.\n\n### Tailwind CSS\n\nWe will leverage Tailwind CSS for styling our custom theme. This utility-first CSS framework offers powerful, user-friendly design capabilities.\n\nBegin by installing **Tailwind CSS**:\n\n```bash [terminal]\npnpm add -D tailwindcss postcss autoprefixer\n```\n\nCreate the configuration file for Tailwind CSS:\n\n```bash [terminal]\nnpx tailwindcss init -p\n```\n\nWe'll configure Tailwind CSS as we progress.\n\n### Auto-import Vue components\n\nWe'll use unplugin-vue-components for automatic Vue component importation, a **Vite plugin** enabling on-demand component importation. This automated process significantly saves time by eliminating manual importation per file. Components are not globally available, mitigating performance impact, as our files are transformed via a rollup plugin, adding an import at the file's top solely if the component is utilized, a testament to the on-demand philosophy.\n\nFirst, install **unplugin-vue-components**:\n\n```bash [terminal]\npnpm add -D unplugin-vue-components\n```\n\nThen, integrate it into the `config.mts` file:\n\n```typescript [config.mts]\nimport Components from 'unplugin-vue-components\u002Fvite'\nimport { defineConfig } from 'vitepress'\n\nexport default defineConfig({\n  \u002F\u002F ...\n  vite: {\n    plugins: [Components()],\n  },\n})\n```\n\nWe will configure unplugin-vue-components more thoroughly later.\n\n## Ready for the next step\n\nWith our VitePress project now featuring **Tailwind CSS** and **unplugin-vue-components**, we are poised to begin developing our blog.\n\nIn the subsequent article, we will examine **VitePress fundamentals** and craft a personalized theme for our blog.\n",{"title":5,"description":975},"create-a-blog-with-vitepress-and-vue-js-from-scratch",{"loc":981,"images":986},[987],{"loc":211},"series\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fgetting-started-with-vitepress-project-setup-and-essentials","Y7RkgK0kRljU8ykQ2kAWU-2ErrepNjCtLobt4w92Y7M",{"overview":991,"chapters":1217},{"id":992,"title":993,"body":994,"contentId":1200,"date":974,"description":1201,"extension":976,"github":1202,"meetTheInstructor":1204,"meta":1205,"navigation":887,"part":979,"path":1206,"rawbody":1207,"robots":979,"schemaOrg":979,"seo":1208,"seriesSlug":984,"sitemap":1209,"stem":1212,"subtitle":1213,"topics":1214,"__hash__":1216},"series\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch.md","Create a Blog with VitePress and Vue.js from Scratch",{"type":7,"value":995,"toc":1197},[996,999,1012,1025,1155,1166,1174,1181,1184,1187,1191],[10,997,998],{},"Hello and welcome! 👋",[10,1000,1001,1002,1005,1006,69,1008,1011],{},"You're about to embark on the \"Create a ",[20,1003,1004],{},"Blog"," with ",[20,1007,22],{},[20,1009,1010],{},"Vue.js"," from Scratch\" series!",[10,1013,1014,1015,1020,1021,1024],{},"Throughout this journey, we will construct a practical blog from the ground up using ",[14,1016,1018],{"href":16,"rel":1017},[18],[20,1019,22],{},". We will explore a range of topics from initial configuration to deploying on ",[20,1022,1023],{},"Cloudflare Pages",", including:",[724,1026,1027,1047,1057,1063,1075,1081,1091,1101,1111,1123,1140,1146],{},[86,1028,1029,1031,1032,1035,1036,69,1041,1046],{},[20,1030,5],{},": Learn to set up a fresh ",[20,1033,1034],{},"VitePress project"," by incorporating ",[14,1037,1039],{"href":730,"rel":1038},[18],[20,1040,734],{},[14,1042,1044],{"href":744,"rel":1043},[18],[20,1045,748],{}," for an enhanced development process.",[86,1048,1049,1052,1053],{},[20,1050,1051],{},"From Default to Custom: Building a VitePress Blog Theme",": We will entirely remove the default theme and create a personalized theme. ",[1054,1055,1056],"em",{},"You'll be surprised by its simplicity!",[86,1058,1059,1062],{},[20,1060,1061],{},"Optimize Your VitePress Blog's Architecture Design",": Discover how to organize code and design your blog for scalability and maintainability.",[86,1064,1065,1068,1069,148],{},[20,1066,1067],{},"Implementing Blog Index with VitePress and Tailwind CSS",": Create a list of blog posts. This will introduce ",[14,1070,1072],{"href":131,"rel":1071},[18],[20,1073,1074],{},"data loaders from VitePress",[86,1076,1077,1080],{},[20,1078,1079],{},"Single Blog Rendering in VitePress with Tailwind Typography",": Create a page dedicated to reading each blog post.",[86,1082,1083,1086,1087,1090],{},[20,1084,1085],{},"Deploy VitePress Blog Globally with Cloudflare Pages",": Integrate ",[20,1088,1089],{},"SEO metadata"," for improved search engine visibility, eliminating the need for manual updates.",[86,1092,1093,1096,1097,1100],{},[20,1094,1095],{},"Showcase Your GitHub Projects on Your VitePress Blog",": Develop a page to display your ",[20,1098,1099],{},"GitHub"," endeavors, extending the use of data loaders and demonstrating their flexibility.",[86,1102,1103,1106,1107,1110],{},[20,1104,1105],{},"Creating Open Graph Images Automatically for Each Blog Post",": Efficiently create ",[20,1108,1109],{},"Open Graph images"," for each post, saving time and enhancing appeal.",[86,1112,1113,1115,1116,1122],{},[20,1114,1085],{},": Seamlessly deploy your blog to ",[14,1117,1120],{"href":1118,"rel":1119},"https:\u002F\u002Fpages.cloudflare.com\u002F",[18],[20,1121,1023],{},", achieving this in just a few clicks!",[86,1124,1125,1128,1129,1005,1132,1139],{},[20,1126,1127],{},"Ensure Blog Quality with Playwright Automated Testing",": Implement ",[20,1130,1131],{},"end-to-end testing",[14,1133,1136],{"href":1134,"rel":1135},"https:\u002F\u002Fplaywright.dev\u002F",[18],[20,1137,1138],{},"Playwright"," to ensure your blog functions as expected.",[86,1141,1142,1145],{},[20,1143,1144],{},"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.",[86,1147,1148,1151,1152,1154],{},[20,1149,1150],{},"Migrating Our VitePress Blog to Tailwind CSS Version 4",": Upgrade our blog to the latest version of ",[20,1153,734],{}," to leverage its new features and improvements.",[10,1156,1157,1158,1161,1162,1165],{},"By the conclusion, you will possess a fully operational and captivating ",[20,1159,1160],{},"blog",", allowing you to concentrate exclusively on producing ",[20,1163,1164],{},"content",", which is paramount. Simply write and publish, as the blog will autonomously manage the rest.",[205,1167,1168,1172],{},[208,1169],{"alt":1170,"src":1171},"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",[213,1173,1170],{},[10,1175,1176,1177,1180],{},"This series offers a detailed, step-by-step ",[20,1178,1179],{},"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,1182,1183],{},"Should you have any inquiries, please feel free to engage in the comments section under each article.",[10,1185,1186],{},"I hope you find this series truly enjoyable! 🚀",[29,1188,1190],{"id":1189},"chapters","Chapters",[1192,1193],"series-chapters-list",{"className":1194},[1195,1196],"mx-auto","max-w-5xl",{"title":290,"searchDepth":328,"depth":328,"links":1198},[1199],{"id":1189,"depth":328,"text":1190},"43c95b33-041c-4108-ab98-0d21ef60ed7f","Build a dynamic blog with VitePress and Vue.js from scratch. Learn setup, SEO, and deployment for a seamless blogging experience.",{"name":1203,"repository":263},"garabit","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.",{},"\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch","---\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":993,"description":1201},{"loc":1206,"images":1210},[1211],{"loc":1171},"series\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch","A new perspective on blogging with VitePress and Vue.js",[1215,31,1160],"vuejs","H9cubHgLKM0Siblzkwf7mDsFVYr2CLbh_ciFOpQrSVk",[1218,1220,1226,1232,1238,1244,1251,1257,1263,1269,1275,1282],{"contentId":973,"title":5,"description":975,"path":981,"part":297,"github":1219,"topics":979},{"branch":978},{"contentId":1221,"title":1051,"description":1222,"path":1223,"part":328,"github":1224,"topics":979},"172f2a41-2f7c-44e9-855d-322adc536279","Step-by-step VitePress theme customization: guide to building a unique theme layout, adding Markdown content, and removing defaults.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Ffrom-default-to-custom-building-a-vitepress-blog-theme",{"branch":1225},"02.the-basics-for-a-custom-theme",{"contentId":1227,"title":1061,"description":1228,"path":1229,"part":399,"github":1230,"topics":979},"900d11a5-ff68-4cc9-8ace-66a5cb1577fa","Discover how to optimize your VitePress blog's architecture design with scalable solutions and efficient Vite plugin integration.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Foptimize-your-vitepress-blog-architecture-design",{"branch":1231},"03.define-the-design-of-the-blog-architecture",{"contentId":1233,"title":1067,"description":1234,"path":1235,"part":423,"github":1236,"topics":979},"4d93a3c5-f3ff-4ff6-a569-5234ef805850","Learn to create a list of blog articles using VitePress, a crucial feature for any content-centric website. Utilize data loaders to load articles.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fimplementing-blog-index-with-vitepress-and-tailwind-css",{"branch":1237},"04.comprehensive-guide-to-listing-blog-articles",{"contentId":1239,"title":1079,"description":1240,"path":1241,"part":432,"github":1242,"topics":979},"15b9a49c-b9fb-4d76-a08d-2acaf55ff205","Enhance your VitePress blog with Tailwind Typography. Learn to render markdown beautifully with syntax highlights.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fsingle-blog-rendering-in-vitepress-with-tailwind-typography",{"branch":1243},"05.read-a-single-blog-article",{"contentId":1245,"title":1246,"description":1247,"path":1248,"part":437,"github":1249,"topics":979},"66af9aaf-d6d3-4151-a51b-806835988340","Enhance Website Visibility: SEO Metadata and Sitemap","Enhance website traffic through strategic SEO metadata and sitemaps for improved indexing. Learn how to automate metadata generation for each page.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fenhance-website-visibility-seo-metadata-and-sitemap",{"branch":1250},"06.seo-metadata-and-sitemap",{"contentId":1252,"title":1095,"description":1253,"path":1254,"part":448,"github":1255,"topics":979},"a4a933b8-07a5-4587-ad54-c3f9e30cbf45","Enhance your VitePress blog with GitHub projects. Learn API data retrieval and how to display your projects on your blog.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fshowcase-your-github-projects-on-your-vitepress-blog",{"branch":1256},"07.showcase-your-github-projects",{"contentId":1258,"title":1105,"description":1259,"path":1260,"part":462,"github":1261,"topics":979},"c76a349e-a495-4890-ab05-3e8b6bb90add","Learn how to dynamically generate Open Graph images for each blog post, enhancing the visual appeal when sharing content on social media.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fcreating-open-graph-images-automatically-for-each-blog-post",{"branch":1262},"08.automatically-generated-open-graph-images",{"contentId":1264,"title":1085,"description":1265,"path":1266,"part":467,"github":1267,"topics":979},"c05ae463-c5ae-4c43-872d-bb05263c7f74","Deploy the blog to Cloudflare Pages for global accessibility. Discover how to deploy the blog to Cloudflare Pages and share it worldwide with ease.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages",{"branch":1268},"09.share-the-blog-globally",{"contentId":1270,"title":1127,"description":1271,"path":1272,"part":477,"github":1273,"topics":979},"aa5392e0-6287-4673-9365-34313f0af1fa","Enhance web development with Playwright-induced automated testing. Elevate blog quality through comprehensive end-to-end and SEO tests.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fensure-blog-quality-with-playwright-automated-testing",{"branch":1274},"10.automate-testing",{"contentId":1276,"title":1277,"description":1278,"path":1279,"part":490,"github":1280,"topics":979},"5b1b6117-14f0-4f1d-ba13-5b3583f341bf","An Internal Refactor for the Future Growth of Our Blog","Prepare your blog for future growth by refactoring the codebase to ensure it remains maintainable and scalable.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fan-internal-refactor-for-the-future-growth-of-our-blog",{"branch":1281},"11.internal-refactor",{"contentId":1283,"title":1150,"description":1284,"path":1285,"part":495,"github":1286,"topics":979},"3499bbd1-20a6-43f0-9bb7-be1da2bb6eac","A step-by-step guide on upgrading our VitePress blog to Tailwind CSS 4.0 to leverage its latest features and improvements.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fmigrating-our-vitepress-blog-to-tailwind-css-version-4",{"branch":1287},"12.migration-to-tailwind-css-4",1795016691828]