[{"data":1,"prerenderedAt":2373},["ShallowReactive",2],{"article-how_to_prerender":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"published":10,"keywords":11,"tags":16,"date":20,"enable_toc":10,"author":21,"author_avatar":22,"cover":23,"body":24,"_type":2367,"_id":2368,"_source":2369,"_file":2370,"_stem":2371,"_extension":2372},"/articles/how_to_prerender","articles",false,"","Nuxt Prerendering Mastery: Skyrocket Your Site's Speed and SEO","Unlock the Secrets to Lightning-Fast Websites and Top Google Rankings with Nuxt's Powerful Prerendering Features",true,[12,13,14,12,15],"Static site generation","Web performance optimization","SEO for JavaScript applications","Nuxt prerendering",[17,18,19],"web-dev","nuxt","optimization","2024-08-04T00:00:00.000Z","Matteo Beltrame","/assets/trat_avatar.webp","/assets/articles/how_to_prerender.webp",{"type":25,"children":26,"toc":2337},"root",[27,36,42,49,54,90,95,101,106,113,118,136,141,147,152,158,163,210,216,229,296,301,307,319,435,440,687,693,698,723,736,742,754,760,765,771,784,942,948,961,985,996,1122,1128,1133,1362,1368,1373,1379,1384,1417,1423,1442,1548,1553,1725,1731,1736,1749,1754,1760,1765,1771,1776,1864,1869,1875,1888,1911,1922,1998,2004,2009,2256,2262,2267,2310,2316,2321,2326,2331],{"type":28,"tag":29,"props":30,"children":32},"element","h1",{"id":31},"unlock-lightning-fast-websites-master-nuxt-prerendering-for-unbeatable-performance",[33],{"type":34,"value":35},"text","Unlock Lightning-Fast Websites: Master Nuxt Prerendering for Unbeatable Performance",{"type":28,"tag":37,"props":38,"children":39},"p",{},[40],{"type":34,"value":41},"In today's digital landscape, website performance can make or break your online presence. Enter Nuxt prerendering – the secret weapon that's revolutionizing how we build and deliver web applications. If you're ready to supercharge your Nuxt.js projects and leave your competition in the dust, you've come to the right place. In this comprehensive guide, we'll dive deep into the world of prerendering, exploring its game-changing benefits and showing you exactly how to implement it in your Nuxt applications.",{"type":28,"tag":43,"props":44,"children":46},"h2",{"id":45},"the-power-of-prerendering-what-it-is-and-why-you-need-it",[47],{"type":34,"value":48},"The Power of Prerendering: What It Is and Why You Need It",{"type":28,"tag":37,"props":50,"children":51},{},[52],{"type":34,"value":53},"Prerendering is a technique that generates static HTML files for your web pages at build time, rather than on-demand when a user requests them. This approach offers several significant advantages:",{"type":28,"tag":55,"props":56,"children":57},"ol",{},[58,70,80],{"type":28,"tag":59,"props":60,"children":61},"li",{},[62,68],{"type":28,"tag":63,"props":64,"children":65},"strong",{},[66],{"type":34,"value":67},"Lightning-Fast Load Times",{"type":34,"value":69},": By serving pre-generated HTML, your pages load almost instantly, providing a superior user experience.",{"type":28,"tag":59,"props":71,"children":72},{},[73,78],{"type":28,"tag":63,"props":74,"children":75},{},[76],{"type":34,"value":77},"Improved SEO",{"type":34,"value":79},": Search engines love fast-loading, easily crawlable content. Prerendered pages tick both these boxes.",{"type":28,"tag":59,"props":81,"children":82},{},[83,88],{"type":28,"tag":63,"props":84,"children":85},{},[86],{"type":34,"value":87},"Reduced Server Load",{"type":34,"value":89},": With static files being served, your server doesn't need to work as hard, leading to cost savings and improved scalability.",{"type":28,"tag":37,"props":91,"children":92},{},[93],{"type":34,"value":94},"But why was prerendering created in the first place? As web applications grew more complex, the traditional server-side rendering approach began to show its limitations. Single-page applications (SPAs) offered dynamic, app-like experiences but suffered from poor initial load times and SEO challenges. Prerendering emerged as the perfect middle ground, combining the best of both worlds.",{"type":28,"tag":43,"props":96,"children":98},{"id":97},"nuxt-prerendering-a-match-made-in-heaven",[99],{"type":34,"value":100},"Nuxt Prerendering: A Match Made in Heaven",{"type":28,"tag":37,"props":102,"children":103},{},[104],{"type":34,"value":105},"Nuxt.js, the powerful Vue.js framework, has embraced prerendering as a core feature. By leveraging Nuxt's built-in capabilities, developers can easily implement prerendering and reap its benefits without the headache of complex configurations.",{"type":28,"tag":107,"props":108,"children":110},"h3",{"id":109},"the-technical-magic-behind-prerendering",[111],{"type":34,"value":112},"The Technical Magic Behind Prerendering",{"type":28,"tag":37,"props":114,"children":115},{},[116],{"type":34,"value":117},"At its core, Nuxt prerendering works by:",{"type":28,"tag":55,"props":119,"children":120},{},[121,126,131],{"type":28,"tag":59,"props":122,"children":123},{},[124],{"type":34,"value":125},"Analyzing your application's routes",{"type":28,"tag":59,"props":127,"children":128},{},[129],{"type":34,"value":130},"Generating static HTML for each route at build time",{"type":28,"tag":59,"props":132,"children":133},{},[134],{"type":34,"value":135},"Serving these static files to users and search engine crawlers",{"type":28,"tag":37,"props":137,"children":138},{},[139],{"type":34,"value":140},"This process ensures that your content is immediately available, regardless of the user's device or network conditions.",{"type":28,"tag":43,"props":142,"children":144},{"id":143},"setting-up-prerendering-in-your-nuxt-project-a-step-by-step-guide",[145],{"type":34,"value":146},"Setting Up Prerendering in Your Nuxt Project: A Step-by-Step Guide",{"type":28,"tag":37,"props":148,"children":149},{},[150],{"type":34,"value":151},"Ready to supercharge your Nuxt application with prerendering? Let's walk through the setup process, complete with real-world examples and command snippets.",{"type":28,"tag":107,"props":153,"children":155},{"id":154},"step-1-install-nuxt-and-create-your-project",[156],{"type":34,"value":157},"Step 1: Install Nuxt and Create Your Project",{"type":28,"tag":37,"props":159,"children":160},{},[161],{"type":34,"value":162},"If you haven't already, start by creating a new Nuxt project:",{"type":28,"tag":164,"props":165,"children":169},"pre",{"className":166,"code":167,"language":168,"meta":7,"style":7},"language-bash shiki shiki-themes dark-plus","npx create-nuxt-app my-prerendered-app\ncd my-prerendered-app\n","bash",[170],{"type":28,"tag":171,"props":172,"children":173},"code",{"__ignoreMap":7},[174,197],{"type":28,"tag":175,"props":176,"children":179},"span",{"class":177,"line":178},"line",1,[180,186,192],{"type":28,"tag":175,"props":181,"children":183},{"style":182},"--shiki-default:#DCDCAA",[184],{"type":34,"value":185},"npx",{"type":28,"tag":175,"props":187,"children":189},{"style":188},"--shiki-default:#CE9178",[190],{"type":34,"value":191}," create-nuxt-app",{"type":28,"tag":175,"props":193,"children":194},{"style":188},[195],{"type":34,"value":196}," my-prerendered-app\n",{"type":28,"tag":175,"props":198,"children":200},{"class":177,"line":199},2,[201,206],{"type":28,"tag":175,"props":202,"children":203},{"style":182},[204],{"type":34,"value":205},"cd",{"type":28,"tag":175,"props":207,"children":208},{"style":188},[209],{"type":34,"value":196},{"type":28,"tag":107,"props":211,"children":213},{"id":212},"step-2-configure-nuxt-for-static-generation",[214],{"type":34,"value":215},"Step 2: Configure Nuxt for Static Generation",{"type":28,"tag":37,"props":217,"children":218},{},[219,221,227],{"type":34,"value":220},"Open your ",{"type":28,"tag":171,"props":222,"children":224},{"className":223},[],[225],{"type":34,"value":226},"nuxt.config.js",{"type":34,"value":228}," file and add the following:",{"type":28,"tag":164,"props":230,"children":234},{"className":231,"code":232,"language":233,"meta":7,"style":7},"language-javascript shiki shiki-themes dark-plus","export default {\n target: \"static\",\n // ... other configuration options\n};\n","javascript",[235],{"type":28,"tag":171,"props":236,"children":237},{"__ignoreMap":7},[238,258,277,287],{"type":28,"tag":175,"props":239,"children":240},{"class":177,"line":178},[241,247,252],{"type":28,"tag":175,"props":242,"children":244},{"style":243},"--shiki-default:#C586C0",[245],{"type":34,"value":246},"export",{"type":28,"tag":175,"props":248,"children":249},{"style":243},[250],{"type":34,"value":251}," default",{"type":28,"tag":175,"props":253,"children":255},{"style":254},"--shiki-default:#D4D4D4",[256],{"type":34,"value":257}," {\n",{"type":28,"tag":175,"props":259,"children":260},{"class":177,"line":199},[261,267,272],{"type":28,"tag":175,"props":262,"children":264},{"style":263},"--shiki-default:#9CDCFE",[265],{"type":34,"value":266}," target:",{"type":28,"tag":175,"props":268,"children":269},{"style":188},[270],{"type":34,"value":271}," \"static\"",{"type":28,"tag":175,"props":273,"children":274},{"style":254},[275],{"type":34,"value":276},",\n",{"type":28,"tag":175,"props":278,"children":280},{"class":177,"line":279},3,[281],{"type":28,"tag":175,"props":282,"children":284},{"style":283},"--shiki-default:#6A9955",[285],{"type":34,"value":286}," // ... other configuration options\n",{"type":28,"tag":175,"props":288,"children":290},{"class":177,"line":289},4,[291],{"type":28,"tag":175,"props":292,"children":293},{"style":254},[294],{"type":34,"value":295},"};\n",{"type":28,"tag":37,"props":297,"children":298},{},[299],{"type":34,"value":300},"This tells Nuxt that we want to generate a static version of our site.",{"type":28,"tag":107,"props":302,"children":304},{"id":303},"step-3-define-your-dynamic-routes",[305],{"type":34,"value":306},"Step 3: Define Your Dynamic Routes",{"type":28,"tag":37,"props":308,"children":309},{},[310,312,317],{"type":34,"value":311},"If your application has dynamic routes, you'll need to tell Nuxt about them. Add this to your ",{"type":28,"tag":171,"props":313,"children":315},{"className":314},[],[316],{"type":34,"value":226},{"type":34,"value":318},":",{"type":28,"tag":164,"props":320,"children":322},{"className":231,"code":321,"language":233,"meta":7,"style":7},"export default {\n // ... other options\n generate: {\n routes: [\n \"/posts/1\",\n \"/posts/2\",\n // Add all your dynamic routes here\n ],\n },\n};\n",[323],{"type":28,"tag":171,"props":324,"children":325},{"__ignoreMap":7},[326,341,349,361,374,387,400,409,418,427],{"type":28,"tag":175,"props":327,"children":328},{"class":177,"line":178},[329,333,337],{"type":28,"tag":175,"props":330,"children":331},{"style":243},[332],{"type":34,"value":246},{"type":28,"tag":175,"props":334,"children":335},{"style":243},[336],{"type":34,"value":251},{"type":28,"tag":175,"props":338,"children":339},{"style":254},[340],{"type":34,"value":257},{"type":28,"tag":175,"props":342,"children":343},{"class":177,"line":199},[344],{"type":28,"tag":175,"props":345,"children":346},{"style":283},[347],{"type":34,"value":348}," // ... other options\n",{"type":28,"tag":175,"props":350,"children":351},{"class":177,"line":279},[352,357],{"type":28,"tag":175,"props":353,"children":354},{"style":263},[355],{"type":34,"value":356}," generate:",{"type":28,"tag":175,"props":358,"children":359},{"style":254},[360],{"type":34,"value":257},{"type":28,"tag":175,"props":362,"children":363},{"class":177,"line":289},[364,369],{"type":28,"tag":175,"props":365,"children":366},{"style":263},[367],{"type":34,"value":368}," routes:",{"type":28,"tag":175,"props":370,"children":371},{"style":254},[372],{"type":34,"value":373}," [\n",{"type":28,"tag":175,"props":375,"children":377},{"class":177,"line":376},5,[378,383],{"type":28,"tag":175,"props":379,"children":380},{"style":188},[381],{"type":34,"value":382}," \"/posts/1\"",{"type":28,"tag":175,"props":384,"children":385},{"style":254},[386],{"type":34,"value":276},{"type":28,"tag":175,"props":388,"children":390},{"class":177,"line":389},6,[391,396],{"type":28,"tag":175,"props":392,"children":393},{"style":188},[394],{"type":34,"value":395}," \"/posts/2\"",{"type":28,"tag":175,"props":397,"children":398},{"style":254},[399],{"type":34,"value":276},{"type":28,"tag":175,"props":401,"children":403},{"class":177,"line":402},7,[404],{"type":28,"tag":175,"props":405,"children":406},{"style":283},[407],{"type":34,"value":408}," // Add all your dynamic routes here\n",{"type":28,"tag":175,"props":410,"children":412},{"class":177,"line":411},8,[413],{"type":28,"tag":175,"props":414,"children":415},{"style":254},[416],{"type":34,"value":417}," ],\n",{"type":28,"tag":175,"props":419,"children":421},{"class":177,"line":420},9,[422],{"type":28,"tag":175,"props":423,"children":424},{"style":254},[425],{"type":34,"value":426}," },\n",{"type":28,"tag":175,"props":428,"children":430},{"class":177,"line":429},10,[431],{"type":28,"tag":175,"props":432,"children":433},{"style":254},[434],{"type":34,"value":295},{"type":28,"tag":37,"props":436,"children":437},{},[438],{"type":34,"value":439},"For more complex scenarios, you can use a function to generate routes dynamically:",{"type":28,"tag":164,"props":441,"children":443},{"className":231,"code":442,"language":233,"meta":7,"style":7},"export default {\n // ... other options\n generate: {\n async routes() {\n const { $content } = require(\"@nuxt/content\");\n const files = await $content().only([\"path\"]).fetch();\n return files.map((file) => file.path);\n },\n },\n};\n",[444],{"type":28,"tag":171,"props":445,"children":446},{"__ignoreMap":7},[447,462,469,480,499,543,605,665,673,680],{"type":28,"tag":175,"props":448,"children":449},{"class":177,"line":178},[450,454,458],{"type":28,"tag":175,"props":451,"children":452},{"style":243},[453],{"type":34,"value":246},{"type":28,"tag":175,"props":455,"children":456},{"style":243},[457],{"type":34,"value":251},{"type":28,"tag":175,"props":459,"children":460},{"style":254},[461],{"type":34,"value":257},{"type":28,"tag":175,"props":463,"children":464},{"class":177,"line":199},[465],{"type":28,"tag":175,"props":466,"children":467},{"style":283},[468],{"type":34,"value":348},{"type":28,"tag":175,"props":470,"children":471},{"class":177,"line":279},[472,476],{"type":28,"tag":175,"props":473,"children":474},{"style":263},[475],{"type":34,"value":356},{"type":28,"tag":175,"props":477,"children":478},{"style":254},[479],{"type":34,"value":257},{"type":28,"tag":175,"props":481,"children":482},{"class":177,"line":289},[483,489,494],{"type":28,"tag":175,"props":484,"children":486},{"style":485},"--shiki-default:#569CD6",[487],{"type":34,"value":488}," async",{"type":28,"tag":175,"props":490,"children":491},{"style":182},[492],{"type":34,"value":493}," routes",{"type":28,"tag":175,"props":495,"children":496},{"style":254},[497],{"type":34,"value":498},"() {\n",{"type":28,"tag":175,"props":500,"children":501},{"class":177,"line":376},[502,507,512,518,523,528,533,538],{"type":28,"tag":175,"props":503,"children":504},{"style":485},[505],{"type":34,"value":506}," const",{"type":28,"tag":175,"props":508,"children":509},{"style":254},[510],{"type":34,"value":511}," { ",{"type":28,"tag":175,"props":513,"children":515},{"style":514},"--shiki-default:#4FC1FF",[516],{"type":34,"value":517},"$content",{"type":28,"tag":175,"props":519,"children":520},{"style":254},[521],{"type":34,"value":522}," } = ",{"type":28,"tag":175,"props":524,"children":525},{"style":182},[526],{"type":34,"value":527},"require",{"type":28,"tag":175,"props":529,"children":530},{"style":254},[531],{"type":34,"value":532},"(",{"type":28,"tag":175,"props":534,"children":535},{"style":188},[536],{"type":34,"value":537},"\"@nuxt/content\"",{"type":28,"tag":175,"props":539,"children":540},{"style":254},[541],{"type":34,"value":542},");\n",{"type":28,"tag":175,"props":544,"children":545},{"class":177,"line":389},[546,550,555,560,565,570,575,580,585,590,595,600],{"type":28,"tag":175,"props":547,"children":548},{"style":485},[549],{"type":34,"value":506},{"type":28,"tag":175,"props":551,"children":552},{"style":514},[553],{"type":34,"value":554}," files",{"type":28,"tag":175,"props":556,"children":557},{"style":254},[558],{"type":34,"value":559}," = ",{"type":28,"tag":175,"props":561,"children":562},{"style":243},[563],{"type":34,"value":564},"await",{"type":28,"tag":175,"props":566,"children":567},{"style":182},[568],{"type":34,"value":569}," $content",{"type":28,"tag":175,"props":571,"children":572},{"style":254},[573],{"type":34,"value":574},"().",{"type":28,"tag":175,"props":576,"children":577},{"style":182},[578],{"type":34,"value":579},"only",{"type":28,"tag":175,"props":581,"children":582},{"style":254},[583],{"type":34,"value":584},"([",{"type":28,"tag":175,"props":586,"children":587},{"style":188},[588],{"type":34,"value":589},"\"path\"",{"type":28,"tag":175,"props":591,"children":592},{"style":254},[593],{"type":34,"value":594},"]).",{"type":28,"tag":175,"props":596,"children":597},{"style":182},[598],{"type":34,"value":599},"fetch",{"type":28,"tag":175,"props":601,"children":602},{"style":254},[603],{"type":34,"value":604},"();\n",{"type":28,"tag":175,"props":606,"children":607},{"class":177,"line":402},[608,613,617,622,627,632,637,642,647,652,656,661],{"type":28,"tag":175,"props":609,"children":610},{"style":243},[611],{"type":34,"value":612}," return",{"type":28,"tag":175,"props":614,"children":615},{"style":263},[616],{"type":34,"value":554},{"type":28,"tag":175,"props":618,"children":619},{"style":254},[620],{"type":34,"value":621},".",{"type":28,"tag":175,"props":623,"children":624},{"style":182},[625],{"type":34,"value":626},"map",{"type":28,"tag":175,"props":628,"children":629},{"style":254},[630],{"type":34,"value":631},"((",{"type":28,"tag":175,"props":633,"children":634},{"style":263},[635],{"type":34,"value":636},"file",{"type":28,"tag":175,"props":638,"children":639},{"style":254},[640],{"type":34,"value":641},") ",{"type":28,"tag":175,"props":643,"children":644},{"style":485},[645],{"type":34,"value":646},"=>",{"type":28,"tag":175,"props":648,"children":649},{"style":263},[650],{"type":34,"value":651}," file",{"type":28,"tag":175,"props":653,"children":654},{"style":254},[655],{"type":34,"value":621},{"type":28,"tag":175,"props":657,"children":658},{"style":263},[659],{"type":34,"value":660},"path",{"type":28,"tag":175,"props":662,"children":663},{"style":254},[664],{"type":34,"value":542},{"type":28,"tag":175,"props":666,"children":667},{"class":177,"line":411},[668],{"type":28,"tag":175,"props":669,"children":670},{"style":254},[671],{"type":34,"value":672}," },\n",{"type":28,"tag":175,"props":674,"children":675},{"class":177,"line":420},[676],{"type":28,"tag":175,"props":677,"children":678},{"style":254},[679],{"type":34,"value":426},{"type":28,"tag":175,"props":681,"children":682},{"class":177,"line":429},[683],{"type":28,"tag":175,"props":684,"children":685},{"style":254},[686],{"type":34,"value":295},{"type":28,"tag":107,"props":688,"children":690},{"id":689},"step-4-generate-your-static-site",[691],{"type":34,"value":692},"Step 4: Generate Your Static Site",{"type":28,"tag":37,"props":694,"children":695},{},[696],{"type":34,"value":697},"With everything configured, it's time to build and generate your static site:",{"type":28,"tag":164,"props":699,"children":701},{"className":166,"code":700,"language":168,"meta":7,"style":7},"npm run generate\n",[702],{"type":28,"tag":171,"props":703,"children":704},{"__ignoreMap":7},[705],{"type":28,"tag":175,"props":706,"children":707},{"class":177,"line":178},[708,713,718],{"type":28,"tag":175,"props":709,"children":710},{"style":182},[711],{"type":34,"value":712},"npm",{"type":28,"tag":175,"props":714,"children":715},{"style":188},[716],{"type":34,"value":717}," run",{"type":28,"tag":175,"props":719,"children":720},{"style":188},[721],{"type":34,"value":722}," generate\n",{"type":28,"tag":37,"props":724,"children":725},{},[726,728,734],{"type":34,"value":727},"This command will create a ",{"type":28,"tag":171,"props":729,"children":731},{"className":730},[],[732],{"type":34,"value":733},"dist",{"type":34,"value":735}," folder containing your prerendered pages.",{"type":28,"tag":107,"props":737,"children":739},{"id":738},"step-5-deploy-your-prerendered-site",[740],{"type":34,"value":741},"Step 5: Deploy Your Prerendered Site",{"type":28,"tag":37,"props":743,"children":744},{},[745,747,752],{"type":34,"value":746},"You can now deploy the contents of the ",{"type":28,"tag":171,"props":748,"children":750},{"className":749},[],[751],{"type":34,"value":733},{"type":34,"value":753}," folder to any static hosting service, such as Netlify, Vercel, or GitHub Pages. Your lightning-fast, prerendered Nuxt site is ready to conquer the web!",{"type":28,"tag":43,"props":755,"children":757},{"id":756},"maximizing-seo-with-nuxt-prerendering-advanced-techniques",[758],{"type":34,"value":759},"Maximizing SEO with Nuxt Prerendering: Advanced Techniques",{"type":28,"tag":37,"props":761,"children":762},{},[763],{"type":34,"value":764},"Now that you've got prerendering up and running, let's explore how to leverage it for maximum SEO impact.",{"type":28,"tag":107,"props":766,"children":768},{"id":767},"_1-optimize-your-meta-tags",[769],{"type":34,"value":770},"1. Optimize Your Meta Tags",{"type":28,"tag":37,"props":772,"children":773},{},[774,776,782],{"type":34,"value":775},"Nuxt makes it easy to add dynamic meta tags to your pages. In your page components, use the ",{"type":28,"tag":171,"props":777,"children":779},{"className":778},[],[780],{"type":34,"value":781},"head()",{"type":34,"value":783}," method:",{"type":28,"tag":164,"props":785,"children":787},{"className":231,"code":786,"language":233,"meta":7,"style":7},"export default {\n head() {\n return {\n title: this.pageTitle,\n meta: [{ hid: \"description\", name: \"description\", content: this.pageDescription }],\n };\n },\n};\n",[788],{"type":28,"tag":171,"props":789,"children":790},{"__ignoreMap":7},[791,806,818,830,856,920,928,935],{"type":28,"tag":175,"props":792,"children":793},{"class":177,"line":178},[794,798,802],{"type":28,"tag":175,"props":795,"children":796},{"style":243},[797],{"type":34,"value":246},{"type":28,"tag":175,"props":799,"children":800},{"style":243},[801],{"type":34,"value":251},{"type":28,"tag":175,"props":803,"children":804},{"style":254},[805],{"type":34,"value":257},{"type":28,"tag":175,"props":807,"children":808},{"class":177,"line":199},[809,814],{"type":28,"tag":175,"props":810,"children":811},{"style":182},[812],{"type":34,"value":813}," head",{"type":28,"tag":175,"props":815,"children":816},{"style":254},[817],{"type":34,"value":498},{"type":28,"tag":175,"props":819,"children":820},{"class":177,"line":279},[821,826],{"type":28,"tag":175,"props":822,"children":823},{"style":243},[824],{"type":34,"value":825}," return",{"type":28,"tag":175,"props":827,"children":828},{"style":254},[829],{"type":34,"value":257},{"type":28,"tag":175,"props":831,"children":832},{"class":177,"line":289},[833,838,843,847,852],{"type":28,"tag":175,"props":834,"children":835},{"style":263},[836],{"type":34,"value":837}," title:",{"type":28,"tag":175,"props":839,"children":840},{"style":485},[841],{"type":34,"value":842}," this",{"type":28,"tag":175,"props":844,"children":845},{"style":254},[846],{"type":34,"value":621},{"type":28,"tag":175,"props":848,"children":849},{"style":263},[850],{"type":34,"value":851},"pageTitle",{"type":28,"tag":175,"props":853,"children":854},{"style":254},[855],{"type":34,"value":276},{"type":28,"tag":175,"props":857,"children":858},{"class":177,"line":376},[859,864,869,874,879,884,889,893,897,902,906,910,915],{"type":28,"tag":175,"props":860,"children":861},{"style":263},[862],{"type":34,"value":863}," meta:",{"type":28,"tag":175,"props":865,"children":866},{"style":254},[867],{"type":34,"value":868}," [{ ",{"type":28,"tag":175,"props":870,"children":871},{"style":263},[872],{"type":34,"value":873},"hid:",{"type":28,"tag":175,"props":875,"children":876},{"style":188},[877],{"type":34,"value":878}," \"description\"",{"type":28,"tag":175,"props":880,"children":881},{"style":254},[882],{"type":34,"value":883},", ",{"type":28,"tag":175,"props":885,"children":886},{"style":263},[887],{"type":34,"value":888},"name:",{"type":28,"tag":175,"props":890,"children":891},{"style":188},[892],{"type":34,"value":878},{"type":28,"tag":175,"props":894,"children":895},{"style":254},[896],{"type":34,"value":883},{"type":28,"tag":175,"props":898,"children":899},{"style":263},[900],{"type":34,"value":901},"content:",{"type":28,"tag":175,"props":903,"children":904},{"style":485},[905],{"type":34,"value":842},{"type":28,"tag":175,"props":907,"children":908},{"style":254},[909],{"type":34,"value":621},{"type":28,"tag":175,"props":911,"children":912},{"style":263},[913],{"type":34,"value":914},"pageDescription",{"type":28,"tag":175,"props":916,"children":917},{"style":254},[918],{"type":34,"value":919}," }],\n",{"type":28,"tag":175,"props":921,"children":922},{"class":177,"line":389},[923],{"type":28,"tag":175,"props":924,"children":925},{"style":254},[926],{"type":34,"value":927}," };\n",{"type":28,"tag":175,"props":929,"children":930},{"class":177,"line":402},[931],{"type":28,"tag":175,"props":932,"children":933},{"style":254},[934],{"type":34,"value":426},{"type":28,"tag":175,"props":936,"children":937},{"class":177,"line":411},[938],{"type":28,"tag":175,"props":939,"children":940},{"style":254},[941],{"type":34,"value":295},{"type":28,"tag":107,"props":943,"children":945},{"id":944},"_2-generate-a-sitemap",[946],{"type":34,"value":947},"2. Generate a Sitemap",{"type":28,"tag":37,"props":949,"children":950},{},[951,953,959],{"type":34,"value":952},"A sitemap helps search engines discover and index your pages. Use the ",{"type":28,"tag":171,"props":954,"children":956},{"className":955},[],[957],{"type":34,"value":958},"@nuxtjs/sitemap",{"type":34,"value":960}," module to automatically generate one:",{"type":28,"tag":164,"props":962,"children":964},{"className":166,"code":963,"language":168,"meta":7,"style":7},"npm install @nuxtjs/sitemap\n",[965],{"type":28,"tag":171,"props":966,"children":967},{"__ignoreMap":7},[968],{"type":28,"tag":175,"props":969,"children":970},{"class":177,"line":178},[971,975,980],{"type":28,"tag":175,"props":972,"children":973},{"style":182},[974],{"type":34,"value":712},{"type":28,"tag":175,"props":976,"children":977},{"style":188},[978],{"type":34,"value":979}," install",{"type":28,"tag":175,"props":981,"children":982},{"style":188},[983],{"type":34,"value":984}," @nuxtjs/sitemap\n",{"type":28,"tag":37,"props":986,"children":987},{},[988,990,995],{"type":34,"value":989},"Then, in your ",{"type":28,"tag":171,"props":991,"children":993},{"className":992},[],[994],{"type":34,"value":226},{"type":34,"value":318},{"type":28,"tag":164,"props":997,"children":999},{"className":231,"code":998,"language":233,"meta":7,"style":7},"export default {\n modules: [\"@nuxtjs/sitemap\"],\n sitemap: {\n hostname: \"https://yourwebsite.com\",\n gzip: true,\n exclude: [\"/admin/**\"],\n },\n};\n",[1000],{"type":28,"tag":171,"props":1001,"children":1002},{"__ignoreMap":7},[1003,1018,1041,1053,1070,1087,1108,1115],{"type":28,"tag":175,"props":1004,"children":1005},{"class":177,"line":178},[1006,1010,1014],{"type":28,"tag":175,"props":1007,"children":1008},{"style":243},[1009],{"type":34,"value":246},{"type":28,"tag":175,"props":1011,"children":1012},{"style":243},[1013],{"type":34,"value":251},{"type":28,"tag":175,"props":1015,"children":1016},{"style":254},[1017],{"type":34,"value":257},{"type":28,"tag":175,"props":1019,"children":1020},{"class":177,"line":199},[1021,1026,1031,1036],{"type":28,"tag":175,"props":1022,"children":1023},{"style":263},[1024],{"type":34,"value":1025}," modules:",{"type":28,"tag":175,"props":1027,"children":1028},{"style":254},[1029],{"type":34,"value":1030}," [",{"type":28,"tag":175,"props":1032,"children":1033},{"style":188},[1034],{"type":34,"value":1035},"\"@nuxtjs/sitemap\"",{"type":28,"tag":175,"props":1037,"children":1038},{"style":254},[1039],{"type":34,"value":1040},"],\n",{"type":28,"tag":175,"props":1042,"children":1043},{"class":177,"line":279},[1044,1049],{"type":28,"tag":175,"props":1045,"children":1046},{"style":263},[1047],{"type":34,"value":1048}," sitemap:",{"type":28,"tag":175,"props":1050,"children":1051},{"style":254},[1052],{"type":34,"value":257},{"type":28,"tag":175,"props":1054,"children":1055},{"class":177,"line":289},[1056,1061,1066],{"type":28,"tag":175,"props":1057,"children":1058},{"style":263},[1059],{"type":34,"value":1060}," hostname:",{"type":28,"tag":175,"props":1062,"children":1063},{"style":188},[1064],{"type":34,"value":1065}," \"https://yourwebsite.com\"",{"type":28,"tag":175,"props":1067,"children":1068},{"style":254},[1069],{"type":34,"value":276},{"type":28,"tag":175,"props":1071,"children":1072},{"class":177,"line":376},[1073,1078,1083],{"type":28,"tag":175,"props":1074,"children":1075},{"style":263},[1076],{"type":34,"value":1077}," gzip:",{"type":28,"tag":175,"props":1079,"children":1080},{"style":485},[1081],{"type":34,"value":1082}," true",{"type":28,"tag":175,"props":1084,"children":1085},{"style":254},[1086],{"type":34,"value":276},{"type":28,"tag":175,"props":1088,"children":1089},{"class":177,"line":389},[1090,1095,1099,1104],{"type":28,"tag":175,"props":1091,"children":1092},{"style":263},[1093],{"type":34,"value":1094}," exclude:",{"type":28,"tag":175,"props":1096,"children":1097},{"style":254},[1098],{"type":34,"value":1030},{"type":28,"tag":175,"props":1100,"children":1101},{"style":188},[1102],{"type":34,"value":1103},"\"/admin/**\"",{"type":28,"tag":175,"props":1105,"children":1106},{"style":254},[1107],{"type":34,"value":1040},{"type":28,"tag":175,"props":1109,"children":1110},{"class":177,"line":402},[1111],{"type":28,"tag":175,"props":1112,"children":1113},{"style":254},[1114],{"type":34,"value":426},{"type":28,"tag":175,"props":1116,"children":1117},{"class":177,"line":411},[1118],{"type":28,"tag":175,"props":1119,"children":1120},{"style":254},[1121],{"type":34,"value":295},{"type":28,"tag":107,"props":1123,"children":1125},{"id":1124},"_3-implement-structured-data",[1126],{"type":34,"value":1127},"3. Implement Structured Data",{"type":28,"tag":37,"props":1129,"children":1130},{},[1131],{"type":34,"value":1132},"Structured data helps search engines understand your content better. Add JSON-LD to your pages:",{"type":28,"tag":164,"props":1134,"children":1136},{"className":231,"code":1135,"language":233,"meta":7,"style":7},"export default {\n head() {\n return {\n script: [\n {\n type: \"application/ld+json\",\n json: {\n \"@context\": \"https://schema.org\",\n \"@type\": \"Article\",\n headline: this.article.title,\n // ... more structured data\n },\n },\n ],\n };\n },\n};\n",[1137],{"type":28,"tag":171,"props":1138,"children":1139},{"__ignoreMap":7},[1140,1155,1166,1177,1189,1197,1214,1226,1247,1268,1302,1311,1320,1329,1338,1346,1354],{"type":28,"tag":175,"props":1141,"children":1142},{"class":177,"line":178},[1143,1147,1151],{"type":28,"tag":175,"props":1144,"children":1145},{"style":243},[1146],{"type":34,"value":246},{"type":28,"tag":175,"props":1148,"children":1149},{"style":243},[1150],{"type":34,"value":251},{"type":28,"tag":175,"props":1152,"children":1153},{"style":254},[1154],{"type":34,"value":257},{"type":28,"tag":175,"props":1156,"children":1157},{"class":177,"line":199},[1158,1162],{"type":28,"tag":175,"props":1159,"children":1160},{"style":182},[1161],{"type":34,"value":813},{"type":28,"tag":175,"props":1163,"children":1164},{"style":254},[1165],{"type":34,"value":498},{"type":28,"tag":175,"props":1167,"children":1168},{"class":177,"line":279},[1169,1173],{"type":28,"tag":175,"props":1170,"children":1171},{"style":243},[1172],{"type":34,"value":825},{"type":28,"tag":175,"props":1174,"children":1175},{"style":254},[1176],{"type":34,"value":257},{"type":28,"tag":175,"props":1178,"children":1179},{"class":177,"line":289},[1180,1185],{"type":28,"tag":175,"props":1181,"children":1182},{"style":263},[1183],{"type":34,"value":1184}," script:",{"type":28,"tag":175,"props":1186,"children":1187},{"style":254},[1188],{"type":34,"value":373},{"type":28,"tag":175,"props":1190,"children":1191},{"class":177,"line":376},[1192],{"type":28,"tag":175,"props":1193,"children":1194},{"style":254},[1195],{"type":34,"value":1196}," {\n",{"type":28,"tag":175,"props":1198,"children":1199},{"class":177,"line":389},[1200,1205,1210],{"type":28,"tag":175,"props":1201,"children":1202},{"style":263},[1203],{"type":34,"value":1204}," type:",{"type":28,"tag":175,"props":1206,"children":1207},{"style":188},[1208],{"type":34,"value":1209}," \"application/ld+json\"",{"type":28,"tag":175,"props":1211,"children":1212},{"style":254},[1213],{"type":34,"value":276},{"type":28,"tag":175,"props":1215,"children":1216},{"class":177,"line":402},[1217,1222],{"type":28,"tag":175,"props":1218,"children":1219},{"style":263},[1220],{"type":34,"value":1221}," json:",{"type":28,"tag":175,"props":1223,"children":1224},{"style":254},[1225],{"type":34,"value":257},{"type":28,"tag":175,"props":1227,"children":1228},{"class":177,"line":411},[1229,1234,1238,1243],{"type":28,"tag":175,"props":1230,"children":1231},{"style":188},[1232],{"type":34,"value":1233}," \"@context\"",{"type":28,"tag":175,"props":1235,"children":1236},{"style":263},[1237],{"type":34,"value":318},{"type":28,"tag":175,"props":1239,"children":1240},{"style":188},[1241],{"type":34,"value":1242}," \"https://schema.org\"",{"type":28,"tag":175,"props":1244,"children":1245},{"style":254},[1246],{"type":34,"value":276},{"type":28,"tag":175,"props":1248,"children":1249},{"class":177,"line":420},[1250,1255,1259,1264],{"type":28,"tag":175,"props":1251,"children":1252},{"style":188},[1253],{"type":34,"value":1254}," \"@type\"",{"type":28,"tag":175,"props":1256,"children":1257},{"style":263},[1258],{"type":34,"value":318},{"type":28,"tag":175,"props":1260,"children":1261},{"style":188},[1262],{"type":34,"value":1263}," \"Article\"",{"type":28,"tag":175,"props":1265,"children":1266},{"style":254},[1267],{"type":34,"value":276},{"type":28,"tag":175,"props":1269,"children":1270},{"class":177,"line":429},[1271,1276,1280,1284,1289,1293,1298],{"type":28,"tag":175,"props":1272,"children":1273},{"style":263},[1274],{"type":34,"value":1275}," headline:",{"type":28,"tag":175,"props":1277,"children":1278},{"style":485},[1279],{"type":34,"value":842},{"type":28,"tag":175,"props":1281,"children":1282},{"style":254},[1283],{"type":34,"value":621},{"type":28,"tag":175,"props":1285,"children":1286},{"style":263},[1287],{"type":34,"value":1288},"article",{"type":28,"tag":175,"props":1290,"children":1291},{"style":254},[1292],{"type":34,"value":621},{"type":28,"tag":175,"props":1294,"children":1295},{"style":263},[1296],{"type":34,"value":1297},"title",{"type":28,"tag":175,"props":1299,"children":1300},{"style":254},[1301],{"type":34,"value":276},{"type":28,"tag":175,"props":1303,"children":1305},{"class":177,"line":1304},11,[1306],{"type":28,"tag":175,"props":1307,"children":1308},{"style":283},[1309],{"type":34,"value":1310}," // ... more structured data\n",{"type":28,"tag":175,"props":1312,"children":1314},{"class":177,"line":1313},12,[1315],{"type":28,"tag":175,"props":1316,"children":1317},{"style":254},[1318],{"type":34,"value":1319}," },\n",{"type":28,"tag":175,"props":1321,"children":1323},{"class":177,"line":1322},13,[1324],{"type":28,"tag":175,"props":1325,"children":1326},{"style":254},[1327],{"type":34,"value":1328}," },\n",{"type":28,"tag":175,"props":1330,"children":1332},{"class":177,"line":1331},14,[1333],{"type":28,"tag":175,"props":1334,"children":1335},{"style":254},[1336],{"type":34,"value":1337}," ],\n",{"type":28,"tag":175,"props":1339,"children":1341},{"class":177,"line":1340},15,[1342],{"type":28,"tag":175,"props":1343,"children":1344},{"style":254},[1345],{"type":34,"value":927},{"type":28,"tag":175,"props":1347,"children":1349},{"class":177,"line":1348},16,[1350],{"type":28,"tag":175,"props":1351,"children":1352},{"style":254},[1353],{"type":34,"value":426},{"type":28,"tag":175,"props":1355,"children":1357},{"class":177,"line":1356},17,[1358],{"type":28,"tag":175,"props":1359,"children":1360},{"style":254},[1361],{"type":34,"value":295},{"type":28,"tag":43,"props":1363,"children":1365},{"id":1364},"fine-tuning-your-prerendering-strategy-excluding-routes",[1366],{"type":34,"value":1367},"Fine-Tuning Your Prerendering Strategy: Excluding Routes",{"type":28,"tag":37,"props":1369,"children":1370},{},[1371],{"type":34,"value":1372},"While prerendering offers numerous benefits, there may be cases where you don't want to prerender certain routes. Let's explore how to exclude specific pages from the prerendering process.",{"type":28,"tag":107,"props":1374,"children":1376},{"id":1375},"why-exclude-routes",[1377],{"type":34,"value":1378},"Why Exclude Routes?",{"type":28,"tag":37,"props":1380,"children":1381},{},[1382],{"type":34,"value":1383},"There are several reasons you might want to exclude a route from prerendering:",{"type":28,"tag":55,"props":1385,"children":1386},{},[1387,1397,1407],{"type":28,"tag":59,"props":1388,"children":1389},{},[1390,1395],{"type":28,"tag":63,"props":1391,"children":1392},{},[1393],{"type":34,"value":1394},"Frequently Updated Content",{"type":34,"value":1396},": Pages with real-time data or frequent updates may benefit from server-side rendering.",{"type":28,"tag":59,"props":1398,"children":1399},{},[1400,1405],{"type":28,"tag":63,"props":1401,"children":1402},{},[1403],{"type":34,"value":1404},"User-Specific Content",{"type":34,"value":1406},": Personalized pages should be rendered on-demand.",{"type":28,"tag":59,"props":1408,"children":1409},{},[1410,1415],{"type":28,"tag":63,"props":1411,"children":1412},{},[1413],{"type":34,"value":1414},"Large Dynamic Sites",{"type":34,"value":1416},": If you have thousands of dynamic pages, prerendering them all might not be practical.",{"type":28,"tag":107,"props":1418,"children":1420},{"id":1419},"configuring-route-exclusion-in-nuxt",[1421],{"type":34,"value":1422},"Configuring Route Exclusion in Nuxt",{"type":28,"tag":37,"props":1424,"children":1425},{},[1426,1428,1434,1436,1441],{"type":34,"value":1427},"To exclude routes from prerendering, you can use the ",{"type":28,"tag":171,"props":1429,"children":1431},{"className":1430},[],[1432],{"type":34,"value":1433},"generate.exclude",{"type":34,"value":1435}," option in your ",{"type":28,"tag":171,"props":1437,"children":1439},{"className":1438},[],[1440],{"type":34,"value":226},{"type":34,"value":318},{"type":28,"tag":164,"props":1443,"children":1445},{"className":231,"code":1444,"language":233,"meta":7,"style":7},"export default {\n // ... other options\n generate: {\n exclude: [\n /^\\/admin/, // Excludes all routes starting with /admin\n ],\n },\n};\n",[1446],{"type":28,"tag":171,"props":1447,"children":1448},{"__ignoreMap":7},[1449,1464,1471,1482,1493,1527,1534,1541],{"type":28,"tag":175,"props":1450,"children":1451},{"class":177,"line":178},[1452,1456,1460],{"type":28,"tag":175,"props":1453,"children":1454},{"style":243},[1455],{"type":34,"value":246},{"type":28,"tag":175,"props":1457,"children":1458},{"style":243},[1459],{"type":34,"value":251},{"type":28,"tag":175,"props":1461,"children":1462},{"style":254},[1463],{"type":34,"value":257},{"type":28,"tag":175,"props":1465,"children":1466},{"class":177,"line":199},[1467],{"type":28,"tag":175,"props":1468,"children":1469},{"style":283},[1470],{"type":34,"value":348},{"type":28,"tag":175,"props":1472,"children":1473},{"class":177,"line":279},[1474,1478],{"type":28,"tag":175,"props":1475,"children":1476},{"style":263},[1477],{"type":34,"value":356},{"type":28,"tag":175,"props":1479,"children":1480},{"style":254},[1481],{"type":34,"value":257},{"type":28,"tag":175,"props":1483,"children":1484},{"class":177,"line":289},[1485,1489],{"type":28,"tag":175,"props":1486,"children":1487},{"style":263},[1488],{"type":34,"value":1094},{"type":28,"tag":175,"props":1490,"children":1491},{"style":254},[1492],{"type":34,"value":373},{"type":28,"tag":175,"props":1494,"children":1495},{"class":177,"line":376},[1496,1502,1507,1513,1518,1522],{"type":28,"tag":175,"props":1497,"children":1499},{"style":1498},"--shiki-default:#D16969",[1500],{"type":34,"value":1501}," /",{"type":28,"tag":175,"props":1503,"children":1504},{"style":182},[1505],{"type":34,"value":1506},"^",{"type":28,"tag":175,"props":1508,"children":1510},{"style":1509},"--shiki-default:#D7BA7D",[1511],{"type":34,"value":1512},"\\/",{"type":28,"tag":175,"props":1514,"children":1515},{"style":1498},[1516],{"type":34,"value":1517},"admin/",{"type":28,"tag":175,"props":1519,"children":1520},{"style":254},[1521],{"type":34,"value":883},{"type":28,"tag":175,"props":1523,"children":1524},{"style":283},[1525],{"type":34,"value":1526},"// Excludes all routes starting with /admin\n",{"type":28,"tag":175,"props":1528,"children":1529},{"class":177,"line":389},[1530],{"type":28,"tag":175,"props":1531,"children":1532},{"style":254},[1533],{"type":34,"value":417},{"type":28,"tag":175,"props":1535,"children":1536},{"class":177,"line":402},[1537],{"type":28,"tag":175,"props":1538,"children":1539},{"style":254},[1540],{"type":34,"value":426},{"type":28,"tag":175,"props":1542,"children":1543},{"class":177,"line":411},[1544],{"type":28,"tag":175,"props":1545,"children":1546},{"style":254},[1547],{"type":34,"value":295},{"type":28,"tag":37,"props":1549,"children":1550},{},[1551],{"type":34,"value":1552},"You can use regular expressions or functions to define exclusion patterns:",{"type":28,"tag":164,"props":1554,"children":1556},{"className":231,"code":1555,"language":233,"meta":7,"style":7},"export default {\n // ... other options\n generate: {\n exclude: [\n /^\\/user/, // Excludes routes starting with /user\n (route) => route.includes(\"temporary\"), // Excludes routes containing 'temporary'\n \"/ignore-me\", // Excludes a specific route\n ],\n },\n};\n",[1557],{"type":28,"tag":171,"props":1558,"children":1559},{"__ignoreMap":7},[1560,1575,1582,1593,1604,1633,1687,1704,1711,1718],{"type":28,"tag":175,"props":1561,"children":1562},{"class":177,"line":178},[1563,1567,1571],{"type":28,"tag":175,"props":1564,"children":1565},{"style":243},[1566],{"type":34,"value":246},{"type":28,"tag":175,"props":1568,"children":1569},{"style":243},[1570],{"type":34,"value":251},{"type":28,"tag":175,"props":1572,"children":1573},{"style":254},[1574],{"type":34,"value":257},{"type":28,"tag":175,"props":1576,"children":1577},{"class":177,"line":199},[1578],{"type":28,"tag":175,"props":1579,"children":1580},{"style":283},[1581],{"type":34,"value":348},{"type":28,"tag":175,"props":1583,"children":1584},{"class":177,"line":279},[1585,1589],{"type":28,"tag":175,"props":1586,"children":1587},{"style":263},[1588],{"type":34,"value":356},{"type":28,"tag":175,"props":1590,"children":1591},{"style":254},[1592],{"type":34,"value":257},{"type":28,"tag":175,"props":1594,"children":1595},{"class":177,"line":289},[1596,1600],{"type":28,"tag":175,"props":1597,"children":1598},{"style":263},[1599],{"type":34,"value":1094},{"type":28,"tag":175,"props":1601,"children":1602},{"style":254},[1603],{"type":34,"value":373},{"type":28,"tag":175,"props":1605,"children":1606},{"class":177,"line":376},[1607,1611,1615,1619,1624,1628],{"type":28,"tag":175,"props":1608,"children":1609},{"style":1498},[1610],{"type":34,"value":1501},{"type":28,"tag":175,"props":1612,"children":1613},{"style":182},[1614],{"type":34,"value":1506},{"type":28,"tag":175,"props":1616,"children":1617},{"style":1509},[1618],{"type":34,"value":1512},{"type":28,"tag":175,"props":1620,"children":1621},{"style":1498},[1622],{"type":34,"value":1623},"user/",{"type":28,"tag":175,"props":1625,"children":1626},{"style":254},[1627],{"type":34,"value":883},{"type":28,"tag":175,"props":1629,"children":1630},{"style":283},[1631],{"type":34,"value":1632},"// Excludes routes starting with /user\n",{"type":28,"tag":175,"props":1634,"children":1635},{"class":177,"line":389},[1636,1641,1646,1650,1654,1659,1663,1668,1672,1677,1682],{"type":28,"tag":175,"props":1637,"children":1638},{"style":254},[1639],{"type":34,"value":1640}," (",{"type":28,"tag":175,"props":1642,"children":1643},{"style":263},[1644],{"type":34,"value":1645},"route",{"type":28,"tag":175,"props":1647,"children":1648},{"style":254},[1649],{"type":34,"value":641},{"type":28,"tag":175,"props":1651,"children":1652},{"style":485},[1653],{"type":34,"value":646},{"type":28,"tag":175,"props":1655,"children":1656},{"style":263},[1657],{"type":34,"value":1658}," route",{"type":28,"tag":175,"props":1660,"children":1661},{"style":254},[1662],{"type":34,"value":621},{"type":28,"tag":175,"props":1664,"children":1665},{"style":182},[1666],{"type":34,"value":1667},"includes",{"type":28,"tag":175,"props":1669,"children":1670},{"style":254},[1671],{"type":34,"value":532},{"type":28,"tag":175,"props":1673,"children":1674},{"style":188},[1675],{"type":34,"value":1676},"\"temporary\"",{"type":28,"tag":175,"props":1678,"children":1679},{"style":254},[1680],{"type":34,"value":1681},"), ",{"type":28,"tag":175,"props":1683,"children":1684},{"style":283},[1685],{"type":34,"value":1686},"// Excludes routes containing 'temporary'\n",{"type":28,"tag":175,"props":1688,"children":1689},{"class":177,"line":402},[1690,1695,1699],{"type":28,"tag":175,"props":1691,"children":1692},{"style":188},[1693],{"type":34,"value":1694}," \"/ignore-me\"",{"type":28,"tag":175,"props":1696,"children":1697},{"style":254},[1698],{"type":34,"value":883},{"type":28,"tag":175,"props":1700,"children":1701},{"style":283},[1702],{"type":34,"value":1703},"// Excludes a specific route\n",{"type":28,"tag":175,"props":1705,"children":1706},{"class":177,"line":411},[1707],{"type":28,"tag":175,"props":1708,"children":1709},{"style":254},[1710],{"type":34,"value":417},{"type":28,"tag":175,"props":1712,"children":1713},{"class":177,"line":420},[1714],{"type":28,"tag":175,"props":1715,"children":1716},{"style":254},[1717],{"type":34,"value":426},{"type":28,"tag":175,"props":1719,"children":1720},{"class":177,"line":429},[1721],{"type":28,"tag":175,"props":1722,"children":1723},{"style":254},[1724],{"type":34,"value":295},{"type":28,"tag":107,"props":1726,"children":1728},{"id":1727},"hybrid-rendering-the-best-of-both-worlds",[1729],{"type":34,"value":1730},"Hybrid Rendering: The Best of Both Worlds",{"type":28,"tag":37,"props":1732,"children":1733},{},[1734],{"type":34,"value":1735},"By strategically excluding certain routes, you can implement a hybrid approach:",{"type":28,"tag":55,"props":1737,"children":1738},{},[1739,1744],{"type":28,"tag":59,"props":1740,"children":1741},{},[1742],{"type":34,"value":1743},"Prerender your main content pages for speed and SEO benefits.",{"type":28,"tag":59,"props":1745,"children":1746},{},[1747],{"type":34,"value":1748},"Use server-side rendering for dynamic, personalized, or frequently updated pages.",{"type":28,"tag":37,"props":1750,"children":1751},{},[1752],{"type":34,"value":1753},"This approach gives you the flexibility to optimize each part of your site according to its specific needs.",{"type":28,"tag":43,"props":1755,"children":1757},{"id":1756},"advanced-prerendering-techniques-taking-it-to-the-next-level",[1758],{"type":34,"value":1759},"Advanced Prerendering Techniques: Taking It to the Next Level",{"type":28,"tag":37,"props":1761,"children":1762},{},[1763],{"type":34,"value":1764},"Now that you've mastered the basics, let's explore some advanced techniques to squeeze even more performance out of your Nuxt application.",{"type":28,"tag":107,"props":1766,"children":1768},{"id":1767},"_1-lazy-loading-and-code-splitting",[1769],{"type":34,"value":1770},"1. Lazy Loading and Code Splitting",{"type":28,"tag":37,"props":1772,"children":1773},{},[1774],{"type":34,"value":1775},"Nuxt automatically code-splits your application, but you can take it further by using dynamic imports:",{"type":28,"tag":164,"props":1777,"children":1779},{"className":231,"code":1778,"language":233,"meta":7,"style":7},"export default {\n components: {\n HeavyComponent: () => import(\"../components/HeavyComponent.vue\"),\n },\n};\n",[1780],{"type":28,"tag":171,"props":1781,"children":1782},{"__ignoreMap":7},[1783,1798,1810,1850,1857],{"type":28,"tag":175,"props":1784,"children":1785},{"class":177,"line":178},[1786,1790,1794],{"type":28,"tag":175,"props":1787,"children":1788},{"style":243},[1789],{"type":34,"value":246},{"type":28,"tag":175,"props":1791,"children":1792},{"style":243},[1793],{"type":34,"value":251},{"type":28,"tag":175,"props":1795,"children":1796},{"style":254},[1797],{"type":34,"value":257},{"type":28,"tag":175,"props":1799,"children":1800},{"class":177,"line":199},[1801,1806],{"type":28,"tag":175,"props":1802,"children":1803},{"style":263},[1804],{"type":34,"value":1805}," components:",{"type":28,"tag":175,"props":1807,"children":1808},{"style":254},[1809],{"type":34,"value":257},{"type":28,"tag":175,"props":1811,"children":1812},{"class":177,"line":279},[1813,1818,1822,1827,1831,1836,1840,1845],{"type":28,"tag":175,"props":1814,"children":1815},{"style":182},[1816],{"type":34,"value":1817}," HeavyComponent",{"type":28,"tag":175,"props":1819,"children":1820},{"style":263},[1821],{"type":34,"value":318},{"type":28,"tag":175,"props":1823,"children":1824},{"style":254},[1825],{"type":34,"value":1826}," () ",{"type":28,"tag":175,"props":1828,"children":1829},{"style":485},[1830],{"type":34,"value":646},{"type":28,"tag":175,"props":1832,"children":1833},{"style":485},[1834],{"type":34,"value":1835}," import",{"type":28,"tag":175,"props":1837,"children":1838},{"style":254},[1839],{"type":34,"value":532},{"type":28,"tag":175,"props":1841,"children":1842},{"style":188},[1843],{"type":34,"value":1844},"\"../components/HeavyComponent.vue\"",{"type":28,"tag":175,"props":1846,"children":1847},{"style":254},[1848],{"type":34,"value":1849},"),\n",{"type":28,"tag":175,"props":1851,"children":1852},{"class":177,"line":289},[1853],{"type":28,"tag":175,"props":1854,"children":1855},{"style":254},[1856],{"type":34,"value":426},{"type":28,"tag":175,"props":1858,"children":1859},{"class":177,"line":376},[1860],{"type":28,"tag":175,"props":1861,"children":1862},{"style":254},[1863],{"type":34,"value":295},{"type":28,"tag":37,"props":1865,"children":1866},{},[1867],{"type":34,"value":1868},"This ensures that the component is only loaded when needed, further improving your site's performance.",{"type":28,"tag":107,"props":1870,"children":1872},{"id":1871},"_2-optimizing-assets",[1873],{"type":34,"value":1874},"2. Optimizing Assets",{"type":28,"tag":37,"props":1876,"children":1877},{},[1878,1880,1886],{"type":34,"value":1879},"Use the ",{"type":28,"tag":171,"props":1881,"children":1883},{"className":1882},[],[1884],{"type":34,"value":1885},"@nuxtjs/pwa",{"type":34,"value":1887}," module to automatically optimize and cache your assets:",{"type":28,"tag":164,"props":1889,"children":1891},{"className":166,"code":1890,"language":168,"meta":7,"style":7},"npm install @nuxtjs/pwa\n",[1892],{"type":28,"tag":171,"props":1893,"children":1894},{"__ignoreMap":7},[1895],{"type":28,"tag":175,"props":1896,"children":1897},{"class":177,"line":178},[1898,1902,1906],{"type":28,"tag":175,"props":1899,"children":1900},{"style":182},[1901],{"type":34,"value":712},{"type":28,"tag":175,"props":1903,"children":1904},{"style":188},[1905],{"type":34,"value":979},{"type":28,"tag":175,"props":1907,"children":1908},{"style":188},[1909],{"type":34,"value":1910}," @nuxtjs/pwa\n",{"type":28,"tag":37,"props":1912,"children":1913},{},[1914,1916,1921],{"type":34,"value":1915},"Add it to your ",{"type":28,"tag":171,"props":1917,"children":1919},{"className":1918},[],[1920],{"type":34,"value":226},{"type":34,"value":318},{"type":28,"tag":164,"props":1923,"children":1925},{"className":231,"code":1924,"language":233,"meta":7,"style":7},"export default {\n modules: [\"@nuxtjs/pwa\"],\n pwa: {\n // PWA options\n },\n};\n",[1926],{"type":28,"tag":171,"props":1927,"children":1928},{"__ignoreMap":7},[1929,1944,1964,1976,1984,1991],{"type":28,"tag":175,"props":1930,"children":1931},{"class":177,"line":178},[1932,1936,1940],{"type":28,"tag":175,"props":1933,"children":1934},{"style":243},[1935],{"type":34,"value":246},{"type":28,"tag":175,"props":1937,"children":1938},{"style":243},[1939],{"type":34,"value":251},{"type":28,"tag":175,"props":1941,"children":1942},{"style":254},[1943],{"type":34,"value":257},{"type":28,"tag":175,"props":1945,"children":1946},{"class":177,"line":199},[1947,1951,1955,1960],{"type":28,"tag":175,"props":1948,"children":1949},{"style":263},[1950],{"type":34,"value":1025},{"type":28,"tag":175,"props":1952,"children":1953},{"style":254},[1954],{"type":34,"value":1030},{"type":28,"tag":175,"props":1956,"children":1957},{"style":188},[1958],{"type":34,"value":1959},"\"@nuxtjs/pwa\"",{"type":28,"tag":175,"props":1961,"children":1962},{"style":254},[1963],{"type":34,"value":1040},{"type":28,"tag":175,"props":1965,"children":1966},{"class":177,"line":279},[1967,1972],{"type":28,"tag":175,"props":1968,"children":1969},{"style":263},[1970],{"type":34,"value":1971}," pwa:",{"type":28,"tag":175,"props":1973,"children":1974},{"style":254},[1975],{"type":34,"value":257},{"type":28,"tag":175,"props":1977,"children":1978},{"class":177,"line":289},[1979],{"type":28,"tag":175,"props":1980,"children":1981},{"style":283},[1982],{"type":34,"value":1983}," // PWA options\n",{"type":28,"tag":175,"props":1985,"children":1986},{"class":177,"line":376},[1987],{"type":28,"tag":175,"props":1988,"children":1989},{"style":254},[1990],{"type":34,"value":426},{"type":28,"tag":175,"props":1992,"children":1993},{"class":177,"line":389},[1994],{"type":28,"tag":175,"props":1995,"children":1996},{"style":254},[1997],{"type":34,"value":295},{"type":28,"tag":107,"props":1999,"children":2001},{"id":2000},"_3-implementing-critical-css",[2002],{"type":34,"value":2003},"3. Implementing Critical CSS",{"type":28,"tag":37,"props":2005,"children":2006},{},[2007],{"type":34,"value":2008},"Inline critical CSS to improve above-the-fold rendering:",{"type":28,"tag":164,"props":2010,"children":2012},{"className":231,"code":2011,"language":233,"meta":7,"style":7},"export default {\n build: {\n extractCSS: true,\n optimization: {\n splitChunks: {\n cacheGroups: {\n styles: {\n name: \"styles\",\n test: /\\.(css|vue)$/,\n chunks: \"all\",\n enforce: true,\n },\n },\n },\n },\n },\n};\n",[2013],{"type":28,"tag":171,"props":2014,"children":2015},{"__ignoreMap":7},[2016,2031,2043,2059,2071,2083,2095,2107,2124,2180,2197,2213,2220,2227,2235,2242,2249],{"type":28,"tag":175,"props":2017,"children":2018},{"class":177,"line":178},[2019,2023,2027],{"type":28,"tag":175,"props":2020,"children":2021},{"style":243},[2022],{"type":34,"value":246},{"type":28,"tag":175,"props":2024,"children":2025},{"style":243},[2026],{"type":34,"value":251},{"type":28,"tag":175,"props":2028,"children":2029},{"style":254},[2030],{"type":34,"value":257},{"type":28,"tag":175,"props":2032,"children":2033},{"class":177,"line":199},[2034,2039],{"type":28,"tag":175,"props":2035,"children":2036},{"style":263},[2037],{"type":34,"value":2038}," build:",{"type":28,"tag":175,"props":2040,"children":2041},{"style":254},[2042],{"type":34,"value":257},{"type":28,"tag":175,"props":2044,"children":2045},{"class":177,"line":279},[2046,2051,2055],{"type":28,"tag":175,"props":2047,"children":2048},{"style":263},[2049],{"type":34,"value":2050}," extractCSS:",{"type":28,"tag":175,"props":2052,"children":2053},{"style":485},[2054],{"type":34,"value":1082},{"type":28,"tag":175,"props":2056,"children":2057},{"style":254},[2058],{"type":34,"value":276},{"type":28,"tag":175,"props":2060,"children":2061},{"class":177,"line":289},[2062,2067],{"type":28,"tag":175,"props":2063,"children":2064},{"style":263},[2065],{"type":34,"value":2066}," optimization:",{"type":28,"tag":175,"props":2068,"children":2069},{"style":254},[2070],{"type":34,"value":257},{"type":28,"tag":175,"props":2072,"children":2073},{"class":177,"line":376},[2074,2079],{"type":28,"tag":175,"props":2075,"children":2076},{"style":263},[2077],{"type":34,"value":2078}," splitChunks:",{"type":28,"tag":175,"props":2080,"children":2081},{"style":254},[2082],{"type":34,"value":257},{"type":28,"tag":175,"props":2084,"children":2085},{"class":177,"line":389},[2086,2091],{"type":28,"tag":175,"props":2087,"children":2088},{"style":263},[2089],{"type":34,"value":2090}," cacheGroups:",{"type":28,"tag":175,"props":2092,"children":2093},{"style":254},[2094],{"type":34,"value":257},{"type":28,"tag":175,"props":2096,"children":2097},{"class":177,"line":402},[2098,2103],{"type":28,"tag":175,"props":2099,"children":2100},{"style":263},[2101],{"type":34,"value":2102}," styles:",{"type":28,"tag":175,"props":2104,"children":2105},{"style":254},[2106],{"type":34,"value":257},{"type":28,"tag":175,"props":2108,"children":2109},{"class":177,"line":411},[2110,2115,2120],{"type":28,"tag":175,"props":2111,"children":2112},{"style":263},[2113],{"type":34,"value":2114}," name:",{"type":28,"tag":175,"props":2116,"children":2117},{"style":188},[2118],{"type":34,"value":2119}," \"styles\"",{"type":28,"tag":175,"props":2121,"children":2122},{"style":254},[2123],{"type":34,"value":276},{"type":28,"tag":175,"props":2125,"children":2126},{"class":177,"line":420},[2127,2132,2137,2142,2146,2151,2156,2161,2166,2171,2176],{"type":28,"tag":175,"props":2128,"children":2129},{"style":263},[2130],{"type":34,"value":2131}," test:",{"type":28,"tag":175,"props":2133,"children":2134},{"style":1498},[2135],{"type":34,"value":2136}," /",{"type":28,"tag":175,"props":2138,"children":2139},{"style":1509},[2140],{"type":34,"value":2141},"\\.",{"type":28,"tag":175,"props":2143,"children":2144},{"style":188},[2145],{"type":34,"value":532},{"type":28,"tag":175,"props":2147,"children":2148},{"style":1498},[2149],{"type":34,"value":2150},"css",{"type":28,"tag":175,"props":2152,"children":2153},{"style":182},[2154],{"type":34,"value":2155},"|",{"type":28,"tag":175,"props":2157,"children":2158},{"style":1498},[2159],{"type":34,"value":2160},"vue",{"type":28,"tag":175,"props":2162,"children":2163},{"style":188},[2164],{"type":34,"value":2165},")",{"type":28,"tag":175,"props":2167,"children":2168},{"style":182},[2169],{"type":34,"value":2170},"$",{"type":28,"tag":175,"props":2172,"children":2173},{"style":1498},[2174],{"type":34,"value":2175},"/",{"type":28,"tag":175,"props":2177,"children":2178},{"style":254},[2179],{"type":34,"value":276},{"type":28,"tag":175,"props":2181,"children":2182},{"class":177,"line":429},[2183,2188,2193],{"type":28,"tag":175,"props":2184,"children":2185},{"style":263},[2186],{"type":34,"value":2187}," chunks:",{"type":28,"tag":175,"props":2189,"children":2190},{"style":188},[2191],{"type":34,"value":2192}," \"all\"",{"type":28,"tag":175,"props":2194,"children":2195},{"style":254},[2196],{"type":34,"value":276},{"type":28,"tag":175,"props":2198,"children":2199},{"class":177,"line":1304},[2200,2205,2209],{"type":28,"tag":175,"props":2201,"children":2202},{"style":263},[2203],{"type":34,"value":2204}," enforce:",{"type":28,"tag":175,"props":2206,"children":2207},{"style":485},[2208],{"type":34,"value":1082},{"type":28,"tag":175,"props":2210,"children":2211},{"style":254},[2212],{"type":34,"value":276},{"type":28,"tag":175,"props":2214,"children":2215},{"class":177,"line":1313},[2216],{"type":28,"tag":175,"props":2217,"children":2218},{"style":254},[2219],{"type":34,"value":1319},{"type":28,"tag":175,"props":2221,"children":2222},{"class":177,"line":1322},[2223],{"type":28,"tag":175,"props":2224,"children":2225},{"style":254},[2226],{"type":34,"value":1328},{"type":28,"tag":175,"props":2228,"children":2229},{"class":177,"line":1331},[2230],{"type":28,"tag":175,"props":2231,"children":2232},{"style":254},[2233],{"type":34,"value":2234}," },\n",{"type":28,"tag":175,"props":2236,"children":2237},{"class":177,"line":1340},[2238],{"type":28,"tag":175,"props":2239,"children":2240},{"style":254},[2241],{"type":34,"value":672},{"type":28,"tag":175,"props":2243,"children":2244},{"class":177,"line":1348},[2245],{"type":28,"tag":175,"props":2246,"children":2247},{"style":254},[2248],{"type":34,"value":426},{"type":28,"tag":175,"props":2250,"children":2251},{"class":177,"line":1356},[2252],{"type":28,"tag":175,"props":2253,"children":2254},{"style":254},[2255],{"type":34,"value":295},{"type":28,"tag":43,"props":2257,"children":2259},{"id":2258},"measuring-success-monitoring-your-prerendered-nuxt-site",[2260],{"type":34,"value":2261},"Measuring Success: Monitoring Your Prerendered Nuxt Site",{"type":28,"tag":37,"props":2263,"children":2264},{},[2265],{"type":34,"value":2266},"After implementing prerendering, it's crucial to measure its impact. Here are some key metrics to track:",{"type":28,"tag":55,"props":2268,"children":2269},{},[2270,2280,2290,2300],{"type":28,"tag":59,"props":2271,"children":2272},{},[2273,2278],{"type":28,"tag":63,"props":2274,"children":2275},{},[2276],{"type":34,"value":2277},"Page Load Time",{"type":34,"value":2279},": Use tools like Google PageSpeed Insights to measure improvements.",{"type":28,"tag":59,"props":2281,"children":2282},{},[2283,2288],{"type":28,"tag":63,"props":2284,"children":2285},{},[2286],{"type":34,"value":2287},"Time to First Byte (TTFB)",{"type":34,"value":2289},": This should decrease significantly with prerendering.",{"type":28,"tag":59,"props":2291,"children":2292},{},[2293,2298],{"type":28,"tag":63,"props":2294,"children":2295},{},[2296],{"type":34,"value":2297},"Search Engine Rankings",{"type":34,"value":2299},": Monitor your positions for key terms over time.",{"type":28,"tag":59,"props":2301,"children":2302},{},[2303,2308],{"type":28,"tag":63,"props":2304,"children":2305},{},[2306],{"type":34,"value":2307},"Organic Traffic",{"type":34,"value":2309},": Track increases in search engine-driven visits.",{"type":28,"tag":43,"props":2311,"children":2313},{"id":2312},"conclusion-embracing-the-future-of-web-performance",[2314],{"type":34,"value":2315},"Conclusion: Embracing the Future of Web Performance",{"type":28,"tag":37,"props":2317,"children":2318},{},[2319],{"type":34,"value":2320},"Nuxt prerendering is more than just a performance optimization – it's a paradigm shift in how we build and deliver web applications. By implementing the techniques we've covered, you're not just improving your site's speed and SEO; you're providing a superior user experience that will set you apart in today's competitive digital landscape.",{"type":28,"tag":37,"props":2322,"children":2323},{},[2324],{"type":34,"value":2325},"Remember, the web is constantly evolving, and staying ahead means continually refining and optimizing your approach. Keep experimenting, measuring, and pushing the boundaries of what's possible with Nuxt and prerendering.",{"type":28,"tag":37,"props":2327,"children":2328},{},[2329],{"type":34,"value":2330},"Are you ready to take your Nuxt projects to the next level? The future of blazing-fast, SEO-friendly web applications is here – and it's prerendered. Start implementing these techniques today, and watch your site soar to new heights of performance and visibility.",{"type":28,"tag":2332,"props":2333,"children":2334},"style",{},[2335],{"type":34,"value":2336},"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);}",{"title":7,"searchDepth":199,"depth":199,"links":2338},[2339,2340,2343,2350,2355,2360,2365,2366],{"id":45,"depth":199,"text":48},{"id":97,"depth":199,"text":100,"children":2341},[2342],{"id":109,"depth":279,"text":112},{"id":143,"depth":199,"text":146,"children":2344},[2345,2346,2347,2348,2349],{"id":154,"depth":279,"text":157},{"id":212,"depth":279,"text":215},{"id":303,"depth":279,"text":306},{"id":689,"depth":279,"text":692},{"id":738,"depth":279,"text":741},{"id":756,"depth":199,"text":759,"children":2351},[2352,2353,2354],{"id":767,"depth":279,"text":770},{"id":944,"depth":279,"text":947},{"id":1124,"depth":279,"text":1127},{"id":1364,"depth":199,"text":1367,"children":2356},[2357,2358,2359],{"id":1375,"depth":279,"text":1378},{"id":1419,"depth":279,"text":1422},{"id":1727,"depth":279,"text":1730},{"id":1756,"depth":199,"text":1759,"children":2361},[2362,2363,2364],{"id":1767,"depth":279,"text":1770},{"id":1871,"depth":279,"text":1874},{"id":2000,"depth":279,"text":2003},{"id":2258,"depth":199,"text":2261},{"id":2312,"depth":199,"text":2315},"markdown","content:articles:how_to_prerender.md","content","articles/how_to_prerender.md","articles/how_to_prerender","md",1726438771279]