[{"data":1,"prerenderedAt":1263},["ShallowReactive",2],{"series-\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Ffrom-default-to-custom-building-a-vitepress-blog-theme":3,"series-context-\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch":958},{"id":4,"title":5,"body":6,"contentId":942,"date":943,"description":944,"extension":442,"github":945,"meetTheInstructor":947,"meta":948,"navigation":173,"part":157,"path":949,"rawbody":950,"robots":947,"schemaOrg":947,"seo":951,"seriesSlug":952,"sitemap":953,"stem":956,"subtitle":947,"topics":947,"__hash__":957},"series\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Ffrom-default-to-custom-building-a-vitepress-blog-theme.md","From Default to Custom: Building a VitePress Blog Theme",{"type":7,"value":8,"toc":932},"minimark",[9,32,43,48,51,80,99,107,126,206,222,227,236,297,304,323,336,343,346,350,364,428,438,459,493,533,536,544,553,559,563,569,575,607,618,624,923,928],[10,11,12,13,18,19,23,24,27,28,31],"p",{},"In ",[14,15,17],"a",{"href":16},"\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fgetting-started-with-vitepress-project-setup-and-essentials","the previous article",", we initialized our project using the ",[20,21,22],"strong",{},"VitePress template",". By default, VitePress comes with a built-in theme designed for creating documentation websites. However, we aim to develop a ",[20,25,26],{},"blog"," site, necessitating the creation of a ",[20,29,30],{},"custom theme",".",[33,34,35,40],"figure",{},[36,37],"img",{"alt":38,"src":39},"Default VitePress Theme, not suitable for our blog site.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Ffrom-default-to-custom-building-a-vitepress-blog-theme\u002Fvitepress-default-theme.png",[41,42,38],"figcaption",{},[44,45,47],"h2",{"id":46},"custom-theme","Custom theme",[10,49,50],{},"To construct a custom theme, two files need to be created:",[52,53,54,70],"ul",{},[55,56,57,61,62,65,66,69],"li",{},[58,59,60],"code",{},"src\u002F.vitepress\u002Ftheme\u002Findex.ts",": This serves as the entry point for our custom theme, comparable to the ",[58,63,64],{},"main.ts"," file in a ",[20,67,68],{},"Vite + Vue"," project.",[55,71,72,75,76,79],{},[58,73,74],{},"src\u002F.vitepress\u002Ftheme\u002FLayout.vue",": This file constitutes the main Vue component of our custom theme, analogous to the ",[58,77,78],{},"App.vue"," file in a Vite + Vue project.",[10,81,82,83,86,87,90,91,94,95],{},"We've established a ",[58,84,85],{},"theme"," folder within the ",[58,88,89],{},".vitepress"," directory. This is the designated location for all files associated with our custom theme. It can be viewed similarly to the ",[58,92,93],{},"src"," folder in a Vite + Vue project and will adopt a parallel structure. ",[96,97,98],"em",{},"Further explanation will be provided in the forthcoming article.",[100,101,103,104],"h3",{"id":102},"file-indexts","File ",[58,105,106],{},"index.ts",[10,108,109,110,112,113,116,117,65,119,121,122,125],{},"The ",[58,111,106],{}," file is automatically recognized by ",[20,114,115],{},"VitePress"," and, like the ",[58,118,64],{},[20,120,68],{}," project, it is required to load the ",[58,123,124],{},"Layout.vue"," file.",[127,128,133],"pre",{"className":129,"code":130,"filename":124,"language":131,"meta":132,"style":132},"language-ts shiki shiki-themes github-light github-light github-dark","import { Theme } from 'vitepress'\nimport Layout from '.\u002FLayout.vue'\n\nexport default {\n  Layout,\n} satisfies Theme\n","ts","",[58,134,135,155,168,175,187,193],{"__ignoreMap":132},[136,137,140,144,148,151],"span",{"class":138,"line":139},"line",1,[136,141,143],{"class":142},"s8jYJ","import",[136,145,147],{"class":146},"sxrX7"," { Theme } ",[136,149,150],{"class":142},"from",[136,152,154],{"class":153},"sIIMD"," 'vitepress'\n",[136,156,158,160,163,165],{"class":138,"line":157},2,[136,159,143],{"class":142},[136,161,162],{"class":146}," Layout ",[136,164,150],{"class":142},[136,166,167],{"class":153}," '.\u002FLayout.vue'\n",[136,169,171],{"class":138,"line":170},3,[136,172,174],{"emptyLinePlaceholder":173},true,"\n",[136,176,178,181,184],{"class":138,"line":177},4,[136,179,180],{"class":142},"export",[136,182,183],{"class":142}," default",[136,185,186],{"class":146}," {\n",[136,188,190],{"class":138,"line":189},5,[136,191,192],{"class":146},"  Layout,\n",[136,194,196,199,202],{"class":138,"line":195},6,[136,197,198],{"class":146},"} ",[136,200,201],{"class":142},"satisfies",[136,203,205],{"class":204},"snPdu"," Theme\n",[207,208,211],"callout",{"color":209,"icon":210},"success","i-ph-lightbulb-duotone",[10,212,213,214,217,218,221],{},"Within the exported object, the ",[20,215,216],{},"Vue application"," can be accessed and configured using ",[58,219,220],{},"enhanceApp",". This is useful for incorporating global components, directives, or plugins. In our current context, its utilization is unnecessary.",[100,223,103,225],{"id":224},"file-layoutvue",[58,226,124],{},[10,228,229,230,233,234,125],{},"To begin, we can simply insert an ",[58,231,232],{},"h1"," element with the text \"Garabit Blog\" into the ",[58,235,124],{},[127,237,241],{"className":238,"code":239,"filename":124,"language":240,"meta":132,"style":132},"language-vue shiki shiki-themes github-light github-light github-dark","\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>Garabit Blog\u003C\u002Fh1>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n","vue",[58,242,243,255,265,279,288],{"__ignoreMap":132},[136,244,245,248,252],{"class":138,"line":139},[136,246,247],{"class":146},"\u003C",[136,249,251],{"class":250},"sovSZ","template",[136,253,254],{"class":146},">\n",[136,256,257,260,263],{"class":138,"line":157},[136,258,259],{"class":146},"  \u003C",[136,261,262],{"class":250},"div",[136,264,254],{"class":146},[136,266,267,270,272,275,277],{"class":138,"line":170},[136,268,269],{"class":146},"    \u003C",[136,271,232],{"class":250},[136,273,274],{"class":146},">Garabit Blog\u003C\u002F",[136,276,232],{"class":250},[136,278,254],{"class":146},[136,280,281,284,286],{"class":138,"line":177},[136,282,283],{"class":146},"  \u003C\u002F",[136,285,262],{"class":250},[136,287,254],{"class":146},[136,289,290,293,295],{"class":138,"line":189},[136,291,292],{"class":146},"\u003C\u002F",[136,294,251],{"class":250},[136,296,254],{"class":146},[10,298,299,300,303],{},"To initiate the ",[20,301,302],{},"development server",", run the following command:",[127,305,310],{"className":306,"code":307,"filename":308,"language":309,"meta":132,"style":132},"language-bash shiki shiki-themes github-light github-light github-dark","pnpm run docs:dev\n","terminal","bash",[58,311,312],{"__ignoreMap":132},[136,313,314,317,320],{"class":138,"line":139},[136,315,316],{"class":204},"pnpm",[136,318,319],{"class":153}," run",[136,321,322],{"class":153}," docs:dev\n",[207,324,327],{"color":325,"icon":326},"info","i-ph-info-duotone",[10,328,109,329,332,333,335],{},[58,330,331],{},"docs:"," prefix exists because ",[20,334,115],{}," is engineered to integrate into pre-existing projects without the necessity for a monorepo. This prefix distinguishes VitePress commands and helps prevent conflicts with existing project commands. We will modify this aspect later, as it isn't essential for our purposes.",[10,337,338,339,342],{},"Navigate to ",[58,340,341],{},"http:\u002F\u002Flocalhost:5173"," to witness our custom theme operational.",[10,344,345],{},"Splendid!",[44,347,349],{"id":348},"displaying-markdown-content","Displaying Markdown content",[10,351,352,353,356,357,360,361,363],{},"This marks a promising beginning, yet we need to render the ",[20,354,355],{},"markdown content"," to enhance our blog's functionality. For this purpose, the ",[58,358,359],{},"Content"," component provided by ",[20,362,115],{}," is instrumental.",[127,365,368],{"className":238,"code":366,"filename":367,"language":240,"meta":132,"style":132},"\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>Garabit Blog\u003C\u002Fh1>\n\n    \u003CContent \u002F>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n","Example",[58,369,370,378,386,398,402,411,419],{"__ignoreMap":132},[136,371,372,374,376],{"class":138,"line":139},[136,373,247],{"class":146},[136,375,251],{"class":250},[136,377,254],{"class":146},[136,379,380,382,384],{"class":138,"line":157},[136,381,259],{"class":146},[136,383,262],{"class":250},[136,385,254],{"class":146},[136,387,388,390,392,394,396],{"class":138,"line":170},[136,389,269],{"class":146},[136,391,232],{"class":250},[136,393,274],{"class":146},[136,395,232],{"class":250},[136,397,254],{"class":146},[136,399,400],{"class":138,"line":177},[136,401,174],{"emptyLinePlaceholder":173},[136,403,404,406,408],{"class":138,"line":189},[136,405,269],{"class":146},[136,407,359],{"class":250},[136,409,410],{"class":146}," \u002F>\n",[136,412,413,415,417],{"class":138,"line":195},[136,414,283],{"class":146},[136,416,262],{"class":250},[136,418,254],{"class":146},[136,420,422,424,426],{"class":138,"line":421},7,[136,423,292],{"class":146},[136,425,251],{"class":250},[136,427,254],{"class":146},[10,429,430,431,433,434,437],{},"This component will automatically render the ",[96,432,355],{}," of the current page. As of now, it shows nothing because the ",[58,435,436],{},"index.md"," content is empty. Remove all the front matter and add some text:",[127,439,443],{"className":440,"code":441,"filename":436,"language":442,"meta":132,"style":132},"language-md shiki shiki-themes github-light github-light github-dark","Hey 👋,\n\nThis is the index page.\n","md",[58,444,445,450,454],{"__ignoreMap":132},[136,446,447],{"class":138,"line":139},[136,448,449],{"class":146},"Hey 👋,\n",[136,451,452],{"class":138,"line":157},[136,453,174],{"emptyLinePlaceholder":173},[136,455,456],{"class":138,"line":170},[136,457,458],{"class":146},"This is the index page.\n",[10,460,461,462,464,465,468,469,471,472,474,475,477,478,481,482,485,486,488,489,492],{},"A pivotal feature of ",[20,463,115],{}," is its approach to handling ",[20,466,467],{},"routing",". By default, the ",[58,470,436],{}," file represents the homepage. Thus, navigating to ",[58,473,341],{}," will display the ",[58,476,436],{}," file content. Additional markdown files are accessible by their filenames. For instance, ",[58,479,480],{},"about.md"," is accessible via ",[58,483,484],{},"http:\u002F\u002Flocalhost:5173\u002Fabout.html",". To link to a different page, use the ",[58,487,14],{}," tag with the ",[58,490,491],{},"href"," attribute pointing to the filename.",[127,494,496],{"className":440,"code":495,"filename":484,"language":442,"meta":132,"style":132},"Hey 👋,\n\nThis is the index page.\n\n[Go to the api-examples page](\u002Fapi-examples)\n",[58,497,498,502,506,510,514],{"__ignoreMap":132},[136,499,500],{"class":138,"line":139},[136,501,449],{"class":146},[136,503,504],{"class":138,"line":157},[136,505,174],{"emptyLinePlaceholder":173},[136,507,508],{"class":138,"line":170},[136,509,458],{"class":146},[136,511,512],{"class":138,"line":177},[136,513,174],{"emptyLinePlaceholder":173},[136,515,516,519,523,526,530],{"class":138,"line":189},[136,517,518],{"class":146},"[",[136,520,522],{"class":521},"sulnz","Go to the api-examples page",[136,524,525],{"class":146},"](",[136,527,529],{"class":528},"sRE2K","\u002Fapi-examples",[136,531,532],{"class":146},")\n",[10,534,535],{},"Upon clicking the link, the page won't reload; instead, the content refreshes. This feature of VitePress facilitates seamless navigation.",[207,537,538],{"color":325,"icon":326},[10,539,540,543],{},[20,541,542],{},"VitePress does not employ Vue Router",". Instead, it utilizes a bespoke router specifically optimized for content-centric websites.",[545,546,547,548],"video",{"autoPlay":173,"loop":173,"muted":173,"playsInline":173},"\n  ",[549,550],"source",{"src":551,"type":552},"https:\u002F\u002Fimages.soubiran.dev\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Ffrom-default-to-custom-building-a-vitepress-blog-theme\u002Fno-reload.mp4","video\u002Fmp4",[10,554,555,556],{},"The video above demonstrates that the page remains unreloaded when navigating between pages. ",[96,557,558],{},"The 'arrow', situated left of the house icon, indicates page updates without reloading. Otherwise, the arrow would display as a cross.",[44,560,562],{"id":561},"removing-the-default-theme","Removing the default theme",[10,564,565,566,31],{},"With the foundational elements for a custom theme now established, we can eliminate aspects of the ",[20,567,568],{},"default theme",[10,570,571,572,574],{},"Begin by removing the link in the ",[58,573,436],{}," file:",[127,576,577],{"className":440,"code":495,"filename":436,"language":442,"meta":132,"style":132},[58,578,579,583,587,591,595],{"__ignoreMap":132},[136,580,581],{"class":138,"line":139},[136,582,449],{"class":146},[136,584,585],{"class":138,"line":157},[136,586,174],{"emptyLinePlaceholder":173},[136,588,589],{"class":138,"line":170},[136,590,458],{"class":146},[136,592,593],{"class":138,"line":177},[136,594,174],{"emptyLinePlaceholder":173},[136,596,597,599,601,603,605],{"class":138,"line":189},[136,598,518],{"class":146},[136,600,522],{"class":521},[136,602,525],{"class":146},[136,604,529],{"class":528},[136,606,532],{"class":146},[10,608,609,610,613,614,617],{},"Subsequently, delete the ",[58,611,612],{},"api-examples.md"," and ",[58,615,616],{},"markdown-examples.md"," files from the root directory.",[10,619,620,621,574],{},"Lastly, eliminate related theme lines from the ",[58,622,623],{},"config.mts",[127,625,628],{"className":626,"code":627,"filename":623,"language":131,"meta":132,"style":132},"language-ts shiki shiki-themes github-light github-light github-dark has-diff","import Components from 'unplugin-vue-components\u002Fvite'\nimport { defineConfig } from 'vitepress'\n\nexport default defineConfig({\n  title: 'My Awesome Project', \u002F\u002F [!code --]\n  description: 'A VitePress Site', \u002F\u002F [!code --]\n  themeConfig: { \u002F\u002F [!code --]\n    \u002F\u002F https:\u002F\u002Fvitepress.dev\u002Freference\u002Fdefault-theme-config \u002F\u002F [!code --]\n    nav: [ \u002F\u002F [!code --]\n      { text: 'Home', link: '\u002F' }, \u002F\u002F [!code --]\n      { text: 'Examples', link: '\u002Fmarkdown-examples' }, \u002F\u002F [!code --]\n    ], \u002F\u002F [!code --]\n\n    sidebar: [ \u002F\u002F [!code --]\n      { \u002F\u002F [!code --]\n        text: 'Examples', \u002F\u002F [!code --]\n        items: [ \u002F\u002F [!code --]\n          { text: 'Markdown Examples', link: '\u002Fmarkdown-examples' }, \u002F\u002F [!code --]\n          { text: 'Runtime API Examples', link: '\u002Fapi-examples' }, \u002F\u002F [!code --]\n        ], \u002F\u002F [!code --]\n      }, \u002F\u002F [!code --]\n    ], \u002F\u002F [!code --]\n\n    socialLinks: [ \u002F\u002F [!code --]\n      { icon: 'github', link: 'https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress' }, \u002F\u002F [!code --]\n    ], \u002F\u002F [!code --]\n  }, \u002F\u002F [!code --]\n\n  vite: {\n    plugins: [Components()],\n  },\n})\n",[58,629,630,642,653,657,669,683,694,700,708,715,734,750,757,762,769,776,787,794,810,826,833,840,846,851,858,875,881,888,893,899,911,917],{"__ignoreMap":132},[136,631,632,634,637,639],{"class":138,"line":139},[136,633,143],{"class":142},[136,635,636],{"class":146}," Components ",[136,638,150],{"class":142},[136,640,641],{"class":153}," 'unplugin-vue-components\u002Fvite'\n",[136,643,644,646,649,651],{"class":138,"line":157},[136,645,143],{"class":142},[136,647,648],{"class":146}," { defineConfig } ",[136,650,150],{"class":142},[136,652,154],{"class":153},[136,654,655],{"class":138,"line":170},[136,656,174],{"emptyLinePlaceholder":173},[136,658,659,661,663,666],{"class":138,"line":177},[136,660,180],{"class":142},[136,662,183],{"class":142},[136,664,665],{"class":204}," defineConfig",[136,667,668],{"class":146},"({\n",[136,670,674,677,680],{"class":671,"line":189},[138,672,673],"diff","remove",[136,675,676],{"class":146},"  title: ",[136,678,679],{"class":153},"'My Awesome Project'",[136,681,682],{"class":146},", ",[136,684,686,689,692],{"class":685,"line":195},[138,672,673],[136,687,688],{"class":146},"  description: ",[136,690,691],{"class":153},"'A VitePress Site'",[136,693,682],{"class":146},[136,695,697],{"class":696,"line":421},[138,672,673],[136,698,699],{"class":146},"  themeConfig: { ",[136,701,704],{"class":702,"line":703},[138,672,673],8,[136,705,707],{"class":706},"sCsY4","    \u002F\u002F https:\u002F\u002Fvitepress.dev\u002Freference\u002Fdefault-theme-config",[136,709,712],{"class":710,"line":711},[138,672,673],9,[136,713,714],{"class":146},"    nav: [ ",[136,716,719,722,725,728,731],{"class":717,"line":718},[138,672,673],10,[136,720,721],{"class":146},"      { text: ",[136,723,724],{"class":153},"'Home'",[136,726,727],{"class":146},", link: ",[136,729,730],{"class":153},"'\u002F'",[136,732,733],{"class":146}," }, ",[136,735,738,740,743,745,748],{"class":736,"line":737},[138,672,673],11,[136,739,721],{"class":146},[136,741,742],{"class":153},"'Examples'",[136,744,727],{"class":146},[136,746,747],{"class":153},"'\u002Fmarkdown-examples'",[136,749,733],{"class":146},[136,751,754],{"class":752,"line":753},[138,672,673],12,[136,755,756],{"class":146},"    ], ",[136,758,760],{"class":138,"line":759},13,[136,761,174],{"emptyLinePlaceholder":173},[136,763,766],{"class":764,"line":765},[138,672,673],14,[136,767,768],{"class":146},"    sidebar: [ ",[136,770,773],{"class":771,"line":772},[138,672,673],15,[136,774,775],{"class":146},"      { ",[136,777,780,783,785],{"class":778,"line":779},[138,672,673],16,[136,781,782],{"class":146},"        text: ",[136,784,742],{"class":153},[136,786,682],{"class":146},[136,788,791],{"class":789,"line":790},[138,672,673],17,[136,792,793],{"class":146},"        items: [ ",[136,795,798,801,804,806,808],{"class":796,"line":797},[138,672,673],18,[136,799,800],{"class":146},"          { text: ",[136,802,803],{"class":153},"'Markdown Examples'",[136,805,727],{"class":146},[136,807,747],{"class":153},[136,809,733],{"class":146},[136,811,814,816,819,821,824],{"class":812,"line":813},[138,672,673],19,[136,815,800],{"class":146},[136,817,818],{"class":153},"'Runtime API Examples'",[136,820,727],{"class":146},[136,822,823],{"class":153},"'\u002Fapi-examples'",[136,825,733],{"class":146},[136,827,830],{"class":828,"line":829},[138,672,673],20,[136,831,832],{"class":146},"        ], ",[136,834,837],{"class":835,"line":836},[138,672,673],21,[136,838,839],{"class":146},"      }, ",[136,841,844],{"class":842,"line":843},[138,672,673],22,[136,845,756],{"class":146},[136,847,849],{"class":138,"line":848},23,[136,850,174],{"emptyLinePlaceholder":173},[136,852,855],{"class":853,"line":854},[138,672,673],24,[136,856,857],{"class":146},"    socialLinks: [ ",[136,859,862,865,868,870,873],{"class":860,"line":861},[138,672,673],25,[136,863,864],{"class":146},"      { icon: ",[136,866,867],{"class":153},"'github'",[136,869,727],{"class":146},[136,871,872],{"class":153},"'https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress'",[136,874,733],{"class":146},[136,876,879],{"class":877,"line":878},[138,672,673],26,[136,880,756],{"class":146},[136,882,885],{"class":883,"line":884},[138,672,673],27,[136,886,887],{"class":146},"  }, ",[136,889,891],{"class":138,"line":890},28,[136,892,174],{"emptyLinePlaceholder":173},[136,894,896],{"class":138,"line":895},29,[136,897,898],{"class":146},"  vite: {\n",[136,900,902,905,908],{"class":138,"line":901},30,[136,903,904],{"class":146},"    plugins: [",[136,906,907],{"class":204},"Components",[136,909,910],{"class":146},"()],\n",[136,912,914],{"class":138,"line":913},31,[136,915,916],{"class":146},"  },\n",[136,918,920],{"class":138,"line":919},32,[136,921,922],{"class":146},"})\n",[10,924,925,926,31],{},"We are now fully equipped and poised to create our ",[20,927,30],{},[929,930,931],"style",{},"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 .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}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 .sovSZ, html code.shiki .sovSZ{--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sulnz, html code.shiki .sulnz{--shiki-light:#032F62;--shiki-light-text-decoration:underline;--shiki-default:#032F62;--shiki-default-text-decoration:underline;--shiki-dark:#DBEDFF;--shiki-dark-text-decoration:underline}html pre.shiki code .sRE2K, html code.shiki .sRE2K{--shiki-light:#24292E;--shiki-light-text-decoration:underline;--shiki-default:#24292E;--shiki-default-text-decoration:underline;--shiki-dark:#E1E4E8;--shiki-dark-text-decoration:underline}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":132,"searchDepth":157,"depth":157,"links":933},[934,940,941],{"id":46,"depth":157,"text":47,"children":935},[936,938],{"id":102,"depth":170,"text":937},"File index.ts",{"id":224,"depth":170,"text":939},"File Layout.vue",{"id":348,"depth":157,"text":349},{"id":561,"depth":157,"text":562},"172f2a41-2f7c-44e9-855d-322adc536279","2024-10-15","Step-by-step VitePress theme customization: guide to building a unique theme layout, adding Markdown content, and removing defaults.",{"branch":946},"02.the-basics-for-a-custom-theme",null,{},"\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Ffrom-default-to-custom-building-a-vitepress-blog-theme","---\ncontentId: 172f2a41-2f7c-44e9-855d-322adc536279\npart: 2\ntitle: \"From Default to Custom: Building a VitePress Blog Theme\"\ndescription: \"Step-by-step VitePress theme customization: guide to building a unique theme layout, adding Markdown content, and removing defaults.\"\ngithub:\n  branch: 02.the-basics-for-a-custom-theme\ndate: 2024-10-15\nseriesSlug: create-a-blog-with-vitepress-and-vue-js-from-scratch\n---\n\nIn [the previous article](\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fgetting-started-with-vitepress-project-setup-and-essentials), we initialized our project using the **VitePress template**. By default, VitePress comes with a built-in theme designed for creating documentation websites. However, we aim to develop a **blog** site, necessitating the creation of a **custom theme**.\n\n![Default VitePress Theme, not suitable for our blog site.](\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Ffrom-default-to-custom-building-a-vitepress-blog-theme\u002Fvitepress-default-theme.png)\n\n## Custom theme\n\nTo construct a custom theme, two files need to be created:\n\n- `src\u002F.vitepress\u002Ftheme\u002Findex.ts`: This serves as the entry point for our custom theme, comparable to the `main.ts` file in a **Vite + Vue** project.\n- `src\u002F.vitepress\u002Ftheme\u002FLayout.vue`: This file constitutes the main Vue component of our custom theme, analogous to the `App.vue` file in a Vite + Vue project.\n\nWe've established a `theme` folder within the `.vitepress` directory. This is the designated location for all files associated with our custom theme. It can be viewed similarly to the `src` folder in a Vite + Vue project and will adopt a parallel structure. _Further explanation will be provided in the forthcoming article._\n\n### File `index.ts`\n\nThe `index.ts` file is automatically recognized by **VitePress** and, like the `main.ts` file in a **Vite + Vue** project, it is required to load the `Layout.vue` file.\n\n```ts [Layout.vue]\nimport { Theme } from 'vitepress'\nimport Layout from '.\u002FLayout.vue'\n\nexport default {\n  Layout,\n} satisfies Theme\n```\n\n::callout{icon=\"i-ph-lightbulb-duotone\" color=\"success\"}\nWithin the exported object, the **Vue application** can be accessed and configured using `enhanceApp`. This is useful for incorporating global components, directives, or plugins. In our current context, its utilization is unnecessary.\n::\n\n### File `Layout.vue`\n\nTo begin, we can simply insert an `h1` element with the text \"Garabit Blog\" into the `Layout.vue` file.\n\n```vue [Layout.vue]\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>Garabit Blog\u003C\u002Fh1>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\nTo initiate the **development server**, run the following command:\n\n```bash [terminal]\npnpm run docs:dev\n```\n\n::callout{icon=\"i-ph-info-duotone\" color=\"info\"}\nThe `docs:` prefix exists because **VitePress** is engineered to integrate into pre-existing projects without the necessity for a monorepo. This prefix distinguishes VitePress commands and helps prevent conflicts with existing project commands. We will modify this aspect later, as it isn't essential for our purposes.\n::\n\nNavigate to `http:\u002F\u002Flocalhost:5173` to witness our custom theme operational.\n\nSplendid!\n\n## Displaying Markdown content\n\nThis marks a promising beginning, yet we need to render the **markdown content** to enhance our blog's functionality. For this purpose, the `Content` component provided by **VitePress** is instrumental.\n\n```vue [Example]\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>Garabit Blog\u003C\u002Fh1>\n\n    \u003CContent \u002F>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\nThis component will automatically render the *markdown content* of the current page. As of now, it shows nothing because the `index.md` content is empty. Remove all the front matter and add some text:\n\n```md [index.md]\nHey 👋,\n\nThis is the index page.\n```\n\nA pivotal feature of **VitePress** is its approach to handling **routing**. By default, the `index.md` file represents the homepage. Thus, navigating to `http:\u002F\u002Flocalhost:5173` will display the `index.md` file content. Additional markdown files are accessible by their filenames. For instance, `about.md` is accessible via `http:\u002F\u002Flocalhost:5173\u002Fabout.html`. To link to a different page, use the `a` tag with the `href` attribute pointing to the filename.\n\n```md [http:\u002F\u002Flocalhost:5173\u002Fabout.html]\nHey 👋,\n\nThis is the index page.\n\n[Go to the api-examples page](\u002Fapi-examples)\n```\n\nUpon clicking the link, the page won't reload; instead, the content refreshes. This feature of VitePress facilitates seamless navigation.\n\n::callout{icon=\"i-ph-info-duotone\" color=\"info\"}\n**VitePress does not employ Vue Router**. Instead, it utilizes a bespoke router specifically optimized for content-centric websites.\n::\n\n\u003Cvideo autoplay loop muted playsinline>\n  \u003Csource src=\"https:\u002F\u002Fimages.soubiran.dev\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Ffrom-default-to-custom-building-a-vitepress-blog-theme\u002Fno-reload.mp4\" type=\"video\u002Fmp4\">\n\u003C\u002Fvideo>\n\nThe video above demonstrates that the page remains unreloaded when navigating between pages. _The 'arrow', situated left of the house icon, indicates page updates without reloading. Otherwise, the arrow would display as a cross._\n\n## Removing the default theme\n\nWith the foundational elements for a custom theme now established, we can eliminate aspects of the **default theme**.\n\nBegin by removing the link in the `index.md` file:\n\n```md [index.md]\nHey 👋,\n\nThis is the index page.\n\n[Go to the api-examples page](\u002Fapi-examples)\n```\n\nSubsequently, delete the `api-examples.md` and `markdown-examples.md` files from the root directory.\n\nLastly, eliminate related theme lines from the `config.mts` file:\n\n```ts [config.mts]\nimport Components from 'unplugin-vue-components\u002Fvite'\nimport { defineConfig } from 'vitepress'\n\nexport default defineConfig({\n  title: 'My Awesome Project', \u002F\u002F [!code --]\n  description: 'A VitePress Site', \u002F\u002F [!code --]\n  themeConfig: { \u002F\u002F [!code --]\n    \u002F\u002F https:\u002F\u002Fvitepress.dev\u002Freference\u002Fdefault-theme-config \u002F\u002F [!code --]\n    nav: [ \u002F\u002F [!code --]\n      { text: 'Home', link: '\u002F' }, \u002F\u002F [!code --]\n      { text: 'Examples', link: '\u002Fmarkdown-examples' }, \u002F\u002F [!code --]\n    ], \u002F\u002F [!code --]\n\n    sidebar: [ \u002F\u002F [!code --]\n      { \u002F\u002F [!code --]\n        text: 'Examples', \u002F\u002F [!code --]\n        items: [ \u002F\u002F [!code --]\n          { text: 'Markdown Examples', link: '\u002Fmarkdown-examples' }, \u002F\u002F [!code --]\n          { text: 'Runtime API Examples', link: '\u002Fapi-examples' }, \u002F\u002F [!code --]\n        ], \u002F\u002F [!code --]\n      }, \u002F\u002F [!code --]\n    ], \u002F\u002F [!code --]\n\n    socialLinks: [ \u002F\u002F [!code --]\n      { icon: 'github', link: 'https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvitepress' }, \u002F\u002F [!code --]\n    ], \u002F\u002F [!code --]\n  }, \u002F\u002F [!code --]\n\n  vite: {\n    plugins: [Components()],\n  },\n})\n```\n\nWe are now fully equipped and poised to create our **custom theme**.\n",{"title":5,"description":944},"create-a-blog-with-vitepress-and-vue-js-from-scratch",{"loc":949,"images":954},[955],{"loc":39},"series\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Ffrom-default-to-custom-building-a-vitepress-blog-theme","m93aO_sooxATQ5vIAx0yi3u1eRL9Nm8s8yLXUDy4ElM",{"overview":959,"chapters":1193},{"id":960,"title":961,"body":962,"contentId":1173,"date":1174,"description":1175,"extension":442,"github":1176,"meetTheInstructor":1179,"meta":1180,"navigation":173,"part":947,"path":1181,"rawbody":1182,"robots":947,"schemaOrg":947,"seo":1183,"seriesSlug":952,"sitemap":1184,"stem":1187,"subtitle":1188,"topics":1189,"__hash__":1192},"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":963,"toc":1170},[964,967,980,995,1129,1139,1147,1154,1157,1160,1164],[10,965,966],{},"Hello and welcome! 👋",[10,968,969,970,973,974,613,976,979],{},"You're about to embark on the \"Create a ",[20,971,972],{},"Blog"," with ",[20,975,115],{},[20,977,978],{},"Vue.js"," from Scratch\" series!",[10,981,982,983,990,991,994],{},"Throughout this journey, we will construct a practical blog from the ground up using ",[14,984,988],{"href":985,"rel":986},"https:\u002F\u002Fvitepress.dev\u002F",[987],"nofollow",[20,989,115],{},". We will explore a range of topics from initial configuration to deploying on ",[20,992,993],{},"Cloudflare Pages",", including:",[52,996,997,1022,1030,1036,1049,1055,1065,1075,1085,1097,1114,1120],{},[55,998,999,1002,1003,1006,1007,613,1014,1021],{},[20,1000,1001],{},"Getting Started with VitePress: Project Setup and Essentials",": Learn to set up a fresh ",[20,1004,1005],{},"VitePress project"," by incorporating ",[14,1008,1011],{"href":1009,"rel":1010},"https:\u002F\u002Ftailwindcss.com\u002F",[987],[20,1012,1013],{},"Tailwind CSS",[14,1015,1018],{"href":1016,"rel":1017},"https:\u002F\u002Fgithub.com\u002Funplugin\u002Funplugin-vue-components",[987],[20,1019,1020],{},"unplugin-vue-components"," for an enhanced development process.",[55,1023,1024,1026,1027],{},[20,1025,5],{},": We will entirely remove the default theme and create a personalized theme. ",[96,1028,1029],{},"You'll be surprised by its simplicity!",[55,1031,1032,1035],{},[20,1033,1034],{},"Optimize Your VitePress Blog's Architecture Design",": Discover how to organize code and design your blog for scalability and maintainability.",[55,1037,1038,1041,1042,31],{},[20,1039,1040],{},"Implementing Blog Index with VitePress and Tailwind CSS",": Create a list of blog posts. This will introduce ",[14,1043,1046],{"href":1044,"rel":1045},"https:\u002F\u002Fvitepress.dev\u002Fguide\u002Fdata-loading",[987],[20,1047,1048],{},"data loaders from VitePress",[55,1050,1051,1054],{},[20,1052,1053],{},"Single Blog Rendering in VitePress with Tailwind Typography",": Create a page dedicated to reading each blog post.",[55,1056,1057,1060,1061,1064],{},[20,1058,1059],{},"Deploy VitePress Blog Globally with Cloudflare Pages",": Integrate ",[20,1062,1063],{},"SEO metadata"," for improved search engine visibility, eliminating the need for manual updates.",[55,1066,1067,1070,1071,1074],{},[20,1068,1069],{},"Showcase Your GitHub Projects on Your VitePress Blog",": Develop a page to display your ",[20,1072,1073],{},"GitHub"," endeavors, extending the use of data loaders and demonstrating their flexibility.",[55,1076,1077,1080,1081,1084],{},[20,1078,1079],{},"Creating Open Graph Images Automatically for Each Blog Post",": Efficiently create ",[20,1082,1083],{},"Open Graph images"," for each post, saving time and enhancing appeal.",[55,1086,1087,1089,1090,1096],{},[20,1088,1059],{},": Seamlessly deploy your blog to ",[14,1091,1094],{"href":1092,"rel":1093},"https:\u002F\u002Fpages.cloudflare.com\u002F",[987],[20,1095,993],{},", achieving this in just a few clicks!",[55,1098,1099,1102,1103,973,1106,1113],{},[20,1100,1101],{},"Ensure Blog Quality with Playwright Automated Testing",": Implement ",[20,1104,1105],{},"end-to-end testing",[14,1107,1110],{"href":1108,"rel":1109},"https:\u002F\u002Fplaywright.dev\u002F",[987],[20,1111,1112],{},"Playwright"," to ensure your blog functions as expected.",[55,1115,1116,1119],{},[20,1117,1118],{},"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.",[55,1121,1122,1125,1126,1128],{},[20,1123,1124],{},"Migrating Our VitePress Blog to Tailwind CSS Version 4",": Upgrade our blog to the latest version of ",[20,1127,1013],{}," to leverage its new features and improvements.",[10,1130,1131,1132,1134,1135,1138],{},"By the conclusion, you will possess a fully operational and captivating ",[20,1133,26],{},", allowing you to concentrate exclusively on producing ",[20,1136,1137],{},"content",", which is paramount. Simply write and publish, as the blog will autonomously manage the rest.",[33,1140,1141,1145],{},[36,1142],{"alt":1143,"src":1144},"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",[41,1146,1143],{},[10,1148,1149,1150,1153],{},"This series offers a detailed, step-by-step ",[20,1151,1152],{},"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,1155,1156],{},"Should you have any inquiries, please feel free to engage in the comments section under each article.",[10,1158,1159],{},"I hope you find this series truly enjoyable! 🚀",[44,1161,1163],{"id":1162},"chapters","Chapters",[1165,1166],"series-chapters-list",{"className":1167},[1168,1169],"mx-auto","max-w-5xl",{"title":132,"searchDepth":157,"depth":157,"links":1171},[1172],{"id":1162,"depth":157,"text":1163},"43c95b33-041c-4108-ab98-0d21ef60ed7f","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":1177,"repository":1178},"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.",{},"\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":961,"description":1175},{"loc":1181,"images":1185},[1186],{"loc":1144},"series\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch","A new perspective on blogging with VitePress and Vue.js",[1190,1191,26],"vuejs","vitepress","H9cubHgLKM0Siblzkwf7mDsFVYr2CLbh_ciFOpQrSVk",[1194,1199,1201,1207,1213,1219,1226,1232,1238,1244,1250,1257],{"contentId":1195,"title":1001,"description":1196,"path":16,"part":139,"github":1197,"topics":947},"b1b99d95-ac6d-4f25-a121-0851988102a2","From setup to styling with Tailwind CSS and automatic Vue imports, build your content-driven site effortlessly.",{"branch":1198},"01.project-initialization",{"contentId":942,"title":5,"description":944,"path":949,"part":157,"github":1200,"topics":947},{"branch":946},{"contentId":1202,"title":1034,"description":1203,"path":1204,"part":170,"github":1205,"topics":947},"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":1206},"03.define-the-design-of-the-blog-architecture",{"contentId":1208,"title":1040,"description":1209,"path":1210,"part":177,"github":1211,"topics":947},"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":1212},"04.comprehensive-guide-to-listing-blog-articles",{"contentId":1214,"title":1053,"description":1215,"path":1216,"part":189,"github":1217,"topics":947},"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":1218},"05.read-a-single-blog-article",{"contentId":1220,"title":1221,"description":1222,"path":1223,"part":195,"github":1224,"topics":947},"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":1225},"06.seo-metadata-and-sitemap",{"contentId":1227,"title":1069,"description":1228,"path":1229,"part":421,"github":1230,"topics":947},"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":1231},"07.showcase-your-github-projects",{"contentId":1233,"title":1079,"description":1234,"path":1235,"part":703,"github":1236,"topics":947},"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":1237},"08.automatically-generated-open-graph-images",{"contentId":1239,"title":1059,"description":1240,"path":1241,"part":711,"github":1242,"topics":947},"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":1243},"09.share-the-blog-globally",{"contentId":1245,"title":1101,"description":1246,"path":1247,"part":718,"github":1248,"topics":947},"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":1249},"10.automate-testing",{"contentId":1251,"title":1252,"description":1253,"path":1254,"part":737,"github":1255,"topics":947},"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":1256},"11.internal-refactor",{"contentId":1258,"title":1124,"description":1259,"path":1260,"part":753,"github":1261,"topics":947},"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":1262},"12.migration-to-tailwind-css-4",1795016691943]