[{"data":1,"prerenderedAt":2529},["ShallowReactive",2],{"series-\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages":3,"series-context-\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch":2224},{"id":4,"title":5,"body":6,"contentId":2207,"date":2208,"description":2209,"extension":517,"github":2210,"meetTheInstructor":2212,"meta":2213,"navigation":139,"part":191,"path":2214,"rawbody":2215,"robots":2212,"schemaOrg":2212,"seo":2216,"seriesSlug":2217,"sitemap":2218,"stem":2222,"subtitle":2212,"topics":2212,"__hash__":2223},"series\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages.md","Deploy VitePress Blog Globally with Cloudflare Pages",{"type":7,"value":8,"toc":2196},"minimark",[9,28,33,44,48,60,384,391,488,492,498,513,672,680,693,1058,1067,1190,1206,1293,1392,1400,1613,1619,1629,1737,1741,1758,1991,2008,2012,2019,2022,2025,2038,2060,2063,2091,2100,2103,2106,2109,2120,2142,2145,2148,2159,2167,2171,2186,2189,2192],[10,11,12,13,23,24,27],"p",{},"Today marks the day we make our blog accessible to the world through ",[14,15,19],"a",{"href":16,"rel":17},"https:\u002F\u002Fpages.cloudflare.com",[18],"nofollow",[20,21,22],"strong",{},"Cloudflare Pages",". This process is straightforward once you have learned the procedure. The first attempt may appear daunting, especially if you are new to web development, but with today's guide, you will be able to ",[20,25,26],{},"share the blog globally"," in just a few clicks.",[29,30,32],"h2",{"id":31},"essential-components","Essential components",[10,34,35,36,39,40,43],{},"Before deploying our blog, we must address a few essential components. Our blog requires a ",[20,37,38],{},"header"," and a ",[20,41,42],{},"homepage"," to be complete.",[45,46,47],"h3",{"id":38},"Header",[10,49,50,51,55,56,59],{},"For the header, I will keep it as minimal as possible since it is not the primary focus of this series. I will create a ",[52,53,54],"code",{},"TheHeader.vue"," component in the ",[52,57,58],{},".vitepress\u002Ftheme\u002Fcomponents"," directory. This component will contain the title of our blog and a navigation bar with two links: Blog and Projects, which is a common pattern for blogs.",[61,62,67],"pre",{"className":63,"code":64,"filename":54,"language":65,"meta":66,"style":66},"language-vue shiki shiki-themes github-light github-light github-dark","\u003Cscript lang=\"ts\" setup>\nconst { site } = useData()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cheader class=\"border-b-4 border-black bg-white p-8\">\n    \u003Cdiv\n      class=\"mx-auto max-w-screen-md flex flex-col items-center justify-between gap-6 md:flex-row\"\n    >\n      \u003Cspan>\n        \u003Ca href=\"\u002F\" class=\"text-2xl text-black font-semibold\">\n          {{ site.title }}\n        \u003C\u002Fa>\n      \u003C\u002Fspan>\n\n      \u003Cdiv class=\"flex items-center gap-6\">\n        \u003CButtonPrimary href=\"\u002Fblog\">\n          Blog\n        \u003C\u002FButtonPrimary>\n\n        \u003CButtonPrimary href=\"\u002Fprojects\">\n          Projects\n        \u003C\u002FButtonPrimary>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  \u003C\u002Fheader>\n\u003C\u002Ftemplate>\n","vue","",[52,68,69,99,124,134,141,151,169,178,189,195,205,230,236,246,256,261,278,295,301,310,315,331,337,346,355,365,375],{"__ignoreMap":66},[70,71,74,78,82,86,89,93,96],"span",{"class":72,"line":73},"line",1,[70,75,77],{"class":76},"sxrX7","\u003C",[70,79,81],{"class":80},"sovSZ","script",[70,83,85],{"class":84},"snPdu"," lang",[70,87,88],{"class":76},"=",[70,90,92],{"class":91},"sIIMD","\"ts\"",[70,94,95],{"class":84}," setup",[70,97,98],{"class":76},">\n",[70,100,102,106,109,113,116,118,121],{"class":72,"line":101},2,[70,103,105],{"class":104},"s8jYJ","const",[70,107,108],{"class":76}," { ",[70,110,112],{"class":111},"sBjJW","site",[70,114,115],{"class":76}," } ",[70,117,88],{"class":104},[70,119,120],{"class":84}," useData",[70,122,123],{"class":76},"()\n",[70,125,127,130,132],{"class":72,"line":126},3,[70,128,129],{"class":76},"\u003C\u002F",[70,131,81],{"class":80},[70,133,98],{"class":76},[70,135,137],{"class":72,"line":136},4,[70,138,140],{"emptyLinePlaceholder":139},true,"\n",[70,142,144,146,149],{"class":72,"line":143},5,[70,145,77],{"class":76},[70,147,148],{"class":80},"template",[70,150,98],{"class":76},[70,152,154,157,159,162,164,167],{"class":72,"line":153},6,[70,155,156],{"class":76},"  \u003C",[70,158,38],{"class":80},[70,160,161],{"class":84}," class",[70,163,88],{"class":76},[70,165,166],{"class":91},"\"border-b-4 border-black bg-white p-8\"",[70,168,98],{"class":76},[70,170,172,175],{"class":72,"line":171},7,[70,173,174],{"class":76},"    \u003C",[70,176,177],{"class":80},"div\n",[70,179,181,184,186],{"class":72,"line":180},8,[70,182,183],{"class":84},"      class",[70,185,88],{"class":76},[70,187,188],{"class":91},"\"mx-auto max-w-screen-md flex flex-col items-center justify-between gap-6 md:flex-row\"\n",[70,190,192],{"class":72,"line":191},9,[70,193,194],{"class":76},"    >\n",[70,196,198,201,203],{"class":72,"line":197},10,[70,199,200],{"class":76},"      \u003C",[70,202,70],{"class":80},[70,204,98],{"class":76},[70,206,208,211,213,216,218,221,223,225,228],{"class":72,"line":207},11,[70,209,210],{"class":76},"        \u003C",[70,212,14],{"class":80},[70,214,215],{"class":84}," href",[70,217,88],{"class":76},[70,219,220],{"class":91},"\"\u002F\"",[70,222,161],{"class":84},[70,224,88],{"class":76},[70,226,227],{"class":91},"\"text-2xl text-black font-semibold\"",[70,229,98],{"class":76},[70,231,233],{"class":72,"line":232},12,[70,234,235],{"class":76},"          {{ site.title }}\n",[70,237,239,242,244],{"class":72,"line":238},13,[70,240,241],{"class":76},"        \u003C\u002F",[70,243,14],{"class":80},[70,245,98],{"class":76},[70,247,249,252,254],{"class":72,"line":248},14,[70,250,251],{"class":76},"      \u003C\u002F",[70,253,70],{"class":80},[70,255,98],{"class":76},[70,257,259],{"class":72,"line":258},15,[70,260,140],{"emptyLinePlaceholder":139},[70,262,264,266,269,271,273,276],{"class":72,"line":263},16,[70,265,200],{"class":76},[70,267,268],{"class":80},"div",[70,270,161],{"class":84},[70,272,88],{"class":76},[70,274,275],{"class":91},"\"flex items-center gap-6\"",[70,277,98],{"class":76},[70,279,281,283,286,288,290,293],{"class":72,"line":280},17,[70,282,210],{"class":76},[70,284,285],{"class":80},"ButtonPrimary",[70,287,215],{"class":84},[70,289,88],{"class":76},[70,291,292],{"class":91},"\"\u002Fblog\"",[70,294,98],{"class":76},[70,296,298],{"class":72,"line":297},18,[70,299,300],{"class":76},"          Blog\n",[70,302,304,306,308],{"class":72,"line":303},19,[70,305,241],{"class":76},[70,307,285],{"class":80},[70,309,98],{"class":76},[70,311,313],{"class":72,"line":312},20,[70,314,140],{"emptyLinePlaceholder":139},[70,316,318,320,322,324,326,329],{"class":72,"line":317},21,[70,319,210],{"class":76},[70,321,285],{"class":80},[70,323,215],{"class":84},[70,325,88],{"class":76},[70,327,328],{"class":91},"\"\u002Fprojects\"",[70,330,98],{"class":76},[70,332,334],{"class":72,"line":333},22,[70,335,336],{"class":76},"          Projects\n",[70,338,340,342,344],{"class":72,"line":339},23,[70,341,241],{"class":76},[70,343,285],{"class":80},[70,345,98],{"class":76},[70,347,349,351,353],{"class":72,"line":348},24,[70,350,251],{"class":76},[70,352,268],{"class":80},[70,354,98],{"class":76},[70,356,358,361,363],{"class":72,"line":357},25,[70,359,360],{"class":76},"    \u003C\u002F",[70,362,268],{"class":80},[70,364,98],{"class":76},[70,366,368,371,373],{"class":72,"line":367},26,[70,369,370],{"class":76},"  \u003C\u002F",[70,372,38],{"class":80},[70,374,98],{"class":76},[70,376,378,380,382],{"class":72,"line":377},27,[70,379,129],{"class":76},[70,381,148],{"class":80},[70,383,98],{"class":76},[10,385,386,387,390],{},"Then, we can include it in the ",[52,388,389],{},"Layout.vue"," component.",[61,392,394],{"className":63,"code":393,"filename":389,"language":65,"meta":66,"style":66},"\u003Cscript lang=\"ts\" setup>\n\u002F\u002F ...\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv class=\"min-h-screen bg-[#FC88FF] py-16\">\n    \u003CTheHeader \u002F> \u002F\u002F [!code ++]\n\n    \u003C!-- ... -->\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n",[52,395,396,412,418,426,430,438,453,463,467,472,480],{"__ignoreMap":66},[70,397,398,400,402,404,406,408,410],{"class":72,"line":73},[70,399,77],{"class":76},[70,401,81],{"class":80},[70,403,85],{"class":84},[70,405,88],{"class":76},[70,407,92],{"class":91},[70,409,95],{"class":84},[70,411,98],{"class":76},[70,413,414],{"class":72,"line":101},[70,415,417],{"class":416},"sCsY4","\u002F\u002F ...\n",[70,419,420,422,424],{"class":72,"line":126},[70,421,129],{"class":76},[70,423,81],{"class":80},[70,425,98],{"class":76},[70,427,428],{"class":72,"line":136},[70,429,140],{"emptyLinePlaceholder":139},[70,431,432,434,436],{"class":72,"line":143},[70,433,77],{"class":76},[70,435,148],{"class":80},[70,437,98],{"class":76},[70,439,440,442,444,446,448,451],{"class":72,"line":153},[70,441,156],{"class":76},[70,443,268],{"class":80},[70,445,161],{"class":84},[70,447,88],{"class":76},[70,449,450],{"class":91},"\"min-h-screen bg-[#FC88FF] py-16\"",[70,452,98],{"class":76},[70,454,455,457,460],{"class":72,"line":171},[70,456,174],{"class":76},[70,458,459],{"class":80},"TheHeader",[70,461,462],{"class":76}," \u002F> \u002F\u002F [!code ++]\n",[70,464,465],{"class":72,"line":180},[70,466,140],{"emptyLinePlaceholder":139},[70,468,469],{"class":72,"line":191},[70,470,471],{"class":416},"    \u003C!-- ... -->\n",[70,473,474,476,478],{"class":72,"line":197},[70,475,370],{"class":76},[70,477,268],{"class":80},[70,479,98],{"class":76},[70,481,482,484,486],{"class":72,"line":207},[70,483,129],{"class":76},[70,485,148],{"class":80},[70,487,98],{"class":76},[45,489,491],{"id":490},"home","Home",[10,493,494,495,497],{},"For the ",[20,496,42],{},", we already master the process.",[499,500,501],"ol",{},[502,503,504,505,508,509,512],"li",{},"Create an ",[52,506,507],{},"index.md"," file in the ",[52,510,511],{},"src"," directory with the following content:",[61,514,518],{"className":515,"code":516,"filename":507,"language":517,"meta":66,"style":66},"language-md shiki shiki-themes github-light github-light github-dark","---\nlayout: home\ntitle: Home\n---\n\n\u003Cimg\n  src=\"https:\u002F\u002Fgithub.com\u002Fbarbapapazes.png\"\n  alt=\"Profile Picture\"\n  class=\"h-32 w-32 my-0 border-4 border-black rounded-full\"\n\u002F>\n\nHello, I'm Estéban \"[Barbapapazes](https:\u002F\u002Fgh.soubiran.dev)\" Soubiran.\n\nI'm passionate about **web technologies**, continuously expanding my knowledge\nin areas like technology, finance, and entrepreneurship. I love sharing\ninsights and collaborating with others. That's why I give talks and write\narticles. I also stream on Twitch, where I work on projects, try out new\ntools, and explain various concepts.\n\nI favor simplicity over complexity when creating user experiences. I focus\non details to deliver the best possible product that pleases both the\nclient and the user.\n\nThus, I've developed expertise in **JavaScript**, **TypeScript**, **Angular**, **Vue** ,\n**Nuxt**, **Adonis**, **Laravel**, which aids me in thoroughly understanding the\nclient's needs and proposing the best solutions.\n","md",[52,519,520,525,536,546,550,554,561,571,581,591,596,600,605,609,614,619,624,629,634,638,643,648,653,657,662,667],{"__ignoreMap":66},[70,521,522],{"class":72,"line":73},[70,523,524],{"class":76},"---\n",[70,526,527,530,533],{"class":72,"line":101},[70,528,529],{"class":80},"layout",[70,531,532],{"class":76},": ",[70,534,535],{"class":91},"home\n",[70,537,538,541,543],{"class":72,"line":126},[70,539,540],{"class":80},"title",[70,542,532],{"class":76},[70,544,545],{"class":91},"Home\n",[70,547,548],{"class":72,"line":136},[70,549,524],{"class":76},[70,551,552],{"class":72,"line":143},[70,553,140],{"emptyLinePlaceholder":139},[70,555,556,558],{"class":72,"line":153},[70,557,77],{"class":76},[70,559,560],{"class":80},"img\n",[70,562,563,566,568],{"class":72,"line":171},[70,564,565],{"class":84},"  src",[70,567,88],{"class":76},[70,569,570],{"class":91},"\"https:\u002F\u002Fgithub.com\u002Fbarbapapazes.png\"\n",[70,572,573,576,578],{"class":72,"line":180},[70,574,575],{"class":84},"  alt",[70,577,88],{"class":76},[70,579,580],{"class":91},"\"Profile Picture\"\n",[70,582,583,586,588],{"class":72,"line":191},[70,584,585],{"class":84},"  class",[70,587,88],{"class":76},[70,589,590],{"class":91},"\"h-32 w-32 my-0 border-4 border-black rounded-full\"\n",[70,592,593],{"class":72,"line":197},[70,594,595],{"class":76},"\u002F>\n",[70,597,598],{"class":72,"line":207},[70,599,140],{"emptyLinePlaceholder":139},[70,601,602],{"class":72,"line":232},[70,603,604],{"class":76},"Hello, I'm Estéban \"[Barbapapazes](https:\u002F\u002Fgh.soubiran.dev)\" Soubiran.\n",[70,606,607],{"class":72,"line":238},[70,608,140],{"emptyLinePlaceholder":139},[70,610,611],{"class":72,"line":248},[70,612,613],{"class":76},"I'm passionate about **web technologies**, continuously expanding my knowledge\n",[70,615,616],{"class":72,"line":258},[70,617,618],{"class":76},"in areas like technology, finance, and entrepreneurship. I love sharing\n",[70,620,621],{"class":72,"line":263},[70,622,623],{"class":76},"insights and collaborating with others. That's why I give talks and write\n",[70,625,626],{"class":72,"line":280},[70,627,628],{"class":76},"articles. I also stream on Twitch, where I work on projects, try out new\n",[70,630,631],{"class":72,"line":297},[70,632,633],{"class":76},"tools, and explain various concepts.\n",[70,635,636],{"class":72,"line":303},[70,637,140],{"emptyLinePlaceholder":139},[70,639,640],{"class":72,"line":312},[70,641,642],{"class":76},"I favor simplicity over complexity when creating user experiences. I focus\n",[70,644,645],{"class":72,"line":317},[70,646,647],{"class":76},"on details to deliver the best possible product that pleases both the\n",[70,649,650],{"class":72,"line":333},[70,651,652],{"class":76},"client and the user.\n",[70,654,655],{"class":72,"line":339},[70,656,140],{"emptyLinePlaceholder":139},[70,658,659],{"class":72,"line":348},[70,660,661],{"class":76},"Thus, I've developed expertise in **JavaScript**, **TypeScript**, **Angular**, **Vue** ,\n",[70,663,664],{"class":72,"line":357},[70,665,666],{"class":76},"**Nuxt**, **Adonis**, **Laravel**, which aids me in thoroughly understanding the\n",[70,668,669],{"class":72,"line":367},[70,670,671],{"class":76},"client's needs and proposing the best solutions.\n",[673,674,677],"callout",{"color":675,"icon":676},"info","i-ph-info-duotone",[10,678,679],{},"You should personalize the content to reflect your own profile.",[499,681,682],{"start":101},[502,683,684,685,688,689,692],{},"Create the ",[52,686,687],{},"Home.vue"," layout component in the ",[52,690,691],{},".vitepress\u002Ftheme\u002Fpages"," directory:",[61,694,696],{"className":63,"code":695,"filename":687,"language":65,"meta":66,"style":66},"\u003Ctemplate>\n  \u003Csection>\n    \u003Ch1 class=\"text-6xl text-black font-semibold\">\n      Welcome!\n    \u003C\u002Fh1>\n\n    \u003Cdiv\n      class=\"mt-16 border-4 border-black bg-[#4FFFAF] p-12 shadow-[8px_8px_0_black]\"\n    >\n      \u003CContent\n        class=\"prose-xl text-black prose prose-zinc [&>div>:first-child]:mt-0 [&>div>:last-child]:mb-0\"\n      \u002F>\n    \u003C\u002Fdiv>\n  \u003C\u002Fsection>\n\n  \u003Csection class=\"mt-16\">\n    \u003Ch2 class=\"text-4xl text-black font-semibold\">\n      Find me online\n    \u003C\u002Fh2>\n\n    \u003Cdiv class=\"mt-8 flex flex-wrap justify-center gap-8 md:justify-start\">\n      \u003CButtonSecondary href=\"https:\u002F\u002Fx.soubiran.dev\" target=\"_blank\">\n        Twitter\n      \u003C\u002FButtonSecondary>\n\n      \u003CButtonSecondary href=\"https:\u002F\u002Fgh.soubiran.dev\" target=\"_blank\">\n        GitHub\n      \u003C\u002FButtonSecondary>\n\n      \u003CButtonSecondary href=\"https:\u002F\u002Flinkedin.soubiran.dev\" target=\"_blank\">\n        LinkedIn\n      \u003C\u002FButtonSecondary>\n\n      \u003CButtonSecondary href=\"https:\u002F\u002Ftv.soubiran.dev\" target=\"_blank\">\n        Twitch\n      \u003C\u002FButtonSecondary>\n    \u003C\u002Fdiv>\n  \u003C\u002Fsection>\n\u003C\u002Ftemplate>\n",[52,697,698,706,715,731,736,744,748,754,763,767,774,784,789,797,805,809,824,839,844,852,856,871,895,900,908,912,933,938,947,952,974,980,989,994,1016,1022,1031,1040,1049],{"__ignoreMap":66},[70,699,700,702,704],{"class":72,"line":73},[70,701,77],{"class":76},[70,703,148],{"class":80},[70,705,98],{"class":76},[70,707,708,710,713],{"class":72,"line":101},[70,709,156],{"class":76},[70,711,712],{"class":80},"section",[70,714,98],{"class":76},[70,716,717,719,722,724,726,729],{"class":72,"line":126},[70,718,174],{"class":76},[70,720,721],{"class":80},"h1",[70,723,161],{"class":84},[70,725,88],{"class":76},[70,727,728],{"class":91},"\"text-6xl text-black font-semibold\"",[70,730,98],{"class":76},[70,732,733],{"class":72,"line":136},[70,734,735],{"class":76},"      Welcome!\n",[70,737,738,740,742],{"class":72,"line":143},[70,739,360],{"class":76},[70,741,721],{"class":80},[70,743,98],{"class":76},[70,745,746],{"class":72,"line":153},[70,747,140],{"emptyLinePlaceholder":139},[70,749,750,752],{"class":72,"line":171},[70,751,174],{"class":76},[70,753,177],{"class":80},[70,755,756,758,760],{"class":72,"line":180},[70,757,183],{"class":84},[70,759,88],{"class":76},[70,761,762],{"class":91},"\"mt-16 border-4 border-black bg-[#4FFFAF] p-12 shadow-[8px_8px_0_black]\"\n",[70,764,765],{"class":72,"line":191},[70,766,194],{"class":76},[70,768,769,771],{"class":72,"line":197},[70,770,200],{"class":76},[70,772,773],{"class":80},"Content\n",[70,775,776,779,781],{"class":72,"line":207},[70,777,778],{"class":84},"        class",[70,780,88],{"class":76},[70,782,783],{"class":91},"\"prose-xl text-black prose prose-zinc [&>div>:first-child]:mt-0 [&>div>:last-child]:mb-0\"\n",[70,785,786],{"class":72,"line":232},[70,787,788],{"class":76},"      \u002F>\n",[70,790,791,793,795],{"class":72,"line":238},[70,792,360],{"class":76},[70,794,268],{"class":80},[70,796,98],{"class":76},[70,798,799,801,803],{"class":72,"line":248},[70,800,370],{"class":76},[70,802,712],{"class":80},[70,804,98],{"class":76},[70,806,807],{"class":72,"line":258},[70,808,140],{"emptyLinePlaceholder":139},[70,810,811,813,815,817,819,822],{"class":72,"line":263},[70,812,156],{"class":76},[70,814,712],{"class":80},[70,816,161],{"class":84},[70,818,88],{"class":76},[70,820,821],{"class":91},"\"mt-16\"",[70,823,98],{"class":76},[70,825,826,828,830,832,834,837],{"class":72,"line":280},[70,827,174],{"class":76},[70,829,29],{"class":80},[70,831,161],{"class":84},[70,833,88],{"class":76},[70,835,836],{"class":91},"\"text-4xl text-black font-semibold\"",[70,838,98],{"class":76},[70,840,841],{"class":72,"line":297},[70,842,843],{"class":76},"      Find me online\n",[70,845,846,848,850],{"class":72,"line":303},[70,847,360],{"class":76},[70,849,29],{"class":80},[70,851,98],{"class":76},[70,853,854],{"class":72,"line":312},[70,855,140],{"emptyLinePlaceholder":139},[70,857,858,860,862,864,866,869],{"class":72,"line":317},[70,859,174],{"class":76},[70,861,268],{"class":80},[70,863,161],{"class":84},[70,865,88],{"class":76},[70,867,868],{"class":91},"\"mt-8 flex flex-wrap justify-center gap-8 md:justify-start\"",[70,870,98],{"class":76},[70,872,873,875,878,880,882,885,888,890,893],{"class":72,"line":333},[70,874,200],{"class":76},[70,876,877],{"class":80},"ButtonSecondary",[70,879,215],{"class":84},[70,881,88],{"class":76},[70,883,884],{"class":91},"\"https:\u002F\u002Fx.soubiran.dev\"",[70,886,887],{"class":84}," target",[70,889,88],{"class":76},[70,891,892],{"class":91},"\"_blank\"",[70,894,98],{"class":76},[70,896,897],{"class":72,"line":339},[70,898,899],{"class":76},"        Twitter\n",[70,901,902,904,906],{"class":72,"line":348},[70,903,251],{"class":76},[70,905,877],{"class":80},[70,907,98],{"class":76},[70,909,910],{"class":72,"line":357},[70,911,140],{"emptyLinePlaceholder":139},[70,913,914,916,918,920,922,925,927,929,931],{"class":72,"line":367},[70,915,200],{"class":76},[70,917,877],{"class":80},[70,919,215],{"class":84},[70,921,88],{"class":76},[70,923,924],{"class":91},"\"https:\u002F\u002Fgh.soubiran.dev\"",[70,926,887],{"class":84},[70,928,88],{"class":76},[70,930,892],{"class":91},[70,932,98],{"class":76},[70,934,935],{"class":72,"line":377},[70,936,937],{"class":76},"        GitHub\n",[70,939,941,943,945],{"class":72,"line":940},28,[70,942,251],{"class":76},[70,944,877],{"class":80},[70,946,98],{"class":76},[70,948,950],{"class":72,"line":949},29,[70,951,140],{"emptyLinePlaceholder":139},[70,953,955,957,959,961,963,966,968,970,972],{"class":72,"line":954},30,[70,956,200],{"class":76},[70,958,877],{"class":80},[70,960,215],{"class":84},[70,962,88],{"class":76},[70,964,965],{"class":91},"\"https:\u002F\u002Flinkedin.soubiran.dev\"",[70,967,887],{"class":84},[70,969,88],{"class":76},[70,971,892],{"class":91},[70,973,98],{"class":76},[70,975,977],{"class":72,"line":976},31,[70,978,979],{"class":76},"        LinkedIn\n",[70,981,983,985,987],{"class":72,"line":982},32,[70,984,251],{"class":76},[70,986,877],{"class":80},[70,988,98],{"class":76},[70,990,992],{"class":72,"line":991},33,[70,993,140],{"emptyLinePlaceholder":139},[70,995,997,999,1001,1003,1005,1008,1010,1012,1014],{"class":72,"line":996},34,[70,998,200],{"class":76},[70,1000,877],{"class":80},[70,1002,215],{"class":84},[70,1004,88],{"class":76},[70,1006,1007],{"class":91},"\"https:\u002F\u002Ftv.soubiran.dev\"",[70,1009,887],{"class":84},[70,1011,88],{"class":76},[70,1013,892],{"class":91},[70,1015,98],{"class":76},[70,1017,1019],{"class":72,"line":1018},35,[70,1020,1021],{"class":76},"        Twitch\n",[70,1023,1025,1027,1029],{"class":72,"line":1024},36,[70,1026,251],{"class":76},[70,1028,877],{"class":80},[70,1030,98],{"class":76},[70,1032,1034,1036,1038],{"class":72,"line":1033},37,[70,1035,360],{"class":76},[70,1037,268],{"class":80},[70,1039,98],{"class":76},[70,1041,1043,1045,1047],{"class":72,"line":1042},38,[70,1044,370],{"class":76},[70,1046,712],{"class":80},[70,1048,98],{"class":76},[70,1050,1052,1054,1056],{"class":72,"line":1051},39,[70,1053,129],{"class":76},[70,1055,148],{"class":80},[70,1057,98],{"class":76},[499,1059,1060],{"start":126},[502,1061,1062,1063,55,1065,692],{},"Create a ",[52,1064,877],{},[52,1066,58],{},[61,1068,1071],{"className":63,"code":1069,"filename":1070,"language":65,"meta":66,"style":66},"\u003Cscript lang=\"ts\" setup>\ndefineProps\u003C{\n  href: string\n}>()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Ca\n    :href\n    class=\"inline-block border-4 border-black bg-[var(--color-purple)] px-8 py-4 text-white shadow-[4px_4px_0_black] transition duration-150 ease-linear hover:bg-[#828cd2] hover:shadow-[6px_6px_0_black] hover:-translate-x-[0.125rem] hover:-translate-y-[0.125rem]\"\n  >\n    \u003Cslot \u002F>\n  \u003C\u002Fa>\n\u003C\u002Ftemplate>\n","Example",[52,1072,1073,1089,1097,1109,1114,1122,1126,1134,1141,1146,1156,1161,1174,1182],{"__ignoreMap":66},[70,1074,1075,1077,1079,1081,1083,1085,1087],{"class":72,"line":73},[70,1076,77],{"class":76},[70,1078,81],{"class":80},[70,1080,85],{"class":84},[70,1082,88],{"class":76},[70,1084,92],{"class":91},[70,1086,95],{"class":84},[70,1088,98],{"class":76},[70,1090,1091,1094],{"class":72,"line":101},[70,1092,1093],{"class":84},"defineProps",[70,1095,1096],{"class":76},"\u003C{\n",[70,1098,1099,1103,1106],{"class":72,"line":126},[70,1100,1102],{"class":1101},"sP4rz","  href",[70,1104,1105],{"class":104},":",[70,1107,1108],{"class":111}," string\n",[70,1110,1111],{"class":72,"line":136},[70,1112,1113],{"class":76},"}>()\n",[70,1115,1116,1118,1120],{"class":72,"line":143},[70,1117,129],{"class":76},[70,1119,81],{"class":80},[70,1121,98],{"class":76},[70,1123,1124],{"class":72,"line":153},[70,1125,140],{"emptyLinePlaceholder":139},[70,1127,1128,1130,1132],{"class":72,"line":171},[70,1129,77],{"class":76},[70,1131,148],{"class":80},[70,1133,98],{"class":76},[70,1135,1136,1138],{"class":72,"line":180},[70,1137,156],{"class":76},[70,1139,1140],{"class":80},"a\n",[70,1142,1143],{"class":72,"line":191},[70,1144,1145],{"class":84},"    :href\n",[70,1147,1148,1151,1153],{"class":72,"line":197},[70,1149,1150],{"class":84},"    class",[70,1152,88],{"class":76},[70,1154,1155],{"class":91},"\"inline-block border-4 border-black bg-[var(--color-purple)] px-8 py-4 text-white shadow-[4px_4px_0_black] transition duration-150 ease-linear hover:bg-[#828cd2] hover:shadow-[6px_6px_0_black] hover:-translate-x-[0.125rem] hover:-translate-y-[0.125rem]\"\n",[70,1157,1158],{"class":72,"line":207},[70,1159,1160],{"class":76},"  >\n",[70,1162,1163,1165,1168,1172],{"class":72,"line":232},[70,1164,174],{"class":76},[70,1166,1167],{"class":80},"slot",[70,1169,1171],{"class":1170},"sPrNH"," \u002F",[70,1173,98],{"class":76},[70,1175,1176,1178,1180],{"class":72,"line":238},[70,1177,370],{"class":76},[70,1179,14],{"class":80},[70,1181,98],{"class":76},[70,1183,1184,1186,1188],{"class":72,"line":248},[70,1185,129],{"class":76},[70,1187,148],{"class":80},[70,1189,98],{"class":76},[499,1191,1192],{"start":136},[502,1193,1194,1195,1198,1199,1202,1203,1105],{},"Update the ",[52,1196,1197],{},"app.css"," and ",[52,1200,1201],{},"alerts.css"," files to include the new color ",[52,1204,1205],{},"--color-purple",[61,1207,1211],{"className":1208,"code":1209,"filename":1201,"language":1210,"meta":66,"style":66},"language-css shiki shiki-themes github-light github-light github-dark has-diff","@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n:root {\n  --color-yellow: #ffbf00;\n  --color-purple: #6c71c4; \u002F* [!code ++] *\u002F\n  --color-sand: #fdf6e3;\n}\n","css",[52,1212,1213,1221,1228,1235,1239,1247,1260,1276,1288],{"__ignoreMap":66},[70,1214,1215,1218],{"class":72,"line":73},[70,1216,1217],{"class":104},"@tailwind",[70,1219,1220],{"class":76}," base;\n",[70,1222,1223,1225],{"class":72,"line":101},[70,1224,1217],{"class":104},[70,1226,1227],{"class":76}," components;\n",[70,1229,1230,1232],{"class":72,"line":126},[70,1231,1217],{"class":104},[70,1233,1234],{"class":76}," utilities;\n",[70,1236,1237],{"class":72,"line":136},[70,1238,140],{"emptyLinePlaceholder":139},[70,1240,1241,1244],{"class":72,"line":143},[70,1242,1243],{"class":84},":root",[70,1245,1246],{"class":76}," {\n",[70,1248,1249,1252,1254,1257],{"class":72,"line":153},[70,1250,1251],{"class":1101},"  --color-yellow",[70,1253,532],{"class":76},[70,1255,1256],{"class":111},"#ffbf00",[70,1258,1259],{"class":76},";\n",[70,1261,1265,1268,1270,1273],{"class":1262,"line":171},[72,1263,1264],"diff","add",[70,1266,1267],{"class":1101},"  --color-purple",[70,1269,532],{"class":76},[70,1271,1272],{"class":111},"#6c71c4",[70,1274,1275],{"class":76},"; ",[70,1277,1278,1281,1283,1286],{"class":72,"line":180},[70,1279,1280],{"class":1101},"  --color-sand",[70,1282,532],{"class":76},[70,1284,1285],{"class":111},"#fdf6e3",[70,1287,1259],{"class":76},[70,1289,1290],{"class":72,"line":191},[70,1291,1292],{"class":76},"}\n",[61,1294,1296],{"className":1208,"code":1295,"filename":1070,"language":1210,"meta":66,"style":66},":root {\n  --color-note: #3a85ff;\n  --color-tip: #00ddb3;\n  --color-warning: var(--color-yellow);\n  --color-severe: #ff7002;\n  --color-caution: #f34720;\n  --color-important: var(--color-purple); \u002F* [!code ++] *\u002F\n}\n",[52,1297,1298,1304,1316,1328,1347,1359,1371,1388],{"__ignoreMap":66},[70,1299,1300,1302],{"class":72,"line":73},[70,1301,1243],{"class":84},[70,1303,1246],{"class":76},[70,1305,1306,1309,1311,1314],{"class":72,"line":101},[70,1307,1308],{"class":1101},"  --color-note",[70,1310,532],{"class":76},[70,1312,1313],{"class":111},"#3a85ff",[70,1315,1259],{"class":76},[70,1317,1318,1321,1323,1326],{"class":72,"line":126},[70,1319,1320],{"class":1101},"  --color-tip",[70,1322,532],{"class":76},[70,1324,1325],{"class":111},"#00ddb3",[70,1327,1259],{"class":76},[70,1329,1330,1333,1335,1338,1341,1344],{"class":72,"line":136},[70,1331,1332],{"class":1101},"  --color-warning",[70,1334,532],{"class":76},[70,1336,1337],{"class":111},"var",[70,1339,1340],{"class":76},"(",[70,1342,1343],{"class":1101},"--color-yellow",[70,1345,1346],{"class":76},");\n",[70,1348,1349,1352,1354,1357],{"class":72,"line":143},[70,1350,1351],{"class":1101},"  --color-severe",[70,1353,532],{"class":76},[70,1355,1356],{"class":111},"#ff7002",[70,1358,1259],{"class":76},[70,1360,1361,1364,1366,1369],{"class":72,"line":153},[70,1362,1363],{"class":1101},"  --color-caution",[70,1365,532],{"class":76},[70,1367,1368],{"class":111},"#f34720",[70,1370,1259],{"class":76},[70,1372,1374,1377,1379,1381,1383,1385],{"class":1373,"line":171},[72,1263,1264],[70,1375,1376],{"class":1101},"  --color-important",[70,1378,532],{"class":76},[70,1380,1337],{"class":111},[70,1382,1340],{"class":76},[70,1384,1205],{"class":1101},[70,1386,1387],{"class":76},"); ",[70,1389,1390],{"class":72,"line":180},[70,1391,1292],{"class":76},[499,1393,1394],{"start":143},[502,1395,1396,1397,1399],{},"Route the homepage by updating the ",[52,1398,389],{}," component:",[61,1401,1403],{"className":63,"code":1402,"filename":389,"language":65,"meta":66,"style":66},"\u003Cscript lang=\"ts\" setup>\nconst { frontmatter } = useData()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv class=\"min-h-screen bg-[#FC88FF] py-16\">\n    \u003Cmain class=\"mx-auto max-w-screen-md\">\n      \u003CHome v-if=\"frontmatter.layout === 'home'\" \u002F> \u002F\u002F [!code ++]\n\n      \u003CBlogIndex v-else-if=\"frontmatter.layout === 'blog'\" \u002F>\n      \u003CBlogShow v-else-if=\"frontmatter.layout === 'blog-show'\" \u002F>\n\n      \u003CProjectsIndex v-else-if=\"frontmatter.layout === 'projects'\" \u002F>\n    \u003C\u002Fmain>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n",[52,1404,1405,1421,1438,1446,1450,1458,1472,1488,1513,1517,1541,1563,1567,1589,1597,1605],{"__ignoreMap":66},[70,1406,1407,1409,1411,1413,1415,1417,1419],{"class":72,"line":73},[70,1408,77],{"class":76},[70,1410,81],{"class":80},[70,1412,85],{"class":84},[70,1414,88],{"class":76},[70,1416,92],{"class":91},[70,1418,95],{"class":84},[70,1420,98],{"class":76},[70,1422,1423,1425,1427,1430,1432,1434,1436],{"class":72,"line":101},[70,1424,105],{"class":104},[70,1426,108],{"class":76},[70,1428,1429],{"class":111},"frontmatter",[70,1431,115],{"class":76},[70,1433,88],{"class":104},[70,1435,120],{"class":84},[70,1437,123],{"class":76},[70,1439,1440,1442,1444],{"class":72,"line":126},[70,1441,129],{"class":76},[70,1443,81],{"class":80},[70,1445,98],{"class":76},[70,1447,1448],{"class":72,"line":136},[70,1449,140],{"emptyLinePlaceholder":139},[70,1451,1452,1454,1456],{"class":72,"line":143},[70,1453,77],{"class":76},[70,1455,148],{"class":80},[70,1457,98],{"class":76},[70,1459,1460,1462,1464,1466,1468,1470],{"class":72,"line":153},[70,1461,156],{"class":76},[70,1463,268],{"class":80},[70,1465,161],{"class":84},[70,1467,88],{"class":76},[70,1469,450],{"class":91},[70,1471,98],{"class":76},[70,1473,1474,1476,1479,1481,1483,1486],{"class":72,"line":171},[70,1475,174],{"class":76},[70,1477,1478],{"class":80},"main",[70,1480,161],{"class":84},[70,1482,88],{"class":76},[70,1484,1485],{"class":91},"\"mx-auto max-w-screen-md\"",[70,1487,98],{"class":76},[70,1489,1490,1492,1494,1497,1499,1502,1505,1508,1511],{"class":72,"line":180},[70,1491,200],{"class":76},[70,1493,491],{"class":80},[70,1495,1496],{"class":104}," v-if",[70,1498,88],{"class":76},[70,1500,1501],{"class":91},"\"",[70,1503,1504],{"class":76},"frontmatter.layout ",[70,1506,1507],{"class":104},"===",[70,1509,1510],{"class":91}," 'home'\"",[70,1512,462],{"class":76},[70,1514,1515],{"class":72,"line":191},[70,1516,140],{"emptyLinePlaceholder":139},[70,1518,1519,1521,1524,1527,1529,1531,1533,1535,1538],{"class":72,"line":197},[70,1520,200],{"class":76},[70,1522,1523],{"class":80},"BlogIndex",[70,1525,1526],{"class":104}," v-else-if",[70,1528,88],{"class":76},[70,1530,1501],{"class":91},[70,1532,1504],{"class":76},[70,1534,1507],{"class":104},[70,1536,1537],{"class":91}," 'blog'\"",[70,1539,1540],{"class":76}," \u002F>\n",[70,1542,1543,1545,1548,1550,1552,1554,1556,1558,1561],{"class":72,"line":207},[70,1544,200],{"class":76},[70,1546,1547],{"class":80},"BlogShow",[70,1549,1526],{"class":104},[70,1551,88],{"class":76},[70,1553,1501],{"class":91},[70,1555,1504],{"class":76},[70,1557,1507],{"class":104},[70,1559,1560],{"class":91}," 'blog-show'\"",[70,1562,1540],{"class":76},[70,1564,1565],{"class":72,"line":232},[70,1566,140],{"emptyLinePlaceholder":139},[70,1568,1569,1571,1574,1576,1578,1580,1582,1584,1587],{"class":72,"line":238},[70,1570,200],{"class":76},[70,1572,1573],{"class":80},"ProjectsIndex",[70,1575,1526],{"class":104},[70,1577,88],{"class":76},[70,1579,1501],{"class":91},[70,1581,1504],{"class":76},[70,1583,1507],{"class":104},[70,1585,1586],{"class":91}," 'projects'\"",[70,1588,1540],{"class":76},[70,1590,1591,1593,1595],{"class":72,"line":248},[70,1592,360],{"class":76},[70,1594,1478],{"class":80},[70,1596,98],{"class":76},[70,1598,1599,1601,1603],{"class":72,"line":258},[70,1600,370],{"class":76},[70,1602,268],{"class":80},[70,1604,98],{"class":76},[70,1606,1607,1609,1611],{"class":72,"line":263},[70,1608,129],{"class":76},[70,1610,148],{"class":80},[70,1612,98],{"class":76},[45,1614,1616,1617],{"id":1615},"refactor-buttonprimary","Refactor ",[52,1618,285],{},[10,1620,1621,1622,1624,1625,1628],{},"I've also refined the ",[52,1623,285],{}," component to remove the default ",[52,1626,1627],{},"href"," attribute and employ a prop instead.",[61,1630,1632],{"className":63,"code":1631,"filename":1070,"language":65,"meta":66,"style":66},"\u003Cscript lang=\"ts\" setup>\ndefineProps\u003C{\n  href: string\n}>()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Ca\n    :href\n    class=\"...\"\n  >\n    \u003Cslot \u002F>\n  \u003C\u002Fa>\n\u003C\u002Ftemplate>\n",[52,1633,1634,1650,1656,1664,1668,1676,1680,1688,1694,1698,1707,1711,1721,1729],{"__ignoreMap":66},[70,1635,1636,1638,1640,1642,1644,1646,1648],{"class":72,"line":73},[70,1637,77],{"class":76},[70,1639,81],{"class":80},[70,1641,85],{"class":84},[70,1643,88],{"class":76},[70,1645,92],{"class":91},[70,1647,95],{"class":84},[70,1649,98],{"class":76},[70,1651,1652,1654],{"class":72,"line":101},[70,1653,1093],{"class":84},[70,1655,1096],{"class":76},[70,1657,1658,1660,1662],{"class":72,"line":126},[70,1659,1102],{"class":1101},[70,1661,1105],{"class":104},[70,1663,1108],{"class":111},[70,1665,1666],{"class":72,"line":136},[70,1667,1113],{"class":76},[70,1669,1670,1672,1674],{"class":72,"line":143},[70,1671,129],{"class":76},[70,1673,81],{"class":80},[70,1675,98],{"class":76},[70,1677,1678],{"class":72,"line":153},[70,1679,140],{"emptyLinePlaceholder":139},[70,1681,1682,1684,1686],{"class":72,"line":171},[70,1683,77],{"class":76},[70,1685,148],{"class":80},[70,1687,98],{"class":76},[70,1689,1690,1692],{"class":72,"line":180},[70,1691,156],{"class":76},[70,1693,1140],{"class":80},[70,1695,1696],{"class":72,"line":191},[70,1697,1145],{"class":84},[70,1699,1700,1702,1704],{"class":72,"line":197},[70,1701,1150],{"class":84},[70,1703,88],{"class":76},[70,1705,1706],{"class":91},"\"...\"\n",[70,1708,1709],{"class":72,"line":207},[70,1710,1160],{"class":76},[70,1712,1713,1715,1717,1719],{"class":72,"line":232},[70,1714,174],{"class":76},[70,1716,1167],{"class":80},[70,1718,1171],{"class":1170},[70,1720,98],{"class":76},[70,1722,1723,1725,1727],{"class":72,"line":238},[70,1724,370],{"class":76},[70,1726,14],{"class":80},[70,1728,98],{"class":76},[70,1730,1731,1733,1735],{"class":72,"line":248},[70,1732,129],{"class":76},[70,1734,148],{"class":80},[70,1736,98],{"class":76},[45,1738,1740],{"id":1739},"basic-responsive-design","Basic responsive design",[10,1742,1743,1744,1747,1748,1751,1752,1755,1756,390],{},"I've implemented a few classes to enhance the blog's responsiveness. In the ",[52,1745,1746],{},"BlogShow.vue"," component, I've removed the ",[52,1749,1750],{},"mx-4"," class from the ",[52,1753,1754],{},"article"," container. Instead, the margin is managed in the ",[52,1757,389],{},[61,1759,1761],{"className":63,"code":1760,"filename":389,"language":65,"meta":66,"style":66},"\u003Cscript lang=\"ts\" setup>\nconst { frontmatter } = useData()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv class=\"min-h-screen bg-[#FC88FF]\">\n    \u003CTheHeader \u002F>\n\n    \u003Cdiv class=\"px-4 py-16\">\n      \u003Cmain class=\"mx-auto max-w-screen-md\">\n        \u003CHome v-if=\"frontmatter.layout === 'home'\" \u002F>\n\n        \u003CBlogIndex v-else-if=\"frontmatter.layout === 'blog'\" \u002F>\n        \u003CBlogShow v-else-if=\"frontmatter.layout === 'blog-show'\" \u002F>\n\n        \u003CProjectsIndex v-else-if=\"frontmatter.layout === 'projects'\" \u002F>\n      \u003C\u002Fmain>\n    \u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n",[52,1762,1763,1779,1795,1803,1807,1815,1830,1838,1842,1857,1871,1891,1895,1915,1935,1939,1959,1967,1975,1983],{"__ignoreMap":66},[70,1764,1765,1767,1769,1771,1773,1775,1777],{"class":72,"line":73},[70,1766,77],{"class":76},[70,1768,81],{"class":80},[70,1770,85],{"class":84},[70,1772,88],{"class":76},[70,1774,92],{"class":91},[70,1776,95],{"class":84},[70,1778,98],{"class":76},[70,1780,1781,1783,1785,1787,1789,1791,1793],{"class":72,"line":101},[70,1782,105],{"class":104},[70,1784,108],{"class":76},[70,1786,1429],{"class":111},[70,1788,115],{"class":76},[70,1790,88],{"class":104},[70,1792,120],{"class":84},[70,1794,123],{"class":76},[70,1796,1797,1799,1801],{"class":72,"line":126},[70,1798,129],{"class":76},[70,1800,81],{"class":80},[70,1802,98],{"class":76},[70,1804,1805],{"class":72,"line":136},[70,1806,140],{"emptyLinePlaceholder":139},[70,1808,1809,1811,1813],{"class":72,"line":143},[70,1810,77],{"class":76},[70,1812,148],{"class":80},[70,1814,98],{"class":76},[70,1816,1817,1819,1821,1823,1825,1828],{"class":72,"line":153},[70,1818,156],{"class":76},[70,1820,268],{"class":80},[70,1822,161],{"class":84},[70,1824,88],{"class":76},[70,1826,1827],{"class":91},"\"min-h-screen bg-[#FC88FF]\"",[70,1829,98],{"class":76},[70,1831,1832,1834,1836],{"class":72,"line":171},[70,1833,174],{"class":76},[70,1835,459],{"class":80},[70,1837,1540],{"class":76},[70,1839,1840],{"class":72,"line":180},[70,1841,140],{"emptyLinePlaceholder":139},[70,1843,1844,1846,1848,1850,1852,1855],{"class":72,"line":191},[70,1845,174],{"class":76},[70,1847,268],{"class":80},[70,1849,161],{"class":84},[70,1851,88],{"class":76},[70,1853,1854],{"class":91},"\"px-4 py-16\"",[70,1856,98],{"class":76},[70,1858,1859,1861,1863,1865,1867,1869],{"class":72,"line":197},[70,1860,200],{"class":76},[70,1862,1478],{"class":80},[70,1864,161],{"class":84},[70,1866,88],{"class":76},[70,1868,1485],{"class":91},[70,1870,98],{"class":76},[70,1872,1873,1875,1877,1879,1881,1883,1885,1887,1889],{"class":72,"line":207},[70,1874,210],{"class":76},[70,1876,491],{"class":80},[70,1878,1496],{"class":104},[70,1880,88],{"class":76},[70,1882,1501],{"class":91},[70,1884,1504],{"class":76},[70,1886,1507],{"class":104},[70,1888,1510],{"class":91},[70,1890,1540],{"class":76},[70,1892,1893],{"class":72,"line":232},[70,1894,140],{"emptyLinePlaceholder":139},[70,1896,1897,1899,1901,1903,1905,1907,1909,1911,1913],{"class":72,"line":238},[70,1898,210],{"class":76},[70,1900,1523],{"class":80},[70,1902,1526],{"class":104},[70,1904,88],{"class":76},[70,1906,1501],{"class":91},[70,1908,1504],{"class":76},[70,1910,1507],{"class":104},[70,1912,1537],{"class":91},[70,1914,1540],{"class":76},[70,1916,1917,1919,1921,1923,1925,1927,1929,1931,1933],{"class":72,"line":248},[70,1918,210],{"class":76},[70,1920,1547],{"class":80},[70,1922,1526],{"class":104},[70,1924,88],{"class":76},[70,1926,1501],{"class":91},[70,1928,1504],{"class":76},[70,1930,1507],{"class":104},[70,1932,1560],{"class":91},[70,1934,1540],{"class":76},[70,1936,1937],{"class":72,"line":258},[70,1938,140],{"emptyLinePlaceholder":139},[70,1940,1941,1943,1945,1947,1949,1951,1953,1955,1957],{"class":72,"line":263},[70,1942,210],{"class":76},[70,1944,1573],{"class":80},[70,1946,1526],{"class":104},[70,1948,88],{"class":76},[70,1950,1501],{"class":91},[70,1952,1504],{"class":76},[70,1954,1507],{"class":104},[70,1956,1586],{"class":91},[70,1958,1540],{"class":76},[70,1960,1961,1963,1965],{"class":72,"line":280},[70,1962,251],{"class":76},[70,1964,1478],{"class":80},[70,1966,98],{"class":76},[70,1968,1969,1971,1973],{"class":72,"line":297},[70,1970,360],{"class":76},[70,1972,268],{"class":80},[70,1974,98],{"class":76},[70,1976,1977,1979,1981],{"class":72,"line":303},[70,1978,370],{"class":76},[70,1980,268],{"class":80},[70,1982,98],{"class":76},[70,1984,1985,1987,1989],{"class":72,"line":312},[70,1986,129],{"class":76},[70,1988,148],{"class":80},[70,1990,98],{"class":76},[10,1992,1993,1994,1996,1997,2000,2001,2003,2004,2007],{},"On the first ",[52,1995,268],{},", I removed the ",[52,1998,1999],{},"py-16"," class. Around the ",[52,2002,1478],{},", I've added ",[52,2005,2006],{},"px-4 py-16",". This ensures that the content remains clear of the screen edges on mobile devices, improving readability.",[29,2009,2011],{"id":2010},"deploy-to-cloudflare-pages","Deploy to Cloudflare Pages",[10,2013,2014,2015,2018],{},"Now that our blog is fully developed, we can ",[20,2016,2017],{},"deploy it to Cloudflare Pages",".",[10,2020,2021],{},"Cloudflare is a company that provides numerous services to enhance web speed and security, such as a zero-trust solution, a WAF, CDN, DNS, DDoS protection, and more for both businesses and individuals.",[10,2023,2024],{},"Their most renowned service is the reverse proxy. Cloudflare acts as the main gateway for our traffic, subsequently routing it internally to the correct server using DNS. This allows us to mask our server's IP, cache static assets, and protect our server from DDoS attacks.",[10,2026,2027,2029,2030,2037],{},[20,2028,22],{}," is one of their offerings. It is a hosting platform for static and ",[14,2031,2034],{"href":2032,"rel":2033},"https:\u002F\u002Fjamstack.wtf\u002F",[18],[20,2035,2036],{},"JAMstack"," websites, with a generous free tier perfect for personal projects.",[673,2039,2041],{"color":2040,"icon":676},"primary",[10,2042,2043,2044,2051,2052,2059],{},"Platforms like ",[14,2045,2048],{"href":2046,"rel":2047},"https:\u002F\u002Fvercel.com\u002F",[18],[20,2049,2050],{},"Vercel"," or ",[14,2053,2056],{"href":2054,"rel":2055},"https:\u002F\u002Fwww.netlify.com\u002F",[18],[20,2057,2058],{},"Netlify"," could have been used to deploy our blog. They are excellent platforms for static websites. I chose Cloudflare Pages as it has become my preferred platform because it combines numerous services: DNS, CDN, DDoS protection, hosting, Registrar, Workers, and more.",[10,2061,2062],{},"Using Cloudflare Pages, we have two choices for website deployment:",[499,2064,2065,2071],{},[502,2066,2067,2070],{},[20,2068,2069],{},"CLI",": Use the Cloudflare CLI to push the generated files to Cloudflare Pages, which then automatically deploys the website across their network.",[502,2072,2073,2076,2077,2051,2080,2083,2084,2086,2087,2090],{},[20,2074,2075],{},"Git Repository",": Connect our ",[20,2078,2079],{},"GitHub",[20,2081,2082],{},"GitLab"," repository to Cloudflare Pages. Any commit to the ",[52,2085,1478],{}," branch prompts Cloudflare to automatically build and deploy the site. We will use this option because of its convenience. Simply push and the site is live. Additionally, Cloudflare deploys a ",[20,2088,2089],{},"preview for each pull request"," for verifying changes before they are merged.",[673,2092,2093],{"color":675,"icon":676},[10,2094,2095,2096,2099],{},"You need a ",[20,2097,2098],{},"Cloudflare account"," to proceed. If you do not have one, you can create a free account and log in.",[10,2101,2102],{},"In the left sidebar, click on \"Workers & Pages\". We will see the \"Overview\" dashboard. Click on the \"Create\" button to start a new project.",[10,2104,2105],{},"By default, the creation panel is set to \"Workers\". Click on the \"Pages\" tab to switch to the \"Pages\" creation panel. Then, click \"Connect to Git\".",[10,2107,2108],{},"Select the repository hosting the blog. Once selected, click on \"Begin Setup\".",[2110,2111,2112,2117],"figure",{},[2113,2114],"img",{"alt":2115,"src":2116},"Connect to Git Page","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages\u002Fvitepress-cloudflare-connect-to-git.png",[2118,2119,2115],"figcaption",{},[10,2121,2122,2123,2126,2127,2130,2131,2134,2135,2130,2138,2141],{},"The crucial part is the ",[20,2124,2125],{},"\"Build settings.\""," Set the ",[52,2128,2129],{},"Build command"," to ",[52,2132,2133],{},"npm run build"," and the ",[52,2136,2137],{},"Build output directory",[52,2139,2140],{},".vitepress\u002Fdist",". There settings are specific to VitePress projects and our blog's configuration.",[10,2143,2144],{},"Finally, click \"Save and Deploy.\" Cloudflare will build and deploy our blog. Once deployment is complete, it will be presented with our blog's URL. Click it to see our live blog. 🚀",[10,2146,2147],{},"Share the URL with friends and family. We can also post it on social media to reach a broader audience. Enjoy the new blog! 🎉",[673,2149,2152],{"color":2150,"icon":2151},"success","i-ph-lightbulb-duotone",[10,2153,2154,2155,2158],{},"Add a ",[20,2156,2157],{},"custom domain"," to your blog under the \"Custom domains\" tab. It's straightforward to set up and makes your blog appear more professional.",[2110,2160,2161,2165],{},[2113,2162],{"alt":2163,"src":2164},"Home Page","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages\u002Fvitepress-home.png",[2118,2166,2163],{},[29,2168,2170],{"id":2169},"conclusion","Conclusion",[10,2172,2173,2174,2177,2178,2181,2182,2185],{},"Congratulations! You have successfully ",[20,2175,2176],{},"created a blog with VitePress and Vue.js"," from scratch. You have learned how to establish a new VitePress project, set basic custom themes, design the blog's architecture, compile and read blog articles, automatically enhance ",[20,2179,2180],{},"SEO metadata and sitemaps",", showcase GitHub projects, generate ",[20,2183,2184],{},"Open Graph images"," automatically, and share your blog globally.",[10,2187,2188],{},"Your journey has culminated in a fully operational and engaging blog, allowing you to focus solely on producing content. Simply write and publish, as the blog will autonomously manage everything else.",[10,2190,2191],{},"I genuinely hope you found this series enlightening. Should you have any questions or feedback, please feel free to share your thoughts in the comments section below each article.",[2193,2194,2195],"style",{},"html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sovSZ, html code.shiki .sovSZ{--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D}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 pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}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 .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sPrNH, html code.shiki .sPrNH{--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":66,"searchDepth":101,"depth":101,"links":2197},[2198,2205,2206],{"id":31,"depth":101,"text":32,"children":2199},[2200,2201,2202,2204],{"id":38,"depth":126,"text":47},{"id":490,"depth":126,"text":491},{"id":1615,"depth":126,"text":2203},"Refactor ButtonPrimary",{"id":1739,"depth":126,"text":1740},{"id":2010,"depth":101,"text":2011},{"id":2169,"depth":101,"text":2170},"c05ae463-c5ae-4c43-872d-bb05263c7f74","2024-11-21","Deploy the blog to Cloudflare Pages for global accessibility. Discover how to deploy the blog to Cloudflare Pages and share it worldwide with ease.",{"branch":2211},"09.share-the-blog-globally",null,{},"\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages","---\ncontentId: c05ae463-c5ae-4c43-872d-bb05263c7f74\npart: 9\ntitle: Deploy VitePress Blog Globally with Cloudflare Pages\ndescription: Deploy the blog to Cloudflare Pages for global accessibility. Discover how to deploy the blog to Cloudflare Pages and share it worldwide with ease.\ngithub:\n  branch: 09.share-the-blog-globally\ndate: 2024-11-21\nseriesSlug: create-a-blog-with-vitepress-and-vue-js-from-scratch\n---\n\nToday marks the day we make our blog accessible to the world through [**Cloudflare Pages**](https:\u002F\u002Fpages.cloudflare.com). This process is straightforward once you have learned the procedure. The first attempt may appear daunting, especially if you are new to web development, but with today's guide, you will be able to **share the blog globally** in just a few clicks.\n\n## Essential components\n\nBefore deploying our blog, we must address a few essential components. Our blog requires a **header** and a **homepage** to be complete.\n\n### Header\n\nFor the header, I will keep it as minimal as possible since it is not the primary focus of this series. I will create a `TheHeader.vue` component in the `.vitepress\u002Ftheme\u002Fcomponents` directory. This component will contain the title of our blog and a navigation bar with two links: Blog and Projects, which is a common pattern for blogs.\n\n```vue [TheHeader.vue]\n\u003Cscript lang=\"ts\" setup>\nconst { site } = useData()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cheader class=\"border-b-4 border-black bg-white p-8\">\n    \u003Cdiv\n      class=\"mx-auto max-w-screen-md flex flex-col items-center justify-between gap-6 md:flex-row\"\n    >\n      \u003Cspan>\n        \u003Ca href=\"\u002F\" class=\"text-2xl text-black font-semibold\">\n          {{ site.title }}\n        \u003C\u002Fa>\n      \u003C\u002Fspan>\n\n      \u003Cdiv class=\"flex items-center gap-6\">\n        \u003CButtonPrimary href=\"\u002Fblog\">\n          Blog\n        \u003C\u002FButtonPrimary>\n\n        \u003CButtonPrimary href=\"\u002Fprojects\">\n          Projects\n        \u003C\u002FButtonPrimary>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  \u003C\u002Fheader>\n\u003C\u002Ftemplate>\n```\n\nThen, we can include it in the `Layout.vue` component.\n\n```vue [Layout.vue]\n\u003Cscript lang=\"ts\" setup>\n\u002F\u002F ...\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv class=\"min-h-screen bg-[#FC88FF] py-16\">\n    \u003CTheHeader \u002F> \u002F\u002F [!code ++]\n\n    \u003C!-- ... -->\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\n### Home\n\nFor the **homepage**, we already master the process.\n\n1. Create an `index.md` file in the `src` directory with the following content:\n\n```md [index.md]\n---\nlayout: home\ntitle: Home\n---\n\n\u003Cimg\n  src=\"https:\u002F\u002Fgithub.com\u002Fbarbapapazes.png\"\n  alt=\"Profile Picture\"\n  class=\"h-32 w-32 my-0 border-4 border-black rounded-full\"\n\u002F>\n\nHello, I'm Estéban \"[Barbapapazes](https:\u002F\u002Fgh.soubiran.dev)\" Soubiran.\n\nI'm passionate about **web technologies**, continuously expanding my knowledge\nin areas like technology, finance, and entrepreneurship. I love sharing\ninsights and collaborating with others. That's why I give talks and write\narticles. I also stream on Twitch, where I work on projects, try out new\ntools, and explain various concepts.\n\nI favor simplicity over complexity when creating user experiences. I focus\non details to deliver the best possible product that pleases both the\nclient and the user.\n\nThus, I've developed expertise in **JavaScript**, **TypeScript**, **Angular**, **Vue** ,\n**Nuxt**, **Adonis**, **Laravel**, which aids me in thoroughly understanding the\nclient's needs and proposing the best solutions.\n```\n\n::callout{icon=\"i-ph-info-duotone\" color=\"info\"}\nYou should personalize the content to reflect your own profile.\n::\n\n2. Create the `Home.vue` layout component in the `.vitepress\u002Ftheme\u002Fpages` directory:\n\n```vue [Home.vue]\n\u003Ctemplate>\n  \u003Csection>\n    \u003Ch1 class=\"text-6xl text-black font-semibold\">\n      Welcome!\n    \u003C\u002Fh1>\n\n    \u003Cdiv\n      class=\"mt-16 border-4 border-black bg-[#4FFFAF] p-12 shadow-[8px_8px_0_black]\"\n    >\n      \u003CContent\n        class=\"prose-xl text-black prose prose-zinc [&>div>:first-child]:mt-0 [&>div>:last-child]:mb-0\"\n      \u002F>\n    \u003C\u002Fdiv>\n  \u003C\u002Fsection>\n\n  \u003Csection class=\"mt-16\">\n    \u003Ch2 class=\"text-4xl text-black font-semibold\">\n      Find me online\n    \u003C\u002Fh2>\n\n    \u003Cdiv class=\"mt-8 flex flex-wrap justify-center gap-8 md:justify-start\">\n      \u003CButtonSecondary href=\"https:\u002F\u002Fx.soubiran.dev\" target=\"_blank\">\n        Twitter\n      \u003C\u002FButtonSecondary>\n\n      \u003CButtonSecondary href=\"https:\u002F\u002Fgh.soubiran.dev\" target=\"_blank\">\n        GitHub\n      \u003C\u002FButtonSecondary>\n\n      \u003CButtonSecondary href=\"https:\u002F\u002Flinkedin.soubiran.dev\" target=\"_blank\">\n        LinkedIn\n      \u003C\u002FButtonSecondary>\n\n      \u003CButtonSecondary href=\"https:\u002F\u002Ftv.soubiran.dev\" target=\"_blank\">\n        Twitch\n      \u003C\u002FButtonSecondary>\n    \u003C\u002Fdiv>\n  \u003C\u002Fsection>\n\u003C\u002Ftemplate>\n```\n\n3. Create a `ButtonSecondary` component in the `.vitepress\u002Ftheme\u002Fcomponents` directory:\n\n```vue [Example]\n\u003Cscript lang=\"ts\" setup>\ndefineProps\u003C{\n  href: string\n}>()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Ca\n    :href\n    class=\"inline-block border-4 border-black bg-[var(--color-purple)] px-8 py-4 text-white shadow-[4px_4px_0_black] transition duration-150 ease-linear hover:bg-[#828cd2] hover:shadow-[6px_6px_0_black] hover:-translate-x-[0.125rem] hover:-translate-y-[0.125rem]\"\n  >\n    \u003Cslot \u002F>\n  \u003C\u002Fa>\n\u003C\u002Ftemplate>\n```\n\n4. Update the `app.css` and `alerts.css` files to include the new color `--color-purple`:\n\n```css [alerts.css]\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n:root {\n  --color-yellow: #ffbf00;\n  --color-purple: #6c71c4; \u002F* [!code ++] *\u002F\n  --color-sand: #fdf6e3;\n}\n```\n\n```css [Example]\n:root {\n  --color-note: #3a85ff;\n  --color-tip: #00ddb3;\n  --color-warning: var(--color-yellow);\n  --color-severe: #ff7002;\n  --color-caution: #f34720;\n  --color-important: var(--color-purple); \u002F* [!code ++] *\u002F\n}\n```\n\n5. Route the homepage by updating the `Layout.vue` component:\n\n```vue [Layout.vue]\n\u003Cscript lang=\"ts\" setup>\nconst { frontmatter } = useData()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv class=\"min-h-screen bg-[#FC88FF] py-16\">\n    \u003Cmain class=\"mx-auto max-w-screen-md\">\n      \u003CHome v-if=\"frontmatter.layout === 'home'\" \u002F> \u002F\u002F [!code ++]\n\n      \u003CBlogIndex v-else-if=\"frontmatter.layout === 'blog'\" \u002F>\n      \u003CBlogShow v-else-if=\"frontmatter.layout === 'blog-show'\" \u002F>\n\n      \u003CProjectsIndex v-else-if=\"frontmatter.layout === 'projects'\" \u002F>\n    \u003C\u002Fmain>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\n### Refactor `ButtonPrimary`\n\nI've also refined the `ButtonPrimary` component to remove the default `href` attribute and employ a prop instead.\n\n```vue [Example]\n\u003Cscript lang=\"ts\" setup>\ndefineProps\u003C{\n  href: string\n}>()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Ca\n    :href\n    class=\"...\"\n  >\n    \u003Cslot \u002F>\n  \u003C\u002Fa>\n\u003C\u002Ftemplate>\n```\n\n### Basic responsive design\n\nI've implemented a few classes to enhance the blog's responsiveness. In the `BlogShow.vue` component, I've removed the `mx-4` class from the `article` container. Instead, the margin is managed in the `Layout.vue` component.\n\n```vue [Layout.vue]\n\u003Cscript lang=\"ts\" setup>\nconst { frontmatter } = useData()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv class=\"min-h-screen bg-[#FC88FF]\">\n    \u003CTheHeader \u002F>\n\n    \u003Cdiv class=\"px-4 py-16\">\n      \u003Cmain class=\"mx-auto max-w-screen-md\">\n        \u003CHome v-if=\"frontmatter.layout === 'home'\" \u002F>\n\n        \u003CBlogIndex v-else-if=\"frontmatter.layout === 'blog'\" \u002F>\n        \u003CBlogShow v-else-if=\"frontmatter.layout === 'blog-show'\" \u002F>\n\n        \u003CProjectsIndex v-else-if=\"frontmatter.layout === 'projects'\" \u002F>\n      \u003C\u002Fmain>\n    \u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\nOn the first `div`, I removed the `py-16` class. Around the `main`, I've added `px-4 py-16`. This ensures that the content remains clear of the screen edges on mobile devices, improving readability.\n\n## Deploy to Cloudflare Pages\n\nNow that our blog is fully developed, we can **deploy it to Cloudflare Pages**.\n\nCloudflare is a company that provides numerous services to enhance web speed and security, such as a zero-trust solution, a WAF, CDN, DNS, DDoS protection, and more for both businesses and individuals.\n\nTheir most renowned service is the reverse proxy. Cloudflare acts as the main gateway for our traffic, subsequently routing it internally to the correct server using DNS. This allows us to mask our server's IP, cache static assets, and protect our server from DDoS attacks.\n\n**Cloudflare Pages** is one of their offerings. It is a hosting platform for static and [**JAMstack**](https:\u002F\u002Fjamstack.wtf\u002F) websites, with a generous free tier perfect for personal projects.\n\n::callout{icon=\"i-ph-info-duotone\" color=\"primary\"}\nPlatforms like [**Vercel**](https:\u002F\u002Fvercel.com\u002F) or [**Netlify**](https:\u002F\u002Fwww.netlify.com\u002F) could have been used to deploy our blog. They are excellent platforms for static websites. I chose Cloudflare Pages as it has become my preferred platform because it combines numerous services: DNS, CDN, DDoS protection, hosting, Registrar, Workers, and more.\n::\n\nUsing Cloudflare Pages, we have two choices for website deployment:\n\n1. **CLI**: Use the Cloudflare CLI to push the generated files to Cloudflare Pages, which then automatically deploys the website across their network.\n2. **Git Repository**: Connect our **GitHub** or **GitLab** repository to Cloudflare Pages. Any commit to the `main` branch prompts Cloudflare to automatically build and deploy the site. We will use this option because of its convenience. Simply push and the site is live. Additionally, Cloudflare deploys a **preview for each pull request** for verifying changes before they are merged.\n\n::callout{icon=\"i-ph-info-duotone\" color=\"info\"}\nYou need a **Cloudflare account** to proceed. If you do not have one, you can create a free account and log in.\n::\n\nIn the left sidebar, click on \"Workers & Pages\". We will see the \"Overview\" dashboard. Click on the \"Create\" button to start a new project.\n\nBy default, the creation panel is set to \"Workers\". Click on the \"Pages\" tab to switch to the \"Pages\" creation panel. Then, click \"Connect to Git\".\n\nSelect the repository hosting the blog. Once selected, click on \"Begin Setup\".\n\n![Connect to Git Page](\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages\u002Fvitepress-cloudflare-connect-to-git.png)\n\nThe crucial part is the **\"Build settings.\"** Set the `Build command` to `npm run build` and the `Build output directory` to `.vitepress\u002Fdist`. There settings are specific to VitePress projects and our blog's configuration.\n\nFinally, click \"Save and Deploy.\" Cloudflare will build and deploy our blog. Once deployment is complete, it will be presented with our blog's URL. Click it to see our live blog. 🚀\n\nShare the URL with friends and family. We can also post it on social media to reach a broader audience. Enjoy the new blog! 🎉\n\n::callout{icon=\"i-ph-lightbulb-duotone\" color=\"success\"}\nAdd a **custom domain** to your blog under the \"Custom domains\" tab. It's straightforward to set up and makes your blog appear more professional.\n::\n\n![Home Page](\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages\u002Fvitepress-home.png)\n\n## Conclusion\n\nCongratulations! You have successfully **created a blog with VitePress and Vue.js** from scratch. You have learned how to establish a new VitePress project, set basic custom themes, design the blog's architecture, compile and read blog articles, automatically enhance **SEO metadata and sitemaps**, showcase GitHub projects, generate **Open Graph images** automatically, and share your blog globally.\n\nYour journey has culminated in a fully operational and engaging blog, allowing you to focus solely on producing content. Simply write and publish, as the blog will autonomously manage everything else.\n\nI genuinely hope you found this series enlightening. Should you have any questions or feedback, please feel free to share your thoughts in the comments section below each article.\n",{"title":5,"description":2209},"create-a-blog-with-vitepress-and-vue-js-from-scratch",{"loc":2214,"images":2219},[2220,2221],{"loc":2116},{"loc":2164},"series\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fdeploy-vitepress-blog-globally-with-cloudflare-pages","9qoaOI9FfiRm-iARNtA-4tuTMe_Lh2bcI5-3htqrXuc",{"overview":2225,"chapters":2458},{"id":2226,"title":2227,"body":2228,"contentId":2438,"date":2439,"description":2440,"extension":517,"github":2441,"meetTheInstructor":2444,"meta":2445,"navigation":139,"part":2212,"path":2446,"rawbody":2447,"robots":2212,"schemaOrg":2212,"seo":2448,"seriesSlug":2217,"sitemap":2449,"stem":2452,"subtitle":2453,"topics":2454,"__hash__":2457},"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":2229,"toc":2435},[2230,2233,2247,2260,2394,2405,2412,2419,2422,2425,2429],[10,2231,2232],{},"Hello and welcome! 👋",[10,2234,2235,2236,2239,2240,1198,2243,2246],{},"You're about to embark on the \"Create a ",[20,2237,2238],{},"Blog"," with ",[20,2241,2242],{},"VitePress",[20,2244,2245],{},"Vue.js"," from Scratch\" series!",[10,2248,2249,2250,2256,2257,2259],{},"Throughout this journey, we will construct a practical blog from the ground up using ",[14,2251,2254],{"href":2252,"rel":2253},"https:\u002F\u002Fvitepress.dev\u002F",[18],[20,2255,2242],{},". We will explore a range of topics from initial configuration to deploying on ",[20,2258,22],{},", including:",[2261,2262,2263,2288,2298,2304,2317,2323,2332,2341,2350,2362,2379,2385],"ul",{},[502,2264,2265,2268,2269,2272,2273,1198,2280,2287],{},[20,2266,2267],{},"Getting Started with VitePress: Project Setup and Essentials",": Learn to set up a fresh ",[20,2270,2271],{},"VitePress project"," by incorporating ",[14,2274,2277],{"href":2275,"rel":2276},"https:\u002F\u002Ftailwindcss.com\u002F",[18],[20,2278,2279],{},"Tailwind CSS",[14,2281,2284],{"href":2282,"rel":2283},"https:\u002F\u002Fgithub.com\u002Funplugin\u002Funplugin-vue-components",[18],[20,2285,2286],{},"unplugin-vue-components"," for an enhanced development process.",[502,2289,2290,2293,2294],{},[20,2291,2292],{},"From Default to Custom: Building a VitePress Blog Theme",": We will entirely remove the default theme and create a personalized theme. ",[2295,2296,2297],"em",{},"You'll be surprised by its simplicity!",[502,2299,2300,2303],{},[20,2301,2302],{},"Optimize Your VitePress Blog's Architecture Design",": Discover how to organize code and design your blog for scalability and maintainability.",[502,2305,2306,2309,2310,2018],{},[20,2307,2308],{},"Implementing Blog Index with VitePress and Tailwind CSS",": Create a list of blog posts. This will introduce ",[14,2311,2314],{"href":2312,"rel":2313},"https:\u002F\u002Fvitepress.dev\u002Fguide\u002Fdata-loading",[18],[20,2315,2316],{},"data loaders from VitePress",[502,2318,2319,2322],{},[20,2320,2321],{},"Single Blog Rendering in VitePress with Tailwind Typography",": Create a page dedicated to reading each blog post.",[502,2324,2325,2327,2328,2331],{},[20,2326,5],{},": Integrate ",[20,2329,2330],{},"SEO metadata"," for improved search engine visibility, eliminating the need for manual updates.",[502,2333,2334,2337,2338,2340],{},[20,2335,2336],{},"Showcase Your GitHub Projects on Your VitePress Blog",": Develop a page to display your ",[20,2339,2079],{}," endeavors, extending the use of data loaders and demonstrating their flexibility.",[502,2342,2343,2346,2347,2349],{},[20,2344,2345],{},"Creating Open Graph Images Automatically for Each Blog Post",": Efficiently create ",[20,2348,2184],{}," for each post, saving time and enhancing appeal.",[502,2351,2352,2354,2355,2361],{},[20,2353,5],{},": Seamlessly deploy your blog to ",[14,2356,2359],{"href":2357,"rel":2358},"https:\u002F\u002Fpages.cloudflare.com\u002F",[18],[20,2360,22],{},", achieving this in just a few clicks!",[502,2363,2364,2367,2368,2239,2371,2378],{},[20,2365,2366],{},"Ensure Blog Quality with Playwright Automated Testing",": Implement ",[20,2369,2370],{},"end-to-end testing",[14,2372,2375],{"href":2373,"rel":2374},"https:\u002F\u002Fplaywright.dev\u002F",[18],[20,2376,2377],{},"Playwright"," to ensure your blog functions as expected.",[502,2380,2381,2384],{},[20,2382,2383],{},"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.",[502,2386,2387,2390,2391,2393],{},[20,2388,2389],{},"Migrating Our VitePress Blog to Tailwind CSS Version 4",": Upgrade our blog to the latest version of ",[20,2392,2279],{}," to leverage its new features and improvements.",[10,2395,2396,2397,2400,2401,2404],{},"By the conclusion, you will possess a fully operational and captivating ",[20,2398,2399],{},"blog",", allowing you to concentrate exclusively on producing ",[20,2402,2403],{},"content",", which is paramount. Simply write and publish, as the blog will autonomously manage the rest.",[2110,2406,2407,2410],{},[2113,2408],{"alt":2409,"src":2164},"Home Page of our Blog",[2118,2411,2409],{},[10,2413,2414,2415,2418],{},"This series offers a detailed, step-by-step ",[20,2416,2417],{},"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,2420,2421],{},"Should you have any inquiries, please feel free to engage in the comments section under each article.",[10,2423,2424],{},"I hope you find this series truly enjoyable! 🚀",[29,2426,2428],{"id":2427},"chapters","Chapters",[2430,2431],"series-chapters-list",{"className":2432},[2433,2434],"mx-auto","max-w-5xl",{"title":66,"searchDepth":101,"depth":101,"links":2436},[2437],{"id":2427,"depth":101,"text":2428},"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":2442,"repository":2443},"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":2227,"description":2440},{"loc":2446,"images":2450},[2451],{"loc":2164},"series\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch","A new perspective on blogging with VitePress and Vue.js",[2455,2456,2399],"vuejs","vitepress","H9cubHgLKM0Siblzkwf7mDsFVYr2CLbh_ciFOpQrSVk",[2459,2465,2471,2477,2483,2489,2496,2502,2508,2510,2516,2523],{"contentId":2460,"title":2267,"description":2461,"path":2462,"part":73,"github":2463,"topics":2212},"b1b99d95-ac6d-4f25-a121-0851988102a2","From setup to styling with Tailwind CSS and automatic Vue imports, build your content-driven site effortlessly.","\u002Fseries\u002Fcreate-a-blog-with-vitepress-and-vue-js-from-scratch\u002Fgetting-started-with-vitepress-project-setup-and-essentials",{"branch":2464},"01.project-initialization",{"contentId":2466,"title":2292,"description":2467,"path":2468,"part":101,"github":2469,"topics":2212},"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":2470},"02.the-basics-for-a-custom-theme",{"contentId":2472,"title":2302,"description":2473,"path":2474,"part":126,"github":2475,"topics":2212},"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":2476},"03.define-the-design-of-the-blog-architecture",{"contentId":2478,"title":2308,"description":2479,"path":2480,"part":136,"github":2481,"topics":2212},"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":2482},"04.comprehensive-guide-to-listing-blog-articles",{"contentId":2484,"title":2321,"description":2485,"path":2486,"part":143,"github":2487,"topics":2212},"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":2488},"05.read-a-single-blog-article",{"contentId":2490,"title":2491,"description":2492,"path":2493,"part":153,"github":2494,"topics":2212},"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":2495},"06.seo-metadata-and-sitemap",{"contentId":2497,"title":2336,"description":2498,"path":2499,"part":171,"github":2500,"topics":2212},"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":2501},"07.showcase-your-github-projects",{"contentId":2503,"title":2345,"description":2504,"path":2505,"part":180,"github":2506,"topics":2212},"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":2507},"08.automatically-generated-open-graph-images",{"contentId":2207,"title":5,"description":2209,"path":2214,"part":191,"github":2509,"topics":2212},{"branch":2211},{"contentId":2511,"title":2366,"description":2512,"path":2513,"part":197,"github":2514,"topics":2212},"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":2515},"10.automate-testing",{"contentId":2517,"title":2518,"description":2519,"path":2520,"part":207,"github":2521,"topics":2212},"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":2522},"11.internal-refactor",{"contentId":2524,"title":2389,"description":2525,"path":2526,"part":232,"github":2527,"topics":2212},"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":2528},"12.migration-to-tailwind-css-4",1795016692617]