<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[NuxtDojo]]></title><description><![CDATA[Whether you're a Nuxt Js developer or a budding writer, join me in my book writing journey where Nuxt Js and storytelling unites.]]></description><link>https://blog.nuxtdojo.com</link><image><url>https://substackcdn.com/image/fetch/$s_!93os!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5c50080-c4cd-430f-94b1-b86a44ffd0f7_678x678.png</url><title>NuxtDojo</title><link>https://blog.nuxtdojo.com</link></image><generator>Substack</generator><lastBuildDate>Tue, 05 May 2026 07:42:42 GMT</lastBuildDate><atom:link href="https://blog.nuxtdojo.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[NuxtDojo]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[nuxtdojo@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[nuxtdojo@substack.com]]></itunes:email><itunes:name><![CDATA[Krutie]]></itunes:name></itunes:owner><itunes:author><![CDATA[Krutie]]></itunes:author><googleplay:owner><![CDATA[nuxtdojo@substack.com]]></googleplay:owner><googleplay:email><![CDATA[nuxtdojo@substack.com]]></googleplay:email><googleplay:author><![CDATA[Krutie]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[#9 Real-time Nuxt with Nitro & WebSockets, Interactive Vue and Custom TOC in Asciidoctor ]]></title><description><![CDATA[Discover the potential of Nuxt & Nitro with WebSocket integration, prefix & suffix usage, & a custom TOC setup in Asciidoctor. Plus, Vue tricks with Floating Dock Menus & flashcards from pariksha.io]]></description><link>https://blog.nuxtdojo.com/p/9-real-time-nuxt-with-nitro-and-websockets</link><guid isPermaLink="false">https://blog.nuxtdojo.com/p/9-real-time-nuxt-with-nitro-and-websockets</guid><dc:creator><![CDATA[Krutie]]></dc:creator><pubDate>Thu, 31 Oct 2024 12:08:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#127775; Welcome to NuxtDojo Newsletter #9 &#127775;</p><p>This NuxtDojo edition covers WebSockets, Nitro, and the power of Nuxt's prefixes, suffixes and <em>lazies</em>. Reflecting on the Nitro chapters in my book, I realise there&#8217;s so much depth to Nitro that I could fill several newsletters with it&#8212;a single book chapter won&#8217;t do it justice! I&#8217;ve also grouped all the info on Nuxt&#8217;s prefixes, suffixes, and lazy loading into one spot to help you think methodically when you are structuring your Nuxt projects.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.nuxtdojo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading NuxtDojo! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>In Author&#8217;s Corner, we explore Ruby extensions to create a two-column TOC layout in Asciidoctor, inspired by Packt books.</p><p>Bonus items include a Floating Dock Menu in Vue with VueUse Motion and Pariksha.io&#8217;s fun flashcards on coding jargon!</p><p>Happy reading!</p><h2>Nuxter&#8217;s Corner</h2><p>As <strong><a href="https://nitro.unjs.io/">Nitro</a></strong> keeps evolving, it&#8217;s only getting stronger. Writing a chapter on Nitro, though, has been a bit overwhelming&#8212;juggling ideas and sometimes feeling torn between covering the essentials or diving deeper into what it can offer for full-stack Nuxt. </p><p>Some recipes I&#8217;m considering:</p><ul><li><p>Recipe 1: Build Serverless API Endpoints</p></li><li><p>Recipe 2: Implement Custom Middleware</p></li><li><p>Recipe 3: Deploy to Multiple Platforms</p></li><li><p>Recipe 4: Edge Rendering</p></li><li><p>Recipe 5: Data Fetching and Server-Side Rendering</p></li><li><p>Recipe 6: Use WebSockets for Real-Time Communication</p></li><li><p>Recipe 7: Handle File Uploads</p></li></ul><p>For a fresh start, I chose Recipe 6: Adding WebSockets in Nuxt for real-time functionality. Despite being an experimental feature, the implementation was surprisingly smooth and so much fun!</p><h3>Nuxt and WebSocket</h3><p>We&#8217;re all familiar with Nitro&#8217;s `defineEventHandler`, but have you come across `defineWebSocketHandler`? I hadn&#8217;t either, and in my opinion, it&#8217;s a game-changer!</p><p>I&#8217;m still laying the groundwork with WebSockets in Nuxt and haven&#8217;t tackled databases or deployment just yet. For now, I&#8217;ve adapted an <strong><a href="https://stackblitz.com/github/unjs/crossws/tree/main/examples/h3?file=index.ts">example</a></strong> from UnJs&#8217;s <strong><a href="https://crossws.unjs.io/">CrossWS</a></strong> library and customised it as a communication layer for a two-player (board) game.</p><p>After setting up the WebSocket example below, `XState` immediately came to mind&#8212;adding it could make for a great Game Engine example. It might just be the perfect addition to my book! How about two players can play <strong><a href="https://codesandbox.io/p/sandbox/quiz-machine-v4-ts-gffic">this type of quiz</a></strong>, but in real-time?</p><p>Here&#8217;s an example I put together where Chrome and Firefox chat with each other in real-time. Feel free to clone the repo (link below) and experiment with the various WebSocket hooks to see how everything connects and functions.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Wnrk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Wnrk!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif 424w, https://substackcdn.com/image/fetch/$s_!Wnrk!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif 848w, https://substackcdn.com/image/fetch/$s_!Wnrk!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif 1272w, https://substackcdn.com/image/fetch/$s_!Wnrk!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Wnrk!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:8579707,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Wnrk!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif 424w, https://substackcdn.com/image/fetch/$s_!Wnrk!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif 848w, https://substackcdn.com/image/fetch/$s_!Wnrk!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif 1272w, https://substackcdn.com/image/fetch/$s_!Wnrk!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db69ef6-51d0-49df-b42b-8b1822e618b5_2936x1912.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!babx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!babx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png 424w, https://substackcdn.com/image/fetch/$s_!babx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png 848w, https://substackcdn.com/image/fetch/$s_!babx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png 1272w, https://substackcdn.com/image/fetch/$s_!babx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!babx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png" width="1456" height="908" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:908,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:645475,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!babx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png 424w, https://substackcdn.com/image/fetch/$s_!babx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png 848w, https://substackcdn.com/image/fetch/$s_!babx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png 1272w, https://substackcdn.com/image/fetch/$s_!babx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41bedcd5-50aa-437d-9e73-32180e804a63_2940x1833.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Real-time chat between Player 1 (Left, Chrome) and Player 2 (Right, Firefox)</figcaption></figure></div><ul><li><p>Check out the <strong><a href="https://github.com/Krutie/Nuxt-3-WebSockets">Github Repo</a></strong> of my experiment with Nuxt and WebSockets</p></li><li><p>Read full article on how I integrated WebSockets in Nuxt 3 project: <strong><a href="https://krutiepatel.com/blog/30-real-time-with-nuxt-3-a-guide-to-websocket-integration">Real-Time with Nuxt 3: A Guide to WebSocket Integration</a></strong></p></li></ul><h3>Suffixes, Prefixes and Nuxt Magic</h3><p>I haven&#8217;t yet decided where this will fit into my book, but it&#8217;s essential to have a high-level understanding of the prefixes and suffixes available in Nuxt. While working with WebSockets, I coincidentally needed to create a client-only Vue component, making the topic of suffixes and prefixes especially relevant to my project. It was perfect timing for my use case!</p><p>So, I documented the impact of prefixes and suffixes in Nuxt, highlighting how strategic naming&#8212;like `.global`, `.server`, and `Lazy`&#8212;enhances functionality, improves performance, and optimises component behaviour for server-side and/or client-side rendering. This detailed breakdown illustrates the power of conventions in organising code, controlling loading processes, and handling middleware. For developers seeking to streamline and elevate their Nuxt projects, mastering these naming conventions offers both clarity and efficiency.</p><ul><li><p>Read full article: <strong><a href="https://krutiepatel.com/blog/29-suffixes-prefixes-and-nuxt-magic-a-developers-guide-to-smart-coding">Suffixes, Prefixes, and Nuxt Magic</a></strong></p></li></ul><h2>Author&#8217;s Corner</h2><h3>Custom Table Of Content</h3><p>This little side project started when I was browsing through some of the Packt Publishing books. I loved how each section is neatly organised, which inspired me to explore how to achieve a similar style in my own book using Asciidoctor.</p><p>So, I took a deeper dive into using Asciidoctor with Ruby and the Prawn library to create professional, customised PDFs, focusing on designing a tailored Table of Contents (TOC). By leveraging Asciidoctor&#8217;s API and methods, like `convert_document`, I was able to structure TOCs with interactive links, a two-column layout, and dynamic page management. These techniques offer a polished PDF layout, ideal for projects needing a well-organised TOC and flexible content formatting.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!axe0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!axe0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg 424w, https://substackcdn.com/image/fetch/$s_!axe0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg 848w, https://substackcdn.com/image/fetch/$s_!axe0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!axe0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!axe0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg" width="1456" height="737" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:737,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:673325,&quot;alt&quot;:&quot;Tan Li Hau&#8217;s Svelte book on the left | My Nuxt book on the right&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Tan Li Hau&#8217;s Svelte book on the left | My Nuxt book on the right" title="Tan Li Hau&#8217;s Svelte book on the left | My Nuxt book on the right" srcset="https://substackcdn.com/image/fetch/$s_!axe0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg 424w, https://substackcdn.com/image/fetch/$s_!axe0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg 848w, https://substackcdn.com/image/fetch/$s_!axe0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!axe0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41910828-4254-4402-8cdb-71b50fad0fcc_2118x1072.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Tan Li Hau&#8217;s Svelte book on the left | My Nuxt book on the right</figcaption></figure></div><ul><li><p>Read full article where I wrote about how I achieved the two-column TOC layout using custom Ruby extension for Asciidoctor: <strong><a href="https://medium.com/@krutie/building-professional-pdfs-with-asciidoctor-advanced-techniques-for-tocs-and-layouts-ea002a0a2177">Building Professional PDFs with Asciidoctor: Advanced Techniques for TOCs and Layouts</a></strong></p></li><li><p>Check out the quick <strong><a href="https://gist.github.com/Krutie/4fdec214a66fb1005a1c7b894b4c6e31">Ruby implementation Gist</a></strong></p></li></ul><h2>Bonus</h2><h3>Floating Dock Menu with VueUse Motion</h3><p>While browsing through the latest component libraries, I stumbled upon <strong><a href="https://ui.aceternity.com/components">Aceternity UI</a>. </strong>They had recently implemented a new Floating Dock component. Naturally, I had to try it with Vue! </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e958!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e958!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif 424w, https://substackcdn.com/image/fetch/$s_!e958!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif 848w, https://substackcdn.com/image/fetch/$s_!e958!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!e958!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e958!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif" width="410" height="230.625" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:410,&quot;bytes&quot;:2988882,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!e958!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif 424w, https://substackcdn.com/image/fetch/$s_!e958!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif 848w, https://substackcdn.com/image/fetch/$s_!e958!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!e958!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8b6ee1f-33ad-4408-887e-02b4312010ad_1280x720.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>My first instinct was to use GSAP to create that magnifying icons effect. Since Aceternity UI achieved their transitions with <strong><a href="https://www.framer.com/motion/">Framer Motion</a></strong>, I decided to go for a similar approach in Vue and picked <strong><a href="https://motion.vueuse.org/">VueUse Motion</a></strong> to recreate the effect.</p><ul><li><p>Check out the <strong><a href="https://github.com/Krutie/Floating-Dock-Menu">Github Repo of Floating Dock Menu</a></strong></p></li></ul><p>I haven&#8217;t mapped out my chapter on transitions yet, but exploring VueUse Motion has been a real eye-opener. Many developers might assume that animations and transitions are strictly client-side, so rendering them on the server might seem unnecessary. However, VueUse Motion offers both module and SSR support, making it a perfect fit for Nuxt projects because SSR (Server-Side Rendering) support for animations is essential in Nuxt for several reasons:</p><ol><li><p><strong>SEO Benefits</strong>: SSR ensures that content, including animations, is available for search engines, improving SEO by making animated elements fully crawlable.</p></li><li><p><strong>Initial Load Experience</strong>: With SSR, animations can be pre-rendered, ensuring a smoother experience on the first load, especially on slower devices or networks.</p></li><li><p><strong>Accessibility</strong>: By rendering transitions server-side, you maintain an accessible, static fallback for users with JavaScript disabled or limited browser capabilities.</p></li></ol><h3>Interactive Flashcards</h3><p>I&#8217;ve been experimenting with ways to present listicle-style articles, and it hit me&#8212;<strong><a href="https://pariksha.io/">pariksha.io</a></strong>, which started as a flashcard quiz platform, would be great for quick, informative flashcards too. You can read listicle-style content as interactive flashcards on pariksha.io!</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nteq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nteq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png 424w, https://substackcdn.com/image/fetch/$s_!nteq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png 848w, https://substackcdn.com/image/fetch/$s_!nteq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png 1272w, https://substackcdn.com/image/fetch/$s_!nteq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nteq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png" width="228" height="83.53968253968254" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:277,&quot;width&quot;:756,&quot;resizeWidth&quot;:228,&quot;bytes&quot;:140385,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nteq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png 424w, https://substackcdn.com/image/fetch/$s_!nteq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png 848w, https://substackcdn.com/image/fetch/$s_!nteq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png 1272w, https://substackcdn.com/image/fetch/$s_!nteq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4bf232-34c6-4d7a-aebd-db21218fba9b_756x277.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ul><li><p>Learn about <strong><a href="https://pariksha.io/general-knowledge/01-programming-jargon-backstories-i">backstories of programming jargons</a></strong> that we (developers) use in our daily lives.</p></li></ul><div><hr></div><p>Thank you for joining me on this adventure, and I hope you find inspiration and enlightenment within these pages.</p><h4><strong>&#128640; How You Can Participate:</strong></h4><ul><li><p><strong>&#128218; Read Along:</strong> Subscribe to the newsletter to receive updates, diagrams, and behind-the-scenes content.</p></li><li><p><strong>&#129309; Community Interaction:</strong> Share topic suggestions for the book, questions, and insights here on NuxtDojo Substack.</p></li><li><p><strong>&#128640; Spread the Word:</strong> Let others know about <strong>NuxtDojo</strong> &#8211; share on social media and among your developer circles.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nc75!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" width="208" height="148.096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896211a6-f760-4b87-8118-5e851387ec1f_500x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:356,&quot;width&quot;:500,&quot;resizeWidth&quot;:208,&quot;bytes&quot;:86449,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">nuxtdojo.com</figcaption></figure></div><p>Warm regards,<br><a href="https://twitter.com/KrutiePatel">Krutie</a> @ NuxtDojo &#128640;&#128218;</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.nuxtdojo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading NuxtDojo! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[#8 Enhance Your Nuxt App's Performance with these caching techniques, server components and auto-imports]]></title><description><![CDATA[In this edition of NuxtDojo, we explore key performance-enhancing features like aliases, auto-imports, caching strategies & Server Components. Learn how these tools can help streamline your Nuxt app.]]></description><link>https://blog.nuxtdojo.com/p/8-enhance-your-nuxt-apps-performance</link><guid isPermaLink="false">https://blog.nuxtdojo.com/p/8-enhance-your-nuxt-apps-performance</guid><dc:creator><![CDATA[Krutie]]></dc:creator><pubDate>Mon, 30 Sep 2024 13:59:19 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/be82ba16-3d9d-4669-8b1c-09e52d28e08f_1792x1024.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#127775; Welcome to NuxtDojo Newsletter #8! &#127775;</p><p>If we were to break down Nuxt&#8217;s features into broad categories, I&#8217;d say they mostly fall into two: Performance Optimisation and Developer Experience (DX). </p><p>In this edition of NuxtDojo, we'll dive into some performance-focused features like Nuxt aliases, auto-imports, different caching methods (both server-side and client-side), and even touch on Server Components. What ties all these features together is their ability to boost your app's performance in one way or another. Whether it's trimming down the bundle size, cutting out unnecessary JavaScript, or speeding up page loads, Nuxt has your back!</p><p>So, let&#8217;s dive in.</p><h3>Nuxter&#8217;s Corner</h3><h4>1&#65039;&#8419; Nuxt Aliases and Auto-Imports</h4><p>Managing imports in Nuxt can greatly affect the structure, performance, and maintainability of your application. Nuxt offers several features, such as auto-imports, aliases, and manual imports, to help streamline and optimise the way imports are handled. </p><p>Here are the key concepts in managing imports in Nuxt:</p><ul><li><p><strong>Aliases</strong>: Aliases allow you to define shorthand paths to directories or files, reducing the use of long relative paths in your imports.</p></li><li><p><strong>Auto-Imports</strong>: Nuxt can automatically import commonly used utilities, components, and composables, reducing the need for manual <code>import</code> statements.</p></li><li><p><strong>Manual Imports</strong>: Despite the convenience of auto-imports, manual imports are sometimes preferred for better control over code bundling and performance.</p></li><li><p><strong>Third-Party Package Imports</strong>: Nuxt can automatically or manually import utilities from third-party libraries, streamlining external dependencies management.</p></li></ul><p>To scope out these topics for my Nuxt book, I have written these two articles detailing types of aliases, and ways to use auto-imports in Nuxt.</p><ol><li><p><strong><a href="https://krutiepatel.com/blog/23-understanding-aliases-in-nuxt-a-detailed-breakdown">Understanding Aliases in Nuxt: A Detailed Breakdown</a> </strong></p></li><li><p><strong><a href="https://krutiepatel.com/blog/24-understanding-auto-imports-in-nuxt-a-comprehensive-guide">Understanding Auto-Imports in Nuxt</a></strong></p></li></ol><p>By combining auto-imports, aliases, and manual imports, you can strike the right balance between convenience and control, leading to a clean, performant, and scalable Nuxt application.</p><div><hr></div><h4>2&#65039;&#8419; Caching Strategies in Nuxt.js</h4><p>Caching is an essential aspect of optimising performance in Nuxt.js applications. Both server-side and client-side caching mechanisms are available in Nuxt, and they can be used in combination to significantly improve load times, reduce server load, and enhance the overall user experience.</p><p>While diving into the Nuxt documentation to explore caching strategies, I learned that there was a lot more to it than I initially expected. What started out as a single article ended up splitting into two&#8212;one focused on <strong>server-side caching</strong> and the other on <strong>client-side caching</strong>. The really cool part is that these two approaches aren&#8217;t mutually exclusive; in fact, they complement each other beautifully.</p><ol start="3"><li><p><strong><a href="https://krutiepatel.com/blog/26-server-side-caching-strategies-in-nuxt">Server-Side Caching Strategies in Nuxt</a></strong></p></li><li><p><strong><a href="https://krutiepatel.com/blog/27-optimize-api-caching-balancing-routerules-with-definecacheeventhandler">Optimise API Caching: Balancing RouteRules with CacheEventHandler</a></strong></p></li><li><p><strong><a href="https://krutiepatel.com/blog/28-client-side-caching-strategies-in-nuxt">Client-side Caching Strategies in Nuxt.js</a></strong></p></li></ol><p>By combining these server-side and client-side caching strategies, you can significantly improve the performance of your Nuxt.js applications.</p><p>As I worked through to explore different approaches to caching, it got me thinking about how I should structure the chapters of my book. For certain features or concepts, like types of Nuxt Routes or Layouts, <strong>project-based chapters</strong> make sense, as they allow readers to follow along step-by-step and see the feature in action within the context of a full project.</p><p>On the other hand, for topics that are more about exploring multiple techniques or options, like caching, a <strong>listicle or recipe-style format</strong> might be more appropriate, because it is impossible to include all caching techniques into a single project-based chapter. I am thinking these recipe-style chapters could be bite-sized and offer actionable solutions for common problems, making it easier for readers to pick and choose strategies depending on their needs.</p><div><hr></div><h4>3&#65039;&#8419; Server Components in Nuxt.js</h4><p>When I started writing this book, a lot of Nuxt features felt fresh&#8212;like that 'just released in Nuxt 3' kind of new. But now, those features have become part of my everyday Nuxt projects, except for Server Components. Due to time constraints, I used the popular markdown component as an example to show how they work.</p><ol start="6"><li><p><strong><a href="https://krutiepatel.com/blog/25-server-components-in-nuxt-js">Server Components in Nuxt.js</a></strong></p></li></ol><p>Yet, I still find myself searching for more situations where Server Components truly stand out. So, I did what anyone would do in my place these days. I asked ChatGPT, and it gave me some interesting ideas that I think I will explore next and see how I go.</p><ul><li><p>Generating graphs or charts using libraries that are heavy or not suitable for client-side rendering.</p></li><li><p>Incorporating legacy code or libraries that aren't compatible with client-side rendering.</p></li><li><p>Creating PDFs on the server for reports, invoices, or other documents.</p></li><li><p>Generating email templates that need to be sent directly from the server.</p></li><li><p>Implementing feature flags or A/B testing on the server side allows for dynamic rendering without client-side logic. (This could be super interesting to implement!)</p></li></ul><p>If these chapter ideas have piqued your interest and left you eager for more, I invite you to subscribe to NuxtDojo newsletter. By subscribing, you'll gain access to exclusive updates about the progress of my book, as well as the opportunity to be among the first to receive the early release of each chapter.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.nuxtdojo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.nuxtdojo.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h3>Author&#8217;s Corner</h3><p>It's been a while since I last updated my Asciidoctor project. One thing I love about working with Asciidoctor is that when you're deep in writing mode, it feels just like writing in Markdown&#8212;you almost forget you're working in an Asciidoctor project at all.</p><p>For the future edition, I'm planning to share a starter Asciidoctor project template, so anyone can clone it and jump right into writing technical books without any hassle. With that idea in mind, I quickly found myself diving back into book themes and Ruby again!</p><p>Here&#8217;s how you can customise the default page layout using the basic Ruby extension.</p><h4>Ruby Script to customise the page layout</h4><p>To customise the page layout for title pages, part-title, and chapter-title in Asciidoctor PDF using a Ruby script, you will extend the functionality of Asciidoctor PDF. Asciidoctor PDF allows limited customisation through themes, but for more complex layout modifications, you can write a custom Ruby extension.</p><p><strong>Step-by-Step Guide: </strong>Here&#8217;s how you can build a custom Ruby script to customise the layout of specific page elements like the title page, part-title, and chapter-title.</p><ul><li><p><strong>Step 1:</strong> Install Required Gems<br>Make sure you have Asciidoctor PDF installed by running:</p><pre><code>gem install asciidoctor-pdf</code></pre></li></ul><ul><li><p><strong>Step 2:</strong> Create a Ruby Extension</p><p><strong><a href="https://gist.github.com/Krutie/3dec3ed026da6de662e77a7faa52f2c0">This script</a></strong> will modify how the title page, part-title, and chapter-title are rendered. Save this Ruby script as <strong>custom_page_layout.rb</strong>.</p><pre><code><strong>require 'asciidoctor-pdf'</strong>

<strong>class CustomPdfConverter &lt; Asciidoctor::PDF::Converter</strong>
  <strong>register_for 'pdf'</strong>

  # Customise the title page layout
  <strong>def layout_title_page(doc)</strong>
    start_new_page
    font 'Helvetica', size: 48, style: :bold
    # ... 
  end

  # Customise the part-title layout
  <strong>def layout_part_title(part)</strong>
    start_new_page
    font 'Helvetica', size: 36, style: :bold
    text part.title, align: :center, valign: :center
    # ...
  end

  # Customise the chapter-title layout
  <strong>def layout_chapter_title(chapter, opts = {})</strong>
    # Start new chapter page
    # ...
  <strong>end
end</strong></code></pre></li><li><p><strong>Step 3:</strong> Use the Custom Ruby Script</p><p>Once you have saved the script, you can pass it to the `asciidoctor-pdf` command to generate the PDF with custom page layouts. Run the following command:</p><pre><code>asciidoctor-pdf -r <strong>./custom_page_layout.rb</strong> my_document.adoc</code></pre></li></ul><p>This custom Ruby script modifies the page layout for title pages, part-title, and chapter-title in Asciidoctor PDF. You can tweak the design to fit your needs, such as adding logos, custom fonts, or different page orientations. The combination of a Ruby script and an Asciidoctor PDF theme gives you comprehensive control over the document layout.</p><p>Keep an eye on my future newsletter to get the Github Repo of the Asciidoctor starter project.</p><div><hr></div><p>Thank you for joining me on this adventure, and I hope you find inspiration and enlightenment within these pages.</p><h4><strong>&#128640; How You Can Participate:</strong></h4><ul><li><p><strong>&#128218; Read Along:</strong> Subscribe to the newsletter to receive updates, diagrams, and behind-the-scenes content.</p></li><li><p><strong>&#129309; Community Interaction:</strong> Share topic suggestions for the book, questions, and insights here on NuxtDojo Substack.</p></li><li><p><strong>&#128640; Spread the Word:</strong> Let others know about <strong>NuxtDojo</strong> &#8211; share on social media and among your developer circles.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nc75!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" width="208" height="148.096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896211a6-f760-4b87-8118-5e851387ec1f_500x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:356,&quot;width&quot;:500,&quot;resizeWidth&quot;:208,&quot;bytes&quot;:86449,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">nuxtdojo.com</figcaption></figure></div><p>Warm regards,<br><a href="https://twitter.com/KrutiePatel">Krutie</a> @ NuxtDojo &#128640;&#128218;</p>]]></content:encoded></item><item><title><![CDATA[#7 Mastering Vue side of Nuxt, Firebase Auth as Nuxt Layer, and Author's Insights]]></title><description><![CDATA[Explore Vue component design patterns, my Firebase Auth experiment as a Nuxt Layer, and insights on Vue/Nuxt books and authoring tools in the Author's Corner.]]></description><link>https://blog.nuxtdojo.com/p/7-mastering-vue-side-of-nuxt-firebase</link><guid isPermaLink="false">https://blog.nuxtdojo.com/p/7-mastering-vue-side-of-nuxt-firebase</guid><dc:creator><![CDATA[Krutie]]></dc:creator><pubDate>Sat, 31 Aug 2024 13:59:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ME3q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#127775; Welcome to NuxtDojo Newsletter #7 &#127775;</p><p>It&#8217;s been a while since my last update. I've been reading several books by other authors in the JavaScript community, and a few side projects have popped up while my Nuxt book project continues to progress slowly but surely in the background.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.nuxtdojo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading NuxtDojo! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>For the Nuxt book, I've been developing ideas for the Vue Components and Authentication chapters, and I'm also exploring other book authoring software in addition to AsciiDoc.</p><p>So, let&#8217;s dive in. Happy reading!</p><h3>Nuxter&#8217;s Corner</h3><h4>Vue side of Nuxt</h4><p>Vue components are the backbone of Nuxt applications, so I'm planning to draft a chapter that takes a deep dive into everything related to Vue components.</p><p>We'll explore:</p><ul><li><p><strong><a href="https://krutiepatel.com/2-single-file-components">Single File Components</a></strong></p></li><li><p><strong><a href="https://krutiepatel.com/3-render-function-components">Render Function Components</a></strong></p></li><li><p>And two additional Vue component design patterns to enhance the performance of Vue/Nuxt applications:</p><ul><li><p><strong><a href="https://krutiepatel.com/4-functional-components">Functional Components</a></strong> </p></li><li><p><strong><a href="https://krutiepatel.com/5-renderless-components">Renderless (aka Headless) Components</a></strong> </p></li></ul></li></ul><p>This chapter will provide a comprehensive look at these essential building blocks of Vue and Nuxt development.</p><p>The key idea here is to take a single Vue component and re-create it using the various design patterns available in Vue.js. You can visit this <strong><a href="https://krutiepatel.com/blog/vue-components-design-patterns-back-to-basics">landing page</a></strong> to get a clearer view of the bigger picture, showcasing all the different variants of the same Numeric Input component in one place, along with their respective articles for further learning.</p><p>Additionally, feel free to explore the <strong><a href="https://github.com/Krutie/numeric-input-components-layer">GitHub repository</a></strong> where I am extending these components into my blog as a Nuxt Layer.</p><p>I see this chapter as a smooth transition into the Nuxt side of Vue, where Vue components are taken to the next level. In Nuxt, we have page components that drive the file-based routing system, and now we can even separate server and client components. And that's not even touching on dynamic and async components in Vue.js. It only makes sense to thoroughly understand everything about Vue components when we talk about Nuxt.</p><p>While writing this guide on Vue components, I've come up with a lot of ideas that I haven't been able to include just yet, but I believe they could be super useful. These could include sections like:</p><ul><li><p>Vue Components Gotchas: covering potential pitfalls with each design pattern</p></li><li><p>Vue Components Best Practices</p></li><li><p>How to debug Vue components in Nuxt using Nuxt DevTools, and more.</p></li></ul><p>The more I think about these topics, the more I can see this turning into a mini-book of its own. However, I&#8217;ll wait to see how the final version of the chapter shapes up before deciding whether to go down that route.</p><h4>Firebase Authentication as a Nuxt Layer</h4><p>I've been exploring different use cases for Nuxt Layers with the goal of reusing them across multiple Nuxt projects. Beyond the obvious UI and data layers, the authentication layer is another key area that could be reused without modification in various Nuxt projects. For authentication, there's the <strong><a href="https://github.com/atinux/nuxt-auth-utils">nuxt-auth-utils</a></strong> library created by Atinux, which works well but requires your Nuxt app to be server-rendered.</p><p>In one of my personal projects, I decided to test how Firebase performs as an authentication solution. Interestingly, it turns out that you can implement Firebase authentication with Nuxt entirely on the client-side, offering a flexible alternative to traditional server-rendered approaches.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ME3q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ME3q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png 424w, https://substackcdn.com/image/fetch/$s_!ME3q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png 848w, https://substackcdn.com/image/fetch/$s_!ME3q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png 1272w, https://substackcdn.com/image/fetch/$s_!ME3q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ME3q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png" width="1366" height="1885" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1885,&quot;width&quot;:1366,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:309910,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ME3q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png 424w, https://substackcdn.com/image/fetch/$s_!ME3q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png 848w, https://substackcdn.com/image/fetch/$s_!ME3q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png 1272w, https://substackcdn.com/image/fetch/$s_!ME3q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71202334-8e3f-4a50-93f4-30982d7f3285_1366x1885.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I&#8217;ve documented my approach in a concept diagram that illustrates the structure of the Nuxt Firebase Layer, which includes plugins, pages, composables, and components. While Nuxt Layers don&#8217;t currently support named route middleware, you can still implement inline middleware on Nuxt pages within the layer.</p><p>At the moment, I have this Firebase Auth layer set up as a local layer, so I&#8217;m unable to share it with you all just yet. My initial plan was to create a GitHub Repo layer that anyone could use. Stay tuned for future updates on this project!</p><p>If you're interested in learning more about architecting your Nuxt applications using Nuxt Layers, you might want to check out an article I wrote a while ago: "<strong><a href="https://krutiepatel.com/blog/nuxt-layers-unwrapped">Nuxt Layers Unwrapped</a></strong>."</p><h3>Author&#8217;s Corner</h3><h4>Michael Thiessen&#8217;s book </h4><p>Michael's book, "<strong><a href="https://michaelnthiessen.com/nuxt-tips-collection?aff=WjOAV">Nuxt Tips Collection</a></strong>," is packed with a treasure trove of tips and tricks that might otherwise be overlooked in the Nuxt documentation. Despite using Nuxt for over 6 years, I discovered new insights in this book that I had no idea of.</p><p>The book is an easy read, one that you can likely finish in a single sitting. However, it's also the kind of resource you'll find yourself returning to repeatedly when working on Nuxt projects, making it an invaluable companion for both new and experienced developers.</p><p><strong><a href="https://x.com/MichaelThiessen/status/1820432302842822664">In this tweeter thread</a></strong>, Michael gives a sneak peek into his book, sharing a glimpse of content you'll find in this book.</p><h4>Markus Oberlehner&#8217;s book </h4><p>Markus wrote a book on writing tests for Vue applications, and <strong><a href="https://x.com/MaOberlehner/status/1829450389076210003">in this tweet</a></strong>, he shares his journey of creating it. What I really like about his book is its focus on a single, niche topic - <em>testing</em> - allowing readers to dive deep and master one aspect thoroughly. It reminds me of a similar book written by Lachlan Miller about <strong><a href="https://lachlanmiller.gumroad.com/l/vuejs-design-patterns">a test driven approach to maintainable applications</a>.</strong> This kind of focused exploration can be super useful to truly understanding a framework.</p><p>While it's a bit late for me to shift the trajectory of my current book project, writing my Vue components guide has made me realise the value of honing in on one specific area of a framework. If you're interested, here&#8217;s the <strong><a href="https://goodvuetests.com/">link to Markus&#8217;s book</a></strong>&#8212;it&#8217;s definitely worth checking out.</p><h4>WriteBook</h4><p>The team at <strong><a href="https://37signals.com/">37Signals</a></strong> has just launched a brand new software called <strong><a href="https://once.com/writebook">WriteBook</a></strong>, designed for writing and instantly publishing your own books on the web for free, without the need for a traditional publisher.</p><p>I've been eagerly following this project through their newsletter and was excited to see it finally come to life. Despite missing the traditional book feel of AsciiDoc, WriteBook is straightforward and easy to use once you have purchased and hosted (yes, hosted as in on DigitalOcean or Hetzner) your free copy of the software.</p><div><hr></div><p>Thank you for joining me on this adventure, and I hope you find inspiration and enlightenment within these pages.</p><h4><strong>&#128640; How You Can Participate:</strong></h4><ul><li><p><strong>&#128218; Read Along:</strong> Subscribe to the newsletter to receive updates, diagrams, and behind-the-scenes content.</p></li><li><p><strong>&#129309; Community Interaction:</strong> Share topic suggestions for the book, questions, and insights here on NuxtDojo Substack.</p></li><li><p><strong>&#128640; Spread the Word:</strong> Let others know about <strong>NuxtDojo</strong> &#8211; share on social media and among your developer circles.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nc75!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" width="208" height="148.096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896211a6-f760-4b87-8118-5e851387ec1f_500x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:356,&quot;width&quot;:500,&quot;resizeWidth&quot;:208,&quot;bytes&quot;:86449,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">nuxtdojo.com</figcaption></figure></div><p>Warm regards,<br><a href="https://twitter.com/KrutiePatel">Krutie</a> @ NuxtDojo &#128640;&#128218;</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.nuxtdojo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading NuxtDojo! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[#6 Building effective landing pages with Nuxt]]></title><description><![CDATA[This edition covers creating effective landing pages and details my experience upgrading my personal website from Nuxt 2 to Nuxt 3 to enhance performance & visibility and tips on writing.]]></description><link>https://blog.nuxtdojo.com/p/6-building-effective-landing-pages</link><guid isPermaLink="false">https://blog.nuxtdojo.com/p/6-building-effective-landing-pages</guid><dc:creator><![CDATA[Krutie]]></dc:creator><pubDate>Wed, 05 Jun 2024 06:00:49 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/25ba2394-aee9-4e85-8ae2-683b948e4914_2940x1840.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#127775; Welcome to NuxtDojo Newsletter #6! &#127775;</p><p>A heartfelt thank you to everyone who joined NuxtDojo since my last newsletter! Your support is invaluable to my book-writing journey. &#128591;</p><p>It's been a while since I provided updates on my book. I've been busy writing and working on a side project that I'll share in this edition. In the Author's Corner, I've recommended a couple of great reads about writing and the use of AI in writing.</p><p>Happy reading!</p><h3>Nuxter&#8217;s Corner</h3><p>Personal blogs are the ultimate middle child of the digital world, striking that perfect balance between performant landing pages and content-heavy CMS like applications. </p><p>While designing an exploratory chapter on <strong><a href="https://medium.com/codeburst/why-nuxt-js-is-perfect-framework-for-your-landing-page-53e214649b88">Why Nuxt Js is perfect framework for your next landing page?</a> </strong>for my Nuxt book,<strong> </strong>I took a little detour. I went on a little decluttering spree on my <strong><a href="https://krutiepatel.com/">personal website</a></strong>.</p><p>It was time! Nuxt 4 is already on the horizon and my personal website has been pending an upgrade from Nuxt 2 for a while now. It felt like a big chunk of work because I was using way too many plugins and libraries. Here&#8217;s how my old website looked &#128071; before I revamped it over the past few weeks.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;9e34363d-2e6d-49be-a4c2-52864c252c42&quot;,&quot;duration&quot;:null}"></div><p>It started as an example project for my book chapter. One feature led to another, and suddenly I had a new repository for the second version of my blog.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jrVF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jrVF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png 424w, https://substackcdn.com/image/fetch/$s_!jrVF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png 848w, https://substackcdn.com/image/fetch/$s_!jrVF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png 1272w, https://substackcdn.com/image/fetch/$s_!jrVF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jrVF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png" width="1456" height="912" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:912,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1127125,&quot;alt&quot;:&quot;Upgraded blog - krutiepatel.com&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Upgraded blog - krutiepatel.com" title="Upgraded blog - krutiepatel.com" srcset="https://substackcdn.com/image/fetch/$s_!jrVF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png 424w, https://substackcdn.com/image/fetch/$s_!jrVF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png 848w, https://substackcdn.com/image/fetch/$s_!jrVF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png 1272w, https://substackcdn.com/image/fetch/$s_!jrVF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a72bb79-1f48-4797-ad75-8e8c6bdde8e1_2936x1840.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Upgraded blog - krutiepatel.com</figcaption></figure></div><p>In this article <strong><a href="https://krutiepatel.com/blog/from-nuxt-2-to-nuxt-3-enhancing-performance-and-flexibility">From Nuxt 2 to Nuxt 3: Enhancing Performance and Flexibility</a></strong> I wrote about the nitty-gritty of the little things I implemented in my blog &#128070;.</p><p>Working on this side project actually shed a lot of light on several aspects of my book chapter. Landing pages aren&#8217;t exclusive to digital products. They are essential for a wide variety of offerings. Even individuals like you and me can benefit from landing pages to effectively promote ourselves.</p><p>Although creating landing pages might seem like a smaller project compared to developing full-blown, data-heavy dynamic applications, they can actually become quite intricate as we dive deeper into their complexities. Each landing page requires meticulous attention to detail where each element is strategically designed to optimise user engagement and conversion rates. The best landing pages seamlessly integrate with the product experience that creates a cohesive user journey. </p><p>For example, think of a landing page for an online car finance application where the first step of the multi-step form is embedded directly on the homepage. In dynamic landing pages such as this, the design approach needs to maintain user identity and even authentication from the start. This effectively blurs the lines between the landing page and the application process. By doing so, it provides a smooth transition and consistent experience that enhance user engagement and reduce friction in the conversion process - which all are the key deliverables of any landing page project.</p><p>From frontend development perspective, landing page projects can be divided into 1) Interactive Elements, 2) Responsive Design, 3) Accessibility, 4) SEO Best Practices and 5) Performance Optimisation. My book will cover the first three parts into Nuxt Layers chapters, as I will use Nuxt Layers to abstract away the UI library that is reusable across multiple Nuxt projects, while the remaining two parts - SEO &amp; Performance - is what I want to cover in this chapter followed by rendering modes and deployment.</p><p>From SEO optimisation to mobile responsiveness to performance, accessibility and best practices, the creation of a landing page involves many factors proving that even the most straightforward projects like Landing Pages, can demand a significant level of expertise and creativity. That&#8217;s why I want my chapter on creating landing pages to be wholesome and packed with insights and actionable tips.</p><p>While I write my chapter, below are some SEO tips you can implement right now for your public facing Nuxt project and improve the Lighthouse score in minutes.</p><p>In Nuxt 3, <strong><a href="https://nuxt.com/docs/api/composables/use-head">useHead</a> </strong>composable allows you to manage the meta tags and attributes of your web pages dynamically. It's crucial for enhancing SEO by enabling precise control over the document head. <code>useHead</code> comes packaged with Nuxt 3. However, you can use Nuxt modules to help take your landing page to the next level.</p><p><strong><a href="https://nuxt.com/modules/nuxt-gtm">Google Analytics</a> - </strong>The Nuxt GTM module integrates Google Tag Manager into your Nuxt 3 application, enabling efficient management and deployment of Google Analytics and other marketing tags without modifying your Nuxt codebase.</p><p><strong><a href="https://image.nuxt.com/">Nuxt Image</a> - </strong>Nuxt Image optimises images for performance and SEO by providing lazy loading, responsive images, and automatic format selection. This ensures your Nuxt website loads faster and ranks better in search engine results.</p><p><strong><a href="https://nuxtseo.com/sitemap/getting-started/installation">Sitemap</a> - </strong>The Nuxt Sitemap module helps you generate a sitemap for your Nuxt 3 website, making it easier for search engines to index your pages and improving your website's SEO.</p><p><strong><a href="https://nuxt.com/modules/og-image">Open Graph Images</a> - </strong>The Nuxt OG Image module allows you to generate dynamic Open Graph images for your Nuxt 3 application, enhancing how your content appears when shared on social media platforms.</p><p><strong><a href="https://nuxtseo.com/schema-org/getting-started/installation">Structured Data</a> - </strong>The Nuxt Schema Org module helps you insert structured data into your Nuxt 3 website, improving search engine understanding and visibility of your content by providing context through schema markup.</p><p><strong><a href="https://nuxt.com/modules/robots">robots.txt</a> - </strong>The Nuxt Robots module lets you easily manage your <code>robots.txt</code> file in a Nuxt 3 application, controlling how search engines crawl and index your website.</p><p><strong><a href="https://google-fonts.nuxtjs.org/">Google Fonts</a> - </strong>The Nuxt Google Fonts module simplifies integrating Google Fonts into your Nuxt 3 project, allowing easy configuration of prefetch, pre-connect, and preload attributes to enhance performance.</p><p><strong><a href="https://nuxt.com/modules/seo">Complete Suite of SEO Modules</a> - </strong>The Nuxt SEO module bundles a comprehensive suite of SEO tools for Nuxt 3, including meta tags management, sitemaps, structured data, and more, ensuring robust SEO capabilities for your application.</p><p>Nuxt 3 modules listed above will help you optimise your website&#8217;s images and overall performance, leading to faster load times and better visibility on search engines. Modules for sitemaps, structured data, and robots.txt improve SEO by enhancing search engine indexing and making sure search engines understand your content better. Collectively, these enhancements will ensure higher Lighthouse scores in performance, SEO, and best practices as well.</p><h3> Author&#8217;s Corner</h3><p>When I sit down to write a chapter, an article or a documentation for a project, I get my best ideas for new contents and side projects! I even get more clarity to explain difficult concepts better. The article <strong><a href="https://semaphore.substack.com/p/cultures-of-writing">Cultures of writing</a></strong> captures exactly how I feel. This article explores how writing culture at workplaces can foster creativity, discipline, and high-quality output. This article outlines how New York Times, Dropbox and Anthropic uses writing to drive innovations and engagement.</p><p>I have been thinking a lot about the best way to use AI to speed up the writing process.  ChatGPT is great at aggregating information but the resulting content does not sound like me. It just doesn&#8217;t feel true to myself. The article <strong><a href="https://dev.to/zenika/future-proof-tech-blogging-understanding-ais-core-traits-3h00">"Future-proof Tech Blogging: Understanding AI's Core Traits"</a></strong> discusses the impact of AI on tech blogging and how AI should enhance rather than replace human creativity. To stay relevant, tech writers should focus on creating unique, insightful content, leveraging personal experiences, and engaging narratives. The article also highlights the importance of quality over quantity, as AI-generated content raises the bar for human writers to produce more valuable and engaging content.</p><p>Before I finish, here&#8217;s the latest Gameboy Card &#128071; from my<strong> <a href="https://codepen.io/collection/JGMNka">Tailwind UI Cards</a></strong> project. I wrote a little about this Codepen project in my <strong><a href="https://blog.nuxtdojo.com/p/5-nuxt-and-anatomy-of-loading-indicators#%C2%A7designers-corner">last newsletter</a></strong>. Check out the <strong><a href="https://codepen.io/krutie/full/ZEZayjq">Gameboy Card Codepen here</a></strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NzNM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NzNM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png 424w, https://substackcdn.com/image/fetch/$s_!NzNM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png 848w, https://substackcdn.com/image/fetch/$s_!NzNM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png 1272w, https://substackcdn.com/image/fetch/$s_!NzNM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NzNM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png" width="568" height="430.68131868131866" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1104,&quot;width&quot;:1456,&quot;resizeWidth&quot;:568,&quot;bytes&quot;:231385,&quot;alt&quot;:&quot;Gameboy Card&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Gameboy Card" title="Gameboy Card" srcset="https://substackcdn.com/image/fetch/$s_!NzNM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png 424w, https://substackcdn.com/image/fetch/$s_!NzNM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png 848w, https://substackcdn.com/image/fetch/$s_!NzNM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png 1272w, https://substackcdn.com/image/fetch/$s_!NzNM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb99ecaa-de1f-4673-ba32-1377b3acd778_2012x1526.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Gameboy Card</figcaption></figure></div><div><hr></div><p>Thank you for joining me on this adventure, and I hope you find inspiration and enlightenment within these pages.</p><h4><strong>&#128640; How You Can Participate:</strong></h4><ul><li><p><strong>&#128218; Read Along:</strong> Subscribe to the newsletter to receive updates, diagrams, and behind-the-scenes content.</p></li><li><p><strong>&#129309; Community Interaction:</strong> Share topic suggestions for the book, questions, and insights here on NuxtDojo Substack.</p></li><li><p><strong>&#128640; Spread the Word:</strong> Let others know about <strong>NuxtDojo</strong> &#8211; share on social media and among your developer circles.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nc75!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" width="208" height="148.096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896211a6-f760-4b87-8118-5e851387ec1f_500x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:356,&quot;width&quot;:500,&quot;resizeWidth&quot;:208,&quot;bytes&quot;:86449,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">nuxtdojo.com</figcaption></figure></div><p>Warm regards,<br><a href="https://twitter.com/KrutiePatel">Krutie</a> @ NuxtDojo &#128640;&#128218;</p>]]></content:encoded></item><item><title><![CDATA[#5 Nuxt and Anatomy of Loading Indicators]]></title><description><![CDATA[Check out what Nuxt has up its sleeve for loading indicators over at Nuxter's corner. Plus, make sure you catch the special Designer's corner I'm introducing for the very first time in this edition.]]></description><link>https://blog.nuxtdojo.com/p/5-nuxt-and-anatomy-of-loading-indicators</link><guid isPermaLink="false">https://blog.nuxtdojo.com/p/5-nuxt-and-anatomy-of-loading-indicators</guid><pubDate>Tue, 26 Mar 2024 08:00:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#127775; Welcome to NuxtDojo Newsletter #5! &#127775;</p><p>In our last newsletter, we looked at <a href="https://blog.nuxtdojo.com/p/4-nuxt-routes-rundown">Nuxt Routes</a>. We wrapped up with a sneak peek at all those cool built-in components provided by Nuxt.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aqBQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aqBQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg 424w, https://substackcdn.com/image/fetch/$s_!aqBQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg 848w, https://substackcdn.com/image/fetch/$s_!aqBQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!aqBQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aqBQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg" width="1456" height="1218" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1218,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:530256,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aqBQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg 424w, https://substackcdn.com/image/fetch/$s_!aqBQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg 848w, https://substackcdn.com/image/fetch/$s_!aqBQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!aqBQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d3ddfc0-f2f2-4e2c-926a-a0b2cbdfb679_2479x2074.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>&lt;NuxtLoadingIndicator/&gt;</em> is one the built-in component provided by Nuxt. So, in our Nuxt Fundamentals segment today, we're diving into the basics of Loading Indicators, exploring their design principles, and showing you how to build a custom one for your Nuxt project.</p><p>Happy reading!</p><h3>Nuxter&#8217;s Corner</h3><p>Let&#8217;s set Nuxt aside for a moment, zoom out and look at <em>Loading Indicators</em> from a broader frontend perspective. Loading indicators serve as a bridge of communication between the application and its users during times of waiting, be it for data to load, content to be fetched, or transactions to be processed. Their presence, or lack thereof, can drastically affect the user experience, potentially turning moments of waiting into a frustrating pause of inactivity.</p><p>Check out the diagram below. It shows you all the different loading indicators you can use in your web application, when to use them, and high-level implementation details to make them tick.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Uz3n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Uz3n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Uz3n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Uz3n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Uz3n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Uz3n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg" width="598" height="569.5022692889561" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1259,&quot;width&quot;:1322,&quot;resizeWidth&quot;:598,&quot;bytes&quot;:210248,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Uz3n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Uz3n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Uz3n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Uz3n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a2c556-fc29-4e87-979b-b28638b1a499_1322x1259.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Loading indicators come in various forms, each suited to different scenarios and user expectations. From the classic spinner that symbolises ongoing activity to progress bars that provide a visual cue of how much work has been completed. These indicators show how careful design meets with focusing on the user's needs.</p><ul><li><p><strong>Spinner:</strong> It's best used in scenarios where the wait time is unpredictable or relatively short. The spinner, often represented as a circular animation that rotates infinitely, is the quintessential symbol of something "in the process."</p></li><li><p><strong>Progress Bar:</strong> They are most effective when the system can predict the time to completion with reasonable accuracy. Progress bars are linear indicators that fill up as a task progresses.</p></li><li><p><strong>Skeleton Component:</strong> Instead of showing a blank screen or a loading sign, skeleton screens give a preview of what's to come, which can psychologically make the wait feel shorter because users see evidence of work being done. Skeleton Components are a relatively modern approach compared to the spinner and progress bar. Skeleton components are placeholders that outline the basic structure of your content before it loads.</p></li><li><p><strong>Custom Animations:</strong> These are particularly effective for branding purposes, creating a memorable experience even in the wait times. Custom animations are unique, brand-specific loading indicators that can range from simple geometric transformations to complex scenes or characters that tell a story.</p></li></ul><p>Each type of loading indicator serves a specific purpose and can influence the user experience in different ways. The choice of indicator should be driven by the: </p><ul><li><p>context of the wait time, </p></li><li><p>expected duration, and</p></li><li><p>overall design language of the application.</p></li></ul><p>Returning our focus back to Nuxt, the framework offers a variety of methods to manage loading indicators, enriching the user experience during navigation and data retrieval. </p><p>For instance, when transitioning between pages, the <em>&lt;NuxtLoadingIndicator /&gt;</em> component comes into play that elegantly renders a progress bar and visually informs the user of the ongoing process. </p><p><em>&lt;NuxtLoadingIndicator /&gt;</em>  falls into the Progress Bar category of the loading indicator, since it predicts the estimated time to load the content of the page. </p><p>This component can be customised by overriding color, height, duration and throttle values. You can also provide custom calculation for how <em>estimatedProgress</em> is calculated. However, this is the extent of customisation you can perform on this built-in component. </p><p>Digging deeper into the implementation of <em>&lt;NuxtLoadingIndicator /&gt; </em>component, we can see that it uses <em>useLoadingIndicator</em> composable under the hood. <em>useLoadingIndicator </em>uses <em>page:loading:start</em> and <em>page:loading:end</em> hooks to update its state. </p><p><em>useLoadingIndicator</em> composable accepts <em>duration</em>, <em>throttle</em> and <em>estimatedProgress </em>as props. You can calculate <em><a href="https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/components/nuxt-loading-indicator.ts">estimatedProgress</a></em> using a similar calculation used in <em>&lt;NuxtLoadingIndicator /&gt;</em> component. In return, <em>useLoadingIndicator</em> provides us with:</p><ul><li><p>two variables: <em>progress</em>, <em>isLoading</em> and </p></li><li><p>three methods: start(), finish() and clear().</p></li></ul><pre><code>const { <strong>progress, isLoading, start, finish, clear</strong> } = <strong>useLoadingIndicator</strong>({
   duration: props.duration,
   throttle: props.throttle,
   estimatedProgress: props.estimatedProgress
})</code></pre><p><em>progress</em> and <em>isLoading</em> variables are sufficient to create a custom loading indicator. You can show/hide your custom loading component using <em>isLoading </em>variable, and animate your HTML or SVG element using the <em>progress</em> value which changes from 0 to 100.</p><p><em>start()</em> and <em>finish()</em> methods come in handy while designing and developing a custom loading component, as they let you start and finish the transition respectively, on demand with a click of a button. You can review a quick example of a custom <a href="https://stackblitz.com/edit/nuxt-starter-xvskn3?file=components%2FCustomLoader.vue">loader example here on Stackblitz</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iA7b!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iA7b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png 424w, https://substackcdn.com/image/fetch/$s_!iA7b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png 848w, https://substackcdn.com/image/fetch/$s_!iA7b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png 1272w, https://substackcdn.com/image/fetch/$s_!iA7b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iA7b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png" width="1456" height="760" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:760,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:308226,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iA7b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png 424w, https://substackcdn.com/image/fetch/$s_!iA7b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png 848w, https://substackcdn.com/image/fetch/$s_!iA7b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png 1272w, https://substackcdn.com/image/fetch/$s_!iA7b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9234fbfc-94b1-4dc0-805b-bb05e729bff6_2268x1184.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://stackblitz.com/edit/nuxt-starter-xvskn3?file=components%2FCustomLoader.vue">Custom Loading Indicator Example</a></figcaption></figure></div><p>Break down this tiny example and you will see that we are using,</p><ul><li><p><em>&lt;NuxtLink&gt;</em> component to switch between pages</p></li><li><p><em>&lt;NuxtPage&gt;</em> component to display page content</p></li><li><p><em>useLoadingIndicator</em> composable to create custom loader</p></li><li><p>CSS transition to apply app wide page transition</p></li><li><p><em>&lt;Transition&gt;</em> component (from Vue) to add fade effect</p></li></ul><p>Moreover, Nuxt extends its functionality to data fetching scenarios, including asynchronous operations, by returning a <em>pending</em> variable when you use <em><a href="https://nuxt.com/docs/api/composables/use-fetch">useFetch</a></em> or <em><a href="https://nuxt.com/docs/api/composables/use-async-data">useAsyncData</a></em> composable.</p><pre><code>const { data, <strong>pending</strong>, error, refresh } = await <strong>useFetch</strong>('/api/modules')</code></pre><pre><code>const { data, <strong>pending</strong>, error, refresh } = await <strong>useAsyncData</strong>(
  'mountains',
  () =&gt; $fetch('https://api.nuxtjs.dev/mountains')
)</code></pre><p>In the template section of your page or Vue component, you can check the value of the <em>pending</em> variable and render the skeleton component while the data is being loaded. If you are familiar with <a href="https://ui.nuxt.com/">Nuxt UI</a>, you can check out the <em><a href="https://ui.nuxt.com/components/skeleton">&lt;USkeleton&gt;</a></em><a href="https://ui.nuxt.com/components/skeleton"> component</a> which lets you show a placeholder skeleton while content is loading.</p><p>This versatile utility enables Nuxt developers to either display a spinner or a skeleton component, and help maintain a smooth and informative interaction as data loads.</p><p>Creating effective loading indicators involves more than just choosing between a spinner or a progress bar. We should be mindful of basic design principles while incorporating loading indicators in our web applications, such as:</p><p><strong>Visibility:</strong> Loading indicators must be clearly visible without overwhelming the user interface.</p><p><strong>Informative:</strong> An effective loading indicator provides users with information about what is happening behind the scenes. Whenever possible, it should offer more than just an indication that something is loading; it should convey progress or estimated wait times. </p><p><strong>Minimalism:</strong> Loading indicators should not distract users from their primary objectives or clutter the interface. The design should be simple and clean that integrates seamlessly with the overall design language of the application.</p><p><strong>Branding:</strong> Loading indicators offer a unique opportunity to reinforce brand identity, even in moments of waiting. Custom animations or brand-specific designs can turn a generic wait time into a branded experience. However, this should be balanced with the principles of visibility and minimalism to ensure that the branding effort does not compromise the indicator's functionality or the user experience.</p><div><hr></div><p>I'm really putting in the work to push these contents past the usual tutorials, aiming for something that reads more like a deep-dive chapter. The goal? To boost your know-how in a way that goes beyond just frameworks. Master one, and you'll have the skills to tackle any of them.</p><p>Keeping that in mind, it's not just about the basics and design principles. I'm also keen on weaving in some best practices and a guide to making your loading indicators not only responsive but accessible too, for all kinds of web apps. </p><p>If the roadmap of my Nuxt book appeals to you and you're keen on the direction it's heading, I'd love to invite you to subscribe to the NuxtDojo newsletter. By subscribing, you'll gain access to exclusive updates about the progress of my book, as well as the opportunity to be among the first to receive the early release of each chapter.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.nuxtdojo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.nuxtdojo.com/subscribe?"><span>Subscribe now</span></a></p><h3>Designer&#8217;s Corner</h3><p>What's your go-to move when work starts to feel like a bit of a drag and you're itching for a breather to reset your brain?</p><p>For me, when the whole Vue and React scene starts to get a bit too much, I like to kick it old school with some HTML and CSS. It's kind of like my chill pill. It does wonders for me, and by the time I circle back to the heavy stuff, I'm all refreshed and pumped to dive back in.</p><div class="image-gallery-embed" data-attrs="{&quot;gallery&quot;:{&quot;images&quot;:[{&quot;type&quot;:&quot;image/png&quot;,&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fc60363a-1e04-4486-83f5-6c14e543cf44_1998x1628.png&quot;},{&quot;type&quot;:&quot;image/png&quot;,&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/933349a9-162b-4944-96a1-bdb17368e797_1858x1628.png&quot;}],&quot;caption&quot;:&quot;Tailwind CSS UI Cards Collection on Codepen&quot;,&quot;alt&quot;:&quot;Tailwind CSS UI Cards Collection on Codepen&quot;,&quot;staticGalleryImage&quot;:{&quot;type&quot;:&quot;image/png&quot;,&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71338b3c-c6e4-49d7-ac5d-7b8b69be6a56_1456x720.png&quot;}},&quot;isEditorNode&quot;:true}"></div><p>Alright, let me fill you in on this <a href="https://codepen.io/collection/JGMNka">little project</a> I've got going on Codepen, kind of a side-side hustle of mine. I've been keeping it super simple, sticking to just plain HTML and spicing things up with Tailwind CSS. It's my little sandbox where I get to play around, experiment, and just have some fun away from all the serious stuff.</p><p>I've got this plan to keep up with this small yet fulfilling routine: crafting cards on the side as I work on writing my Nuxt book. I'm curious to see how these two projects can inspire and energise each other. They could serve as practical examples or visual aids when I'm explaining concepts in the book. It's like having two creative paths that, while distinct, complement each other beautifully, making the journey of writing the book not just more informative but also more engaging.</p><div><hr></div><p>Thank you for reading this far! I really hope you&#8217;ve found some inspiration and enlightenment within these pages.</p><h4><strong>&#128640; How You Can Participate:</strong></h4><ul><li><p><strong>&#128218; Read Along:</strong> Subscribe to the newsletter to receive updates, diagrams, and behind-the-scenes content.</p></li><li><p><strong>&#129309; Community Interaction:</strong> Share topic suggestions for the book, questions, and insights here on NuxtDojo Substack.</p></li><li><p><strong>&#128640; Spread the Word:</strong> Let others know about <strong>NuxtDojo</strong> &#8211; share on social media and among your developer circles.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nc75!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" width="208" height="148.096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896211a6-f760-4b87-8118-5e851387ec1f_500x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:356,&quot;width&quot;:500,&quot;resizeWidth&quot;:208,&quot;bytes&quot;:86449,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">nuxtdojo.com</figcaption></figure></div><p>Warm regards,<br><a href="https://twitter.com/KrutiePatel">Krutie</a> @ NuxtDojo &#128640;&#128218;</p>]]></content:encoded></item><item><title><![CDATA[#4 Nuxt Routes Rundown]]></title><description><![CDATA[Chapter notes on Nuxt Routes and surrounding features]]></description><link>https://blog.nuxtdojo.com/p/4-nuxt-routes-rundown</link><guid isPermaLink="false">https://blog.nuxtdojo.com/p/4-nuxt-routes-rundown</guid><dc:creator><![CDATA[Krutie]]></dc:creator><pubDate>Thu, 07 Mar 2024 17:21:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!aQBm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#127775; Welcome to NuxtDojo Newsletter #4! &#127775;</p><p>Nuxt Routes may initially appear straightforward&#8212;simply create Vue files in the <em>~/pages</em> directory, and the file-based routing system will automatically generate pages. However, as you delve deeper into the subject, Nuxt Routes becomes a more intricate and interesting topic to learn!</p><p>Let's dive into Nuxt Routes at Nuxter's Corner and take a brief look at my Lucidchart Dashboard over at the Author's Corner.</p><p>Happy reading!</p><h3>Nuxter&#8217;s Corner</h3><p>The Nuxt Routes chapter will be included in the <em>Nuxt Fundamentals</em> part of the book. Understanding the types of routes will help you organise your Nuxt 3 application effectively and handle various URL patterns efficiently. </p><p>Let's break down the different types of routes in Nuxt 3:</p><ol><li><p><strong>Index Route: </strong>Index route is represented by the <em>index.vue</em> file in the root of the ~/pages directory. </p></li><li><p><strong>Static Routes: </strong>Static routes are straightforward routes that map directly to a single file. They are ideal for pages that don't need to fetch any data from an API or database.</p></li><li><p><strong>Dynamic Routes: </strong>Dynamic routes allow you to match dynamic segments in the URL and pass them as parameters to your page components. They are defined in the file name with a pair of square brackets and name of the parameter, i.e. <em>[slug].vue</em></p></li><li><p><strong>Catch-all Routes: </strong>Catch-all routes are used to match any URL that hasn't been matched by other routes. They are defined by using three dots in the file name enclosed within a pair of square brackets, i.e. <em>[&#8230;slug].vue</em></p></li><li><p><strong>Nested Routes: </strong>Nested routes allow you to create a hierarchy of routes by organising them into nested directories. In Nuxt, parent-child relationship between routes is indicated by a file and directory with the same name.</p></li></ol><p>Nuxt 3 introduces a new feature that allows for a flexible mix of rendering methods across individual pages. This is made possible through the implementation of Route Rules, which can be specified within the Nuxt configuration settings. </p><p>Essentially, this feature grants developers the flexibility to define how each page should be rendered, whether it be server-side, statically, or via client-side rendering, on a case-by-case basis. The addition of Route Rules enhances the control over the rendering process, enabling a tailored approach to how content is delivered and displayed based on the specific needs of each page. </p><p>The diagram provided below offers a high-level overview of the available route types and the new route rules, illustrating how they interact and how they can be applied within a Nuxt 3 application to optimise performance and user experience.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aQBm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aQBm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg 424w, https://substackcdn.com/image/fetch/$s_!aQBm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg 848w, https://substackcdn.com/image/fetch/$s_!aQBm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!aQBm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aQBm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg" width="1456" height="1426" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1426,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:500056,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aQBm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg 424w, https://substackcdn.com/image/fetch/$s_!aQBm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg 848w, https://substackcdn.com/image/fetch/$s_!aQBm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!aQBm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdd02afc-d89e-4b97-a420-00b97e21e715_2479x2428.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Types of Routes and Route Rules in Nuxt 3</figcaption></figure></div><p>Route middleware in Nuxt is a powerful feature that allows you to execute code before rendering a page or a group of pages (routes). This functionality is tightly integrated with Nuxt's routing system, providing a mechanism to perform tasks such as authentication checks, data prefetching, or conditionally redirecting users based on specific criteria before a route is fully resolved and its components are rendered. Middleware can be applied globally or to individual pages.</p><p>Nuxt provides a built-in collection of utility functions to be used with route middleware. These utilities are part of Nuxt's rich ecosystem, designed to simplify tasks, including navigation, manipulating layouts or even setting route middleware at build-time and more.</p><p>The diagram below illustrates some of the key utility functions provided by Nuxt that are particularly useful when working with route middleware along with where to use them and when (runtime or build-time) to use them.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BxTj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BxTj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BxTj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BxTj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BxTj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BxTj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg" width="1456" height="1651" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1651,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:662530,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BxTj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BxTj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BxTj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BxTj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a341b9-0a60-4796-ad6b-ed3c46c4bb21_2479x2811.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Route Middleware and related concepts in Nuxt 3</figcaption></figure></div><p>And lastly, Nuxt 3 also comes equipped with a collection of essential Vue components that are available for immediate use right from the start. These components are automatically imported and ready to use on Nuxt pages.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jTxr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jTxr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jTxr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jTxr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jTxr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jTxr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg" width="1456" height="1218" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1218,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:530256,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jTxr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jTxr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jTxr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jTxr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff66ed7f9-7363-431f-90f5-b0a0ddd75bea_2479x2074.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Built-in components provided by Nuxt</figcaption></figure></div><p>In considering the content for my book, I am planning to use examples from e-commerce platforms or headless Content Management Systems (CMS) to explain the variety of route types and help you think in terms of Nuxt routes and surrounding features. These examples are well-suited for such a demonstration because they leverage the full spectrum of routing and rendering techniques available. E-commerce sites and headless CMS platforms often require a dynamic mix of server-side, client-side, and static rendering methods to efficiently handle the diverse needs of their web pages.</p><p>E-commerce platforms, for example, utilise server-side rendering for product pages to ensure SEO effectiveness and client-side rendering for user dashboards for a more interactive experience. Static rendering might be used for help pages or blog posts that do not often change. Similarly, headless CMS platforms need to serve content-rich pages that are SEO friendly, while also managing dynamic user interactions that benefit from client-side rendering.</p><p>Secondly, these platforms often require sophisticated access control mechanisms to differentiate between various user roles&#8212;be it customers, content editors, or administrators. Route middleware becomes a critical tool in managing these distinctions, ensuring that users only access the content and functionalities relevant and permitted to their roles. This middleware can help us enforce authentication, authorise specific actions, and redirect users based on their login status or permissions, which shows the necessity of middleware in routing and power of Nuxt 3 in handling complex web development scenarios.</p><p>By using these examples, I aim to provide a practical context that illustrates how different types of routes can be used to address specific requirements of web applications. This way, I hope my chapter will look less like documentation and more relatable to real-world scenarios.</p><h3>Author&#8217;s Corner</h3><p>Concept diagrams are visual treats among technicalities - your reference points or gateway to more abstract technical concepts that might be difficult to convey with text alone. Ultimate goal of diagrams in my Nuxt book will be to facilitate deeper understanding of the Nuxt framework.</p><p>If you have been following my work for a while now, then you&#8217;d know that these diagrams can play a crucial role in breaking down complex concepts, making them more accessible and easier to understand for readers. Making these diagrams has become a major part of creating this Nuxt book. For those who don&#8217;t know, I use <a href="https://www.lucidchart.com/pages/">Lucidchart</a> to make these diagrams. Here&#8217;s a little sneak peek of my Lucidchart dashboard.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4011!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4011!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png 424w, https://substackcdn.com/image/fetch/$s_!4011!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png 848w, https://substackcdn.com/image/fetch/$s_!4011!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png 1272w, https://substackcdn.com/image/fetch/$s_!4011!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4011!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png" width="1456" height="702" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:702,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:778766,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4011!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png 424w, https://substackcdn.com/image/fetch/$s_!4011!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png 848w, https://substackcdn.com/image/fetch/$s_!4011!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png 1272w, https://substackcdn.com/image/fetch/$s_!4011!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20cd60c-a469-480e-9950-f6f174313b11_2681x1293.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Lucidchart Dashboard</figcaption></figure></div><p>I hope to incorporate engaging and aesthetically pleasing diagrams throughout the book to make the technical journey through Nuxt much more enjoyable and effective.</p><p>You can find more Nuxt diagrams like these on <a href="https://krutiepatel.com/diagrams">my website</a>, and if you're interested in making diagrams like these on your own, take a look at the resources I've written on Medium:</p><ul><li><p><strong>How to Create Technical Conceptual Diagrams</strong> - <a href="https://betterprogramming.pub/how-to-create-technical-conceptual-diagrams-16f4982f4567">Read on Medium</a></p></li><li><p><strong>Conceptual Technical Diagrams: How to Think in Terms of Shapes, Icons, and Legend</strong> - <a href="https://betterprogramming.pub/how-to-think-in-terms-of-shapes-icons-and-legend-ecd63794e8b0">Read on Medium</a></p></li></ul><div><hr></div><p>Thank you for joining me on this adventure, and I hope you find inspiration and enlightenment within these pages.</p><h4><strong>&#128640; How You Can Participate:</strong></h4><ul><li><p><strong>&#128218; Read Along:</strong> Subscribe to the newsletter to receive updates, diagrams, and behind-the-scenes content.</p></li><li><p><strong>&#129309; Community Interaction:</strong> Share topic suggestions for the book, questions, and insights here on NuxtDojo Substack.</p></li><li><p><strong>&#128640; Spread the Word:</strong> Let others know about <strong>NuxtDojo</strong> &#8211; share on social media and among your developer circles.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nc75!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" width="208" height="148.096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896211a6-f760-4b87-8118-5e851387ec1f_500x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:356,&quot;width&quot;:500,&quot;resizeWidth&quot;:208,&quot;bytes&quot;:86449,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">nuxtdojo.com</figcaption></figure></div><p>Warm regards,<br><a href="https://twitter.com/KrutiePatel">Krutie</a> @ NuxtDojo &#128640;&#128218;</p>]]></content:encoded></item><item><title><![CDATA[#3 Error Handling in Nuxt]]></title><description><![CDATA[My thoughts on the Error Handling chapter of my Nuxt book and forming book parts using AsciiDoc.]]></description><link>https://blog.nuxtdojo.com/p/3-error-handling-in-nuxt</link><guid isPermaLink="false">https://blog.nuxtdojo.com/p/3-error-handling-in-nuxt</guid><dc:creator><![CDATA[Krutie]]></dc:creator><pubDate>Sat, 24 Feb 2024 06:01:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lty4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#127775; Welcome to NuxtDojo! &#127775;</p><p>In this edition, I want to share some ideas I have on the Error Handling chapter of my book. In the ever-evolving landscape of SSR frameworks like Nuxt, error handling transcends the basic six types provided by JavaScript, extending them further so that they align with the unique needs and philosophies of the Nuxt framework.</p><p>In the Author's corner, I'll share insights on leveraging Asciidoctor&#8212;a powerful tool for organising and structuring long-form content&#8212;to divide the book into cohesive parts, each housing chapters thoughtfully grouped together to provide a seamless and comprehensive learning experience.</p><p>Happy reading!</p><h3>Nuxter&#8217;s Corner</h3><p>The Error Handling chapter will be included in the <em>Nuxt Fundamentals</em> part of the book. Given the full-stack nature of Nuxt, this topic will flow from server-side errors to client-side errors. Nuxt provides powerful utilities to tackle an array of potential errors from HTTP errors (4xx, 5xx), data fetching errors, authentication errors to server-side errors originating from the Nitro server.</p><p>At the center of Error Handling in Nuxt, we have in-built <em>createError</em> and <em>showError</em> utilities that work on both client-side and server-side. </p><p>Basic idea is that we show or create errors using these utilities, then we either redirect users on full-screen, custom error page or display specific error information on the same page while providing a call-to-action for users to recover from the error. We can also catch these errors in either server-side or client-side <em>hooks</em> available to us in Nuxt and further report them in Error Reporting &amp; Monitoring tools.</p><p>I have prepared this initial diagram to capture the error handling landscape in Nuxt. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lty4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lty4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lty4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lty4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lty4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lty4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg" width="1456" height="2107" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2107,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:185509,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lty4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lty4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lty4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lty4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9411a335-e12e-4373-a264-c128ac37ff28_1520x2200.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Error Handling in Nuxt 3</figcaption></figure></div><h4>Custom Error Page</h4><p>Both <em>createError</em> and <em>showError</em> helps us return appropriate error responses to clients, including status codes, error messages, and error payloads.</p><p>When we throw an error using <em>createError</em> or <em>showError</em> utilities, we can send users on a custom, generic error page. And when Nuxt redirect users on a custom error page, we can use <em>useError</em> composable to flesh out error details on <em>~/error.vue</em>. </p><p>And finally, we can use <em>clearError</em> utility to get the user unstuck from the error page and redirect them on a working page, for example a home page, i.e. <em>clearError({ redirect: '/homepage' })</em></p><h4>Error Handling on Server-side</h4><p>We can throw Nitro server-side errors using the same <em>createError</em> utility that we can use on the client-side as well, and display the custom error page. On server-side, by default, <em>createError</em> redirects users to the custom error page - while on client-side, <em>createError </em>provides a bit more, fine-grained control over whether to redirect or not.</p><pre><code>// server/route/test.ts

export default eventHandler((event) =&gt; {

  const id = getRouterParam(event, 'id')  
  if (!id)
    throw createError({ message: 'Invalid id', statusCode: 422 })
})</code></pre><h4>Error Handling on Client-side</h4><p>There&#8217;ll be use cases when we do not want to redirect users over to a generic error page, and rather show them specific error messages on the client-side itself. That&#8217;s when we can leverage the in-built component <em>&lt;NuxtErrorBoundary&gt;</em> provided by Nuxt. </p><p><em>&lt;NuxtErrorBoundary&gt;</em> component emits <em>@error</em> event for us to handle if needed, and also provides <em>#error</em> slot to access error details that we can use within the <em>&lt;NuxtErrorBoundary&gt;</em> component.</p><pre><code>//~/pages/topics.vue 
//parent page catches errors from child-routes: ~/pages/topics/index.vue

&lt;template&gt;

  &lt;NuxtErrorBoundary @error="logError"&gt;

    &lt;template #error="{ error, clearError }"&gt;
      You can display the error locally here: {{ error }}
      &lt;button @click="clearError"&gt;
        This will clear the error.
      &lt;/button&gt;
    &lt;/template&gt;

    &lt;NuxtPage /&gt;

  &lt;/NuxtErrorBoundary&gt;
&lt;/template&gt;</code></pre><p>In cases where we do want the redirection to happen even on the client-side, we can pass the <em>fatal: true</em> option while creating error and <em>createError </em>will behave exactly the same way as it does on the server-side. We do not need to use <em>&lt;NuxtErrorBoundary&gt; </em>in that case.</p><h4>Data Fetching and Error Handling</h4><p>Nuxt doesn&#8217;t have any hooks to catch errors while using <em>useFetch</em> or <em>useAsyncData </em>to fetch data. However, both of these composable returns <em>{ error }</em> ref that we can check to see if an error has occurred. </p><p>In case the <em>error</em> ref comes truthy, we can fall back to <em>showError</em> or <em>createError</em> utilities to handle data fetching errors.</p><pre><code>// ~/pages/items.vue

const { error } = await useAsyncData('home', () =&gt; queryContent('/items').findOne())

if (error) {
  throw createError({
     statusCode: 404,
     message: 'Content not found',
     fatal: true
  })
}</code></pre><h4>Error Handling in Route Middleware</h4><p>Apart from above options, there is a slightly less known option to catch errors using <em>abortNavigation(err) </em>utility function. </p><p>This option works exclusively within Route Middleware. </p><p>When <em>abortNavigation</em> is used with an error string passed into it, it redirects users to the error page on every http request made to that page where this route-middleware is applied. </p><p><em>abortNavigation</em> utility uses <em>createError</em> under the hood. This would mean that if needed, we can use <em>createError</em> or <em>showError</em> utility directly inside route middleware as well.</p><pre><code>// ~/middleware/test.ts

export default defineNuxtRouteMiddleware((to, from) =&gt; {
  // ...
  
  if (!user.value.isAuthorized) {
    return abortNavigation('Insufficient permissions.')
  }
})</code></pre><p>This was a high-level, broad outlook of error handling in Nuxt. In the book however, I see a bigger scope for this chapter and I am hoping to include:</p><ul><li><p>the importance of logging and monitoring in error handling,</p></li><li><p>best practices for error logging and tracking client-side errors for debugging purposes,</p></li><li><p>the significance of testing error scenarios to ensure robust error handling,</p></li><li><p>strategies for writing unit tests, integration tests, and end-to-end tests to cover error cases,</p></li><li><p>best practices and recommendations for effective error handling in full-stack applications and</p></li><li><p>real-life examples and/or case-studies to illustrate concepts and techniques discussed in the chapter.</p></li></ul><p>If the outline of this chapter has piqued your interest and left you eager for more, I invite you to subscribe to NuxtDojo newsletter. By subscribing, you'll gain access to exclusive updates about the progress of my book, as well as the opportunity to be among the first to receive the early release of each chapter.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.nuxtdojo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.nuxtdojo.com/subscribe?"><span>Subscribe now</span></a></p><h3>Author&#8217;s Corner</h3><p>In the Author&#8217;s corner, we will see how to divide a book into parts. There are three steps to divide your book into parts using Asciidoctor. Make sure your <em>.adoc</em> document:</p><ol><li><p>is set to <em>:doctype: book</em>,</p></li><li><p>has at at least one section with Heading 1</p></li><li><p>has a theme applied to it.</p></li></ol><h4>Content Structure</h4><p>A part is designated by a level 0 section title indicated by single equal sign =, equivalent of Heading 1 in Markdown. Chapter title comes second in a hierarchy that is indicated by double equal sign ==. Asciidoctor will use this exact hierarchy to generate the table of content.</p><pre><code>// index.adoc

= Nuxt Fundamentals

== Error Handling in Nuxt

image::images/error-handling-in-nuxt-v2.jpeg[]</code></pre><h4>Heading Font Style</h4><p>Create a new <em>.yml</em> file in the theme folder, <em>book-theme.yml</em> where we will define the theme for our book.</p><p>Under the <em>heading</em>, we add h1 style that is applied to the Part headings, while the h2 styling is applied to the chapter headings.  </p><pre><code>// theme/book-theme.yml

heading:
  h1:
    align: center
    padding: [4in, 0, 2in, 0]
    font-size: 40
    font-color: #05995d
    font-weight: bold
    top: 45%
  h2:
    font-size: 28
    padding: [0.25in, 0, 0.5in, 0]
    font-color: #18171c</code></pre><h4>Base Paragraph and Page Style</h4><p>We can assign margins for all the pages and paragraphs, as well as base font attributes for overall book fonts - excluding heading fonts. </p><pre><code><code>// theme/book-theme.yml

prose_margin_top: 0
prose_margin_bottom: 14
page:
  margin: [1in, 1in, 1in, 1in]
base:
  font-size: 15
  font-color: #18171C
  font-style: normal
  line_height: 1.25</code></code></pre><h4>Title Page</h4><p>In the same theme file, we can add <em>title_page</em> styling to format the second page of the book after the front cover page.</p><pre><code><code>// theme/book-theme.yml

title_page:
  align: center
  title:
    font-size: 40
    font-color: #18171C
    font-style: black
    line_height: 1.5
    top: 45%</code></code></pre><h4>Update Book Settings</h4><p>Since <em>Parts</em> can only be used when the document type is a book, make sure <em>:doctype: book</em> is set along with <em>:sectnums:</em> and <em>:partnums:</em>, so that Asciidoctor can automatically number the parts and chapters in our book. </p><p>Make sure to use :toc: key here to help Asciidoctor generate the table of content at the beginning of the book.</p><p>In case, you want to call book parts something else other than <em>Part</em>, you can use <em>:part-signifier:</em> key.</p><pre><code><code>// index.adoc

= Nuxt Your Everyday Vue.js
Krutie Patel &lt;doc@example.com&gt;
:toc:
:description: Book description goes Here
:doctype: book
:front-cover-image: image:images/isometric-nuxt-101.jpg[fit=fill]
:sectnums:
:partnums:
// :part-signifier: Module</code></code></pre><p>We have a basic theme file ready. Now finally, update your script to accept this theme file path - <em>theme/book-theme.yml</em> and run <em>yarn pdf</em> to generate the PDF file of your book.</p><pre><code>{
  "name": "asciidoc-test",
  "version": "0.0.1",
  "main": "index.adoc",
  "scripts": {
    <strong>"pdf": "asciidoctor-pdf -a pdf-theme=book -a pdf-themesdir=theme/ index.adoc"</strong>
  }
}</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RKIw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RKIw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png 424w, https://substackcdn.com/image/fetch/$s_!RKIw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png 848w, https://substackcdn.com/image/fetch/$s_!RKIw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png 1272w, https://substackcdn.com/image/fetch/$s_!RKIw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RKIw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png" width="1456" height="1079" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1079,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:626127,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RKIw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png 424w, https://substackcdn.com/image/fetch/$s_!RKIw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png 848w, https://substackcdn.com/image/fetch/$s_!RKIw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png 1272w, https://substackcdn.com/image/fetch/$s_!RKIw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe502b35c-25d9-47d3-9486-f16bd67c6768_2340x1734.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">PDF file generated using Asciidoctor</figcaption></figure></div><div><hr></div><p>Thank you for joining me on this adventure, and I hope you find inspiration and enlightenment within these pages.</p><h4><strong>&#128640; How You Can Participate:</strong></h4><ul><li><p><strong>&#128218; Read Along:</strong> Subscribe to the newsletter to receive updates, diagrams, and behind-the-scenes content.</p></li><li><p><strong>&#129309; Community Interaction:</strong> Share topic suggestions for the book, questions, and insights here on NuxtDojo Substack.</p></li><li><p><strong>&#128640; Spread the Word:</strong> Let others know about <strong>NuxtDojo</strong> &#8211; share on social media and among your developer circles.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nc75!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" width="208" height="148.096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896211a6-f760-4b87-8118-5e851387ec1f_500x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:356,&quot;width&quot;:500,&quot;resizeWidth&quot;:208,&quot;bytes&quot;:86449,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">nuxtdojo.com</figcaption></figure></div><p>Warm regards,<br><a href="https://twitter.com/KrutiePatel">Krutie</a> @ NuxtDojo &#128640;&#128218;</p>]]></content:encoded></item><item><title><![CDATA[#2 Understanding Lifecycle Hooks in Nuxt ]]></title><description><![CDATA[An in-depth exploration of the various Lifecycles in Nuxt.js]]></description><link>https://blog.nuxtdojo.com/p/2-understanding-lifecycle-hooks-in</link><guid isPermaLink="false">https://blog.nuxtdojo.com/p/2-understanding-lifecycle-hooks-in</guid><dc:creator><![CDATA[Krutie]]></dc:creator><pubDate>Tue, 13 Feb 2024 03:48:43 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#127775; Welcome to NuxtDojo Publication! &#127775;</p><p>A heartfelt thank you to everyone who joined NuxtDojo Substack last week! Your support fuels my book writing journey. &#128591;</p><p>In this edition, I'm excited to share with you a sneak peek of a chapter I've been  crafting: an in-depth exploration of the various Lifecycles in Nuxt.js. Get ready to dive deeper into the intricacies of Nuxt's lifecycle hooks and discover how they can enhance your Nuxt projects.</p><p>In the Author's Corner, we'll also embark on a brief journey into getting started with Asciidoctor. Whether you're a seasoned writer or just dipping your toes into the world of technical authoring, this guide will equip you with little extra information you might just need to express your ideas effectively.</p><p>Happy reading, and thank you for being a part of my journey.</p><h3>Nuxter&#8217;s Corner</h3><p>Lifecycle hooks have been one of my favourite topics ever since I picked up Vue.js back in 2017. So obviously, I am very excited to write this chapter in my book.</p><p>We never end up using all of the lifecycle hooks in a single project - ever! However, learning about them increases our understanding of the framework and teaches us how the framework was intended to be used. Whether we are writing Nuxt plugins or Nitro plugins, Nuxt modules or even Vue Composable in Nuxt - lifecycle hooks are everywhere if you look closely.</p><p>Lifecycle hooks provide insight into various stages of your Nuxt application - from setting up Nuxt configuration to creating, rendering and mounting the Nuxt app that leads us to access Nuxt page and Vue components. I can see three key reasons to learn lifecycle hooks in Nuxt.</p><ul><li><p>Understanding these lifecycle hooks helps us write more efficient and predictable code in our Nuxt application.</p></li><li><p>Lifecycle hooks open up wide ranging possibilities to extend default Nuxt as it allows us to tap into specific stages of Nuxt application - either at runtime or build-time or on client-side or server-side.</p></li><li><p>Understanding these lifecycles can be invaluable when debugging and troubleshooting your Nuxt application. By logging lifecycle hook events and understanding their sequence, we can pinpoint issues and identify potential solutions more effectively.</p></li></ul><p>We have three sets of lifecycle hooks in the Nuxt framework - 1) <strong>Nuxt</strong>, 2) <strong>Nitro</strong> and 3) <strong>App</strong> - that we should learn about. Since Nuxt is built on top of Vue, we should be familiar with <strong>Vue Component Lifecycle</strong> and <strong>Vue Transition Lifecycle</strong> as well.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O6HE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O6HE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png 424w, https://substackcdn.com/image/fetch/$s_!O6HE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png 848w, https://substackcdn.com/image/fetch/$s_!O6HE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png 1272w, https://substackcdn.com/image/fetch/$s_!O6HE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!O6HE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png" width="624" height="452.52990158970476" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:958,&quot;width&quot;:1321,&quot;resizeWidth&quot;:624,&quot;bytes&quot;:163173,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!O6HE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png 424w, https://substackcdn.com/image/fetch/$s_!O6HE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png 848w, https://substackcdn.com/image/fetch/$s_!O6HE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png 1272w, https://substackcdn.com/image/fetch/$s_!O6HE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb6b1d3-4692-4823-8d31-48f2eb05b158_1321x958.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Lifecycle Hooks in Nuxt</figcaption></figure></div><ul><li><p><strong>Nuxt</strong> Lifecycle Hooks - allow us to extend Nuxt at build-time, and we can use them in Nuxt modules or a Nuxt Config file.</p></li><li><p><strong>App</strong> Lifecycle Hooks - allow us to manage the state of the Nuxt app and help us extend Nuxt at runtime, that we can do through Nuxt plugins. I have created this initial diagram to illustrate the App Lifecycle Hooks where you can see a high-level journey of <strong>app:*</strong>, <strong>vue:*</strong> and Nuxt <strong>page:*</strong> hooks.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GnSS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GnSS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png 424w, https://substackcdn.com/image/fetch/$s_!GnSS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png 848w, https://substackcdn.com/image/fetch/$s_!GnSS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png 1272w, https://substackcdn.com/image/fetch/$s_!GnSS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GnSS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png" width="620" height="918.84" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1482,&quot;width&quot;:1000,&quot;resizeWidth&quot;:620,&quot;bytes&quot;:419291,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GnSS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png 424w, https://substackcdn.com/image/fetch/$s_!GnSS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png 848w, https://substackcdn.com/image/fetch/$s_!GnSS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png 1272w, https://substackcdn.com/image/fetch/$s_!GnSS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94bf442f-01ae-48c6-86d9-048e596c90d7_1000x1482.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">App Lifecycle Hooks</figcaption></figure></div><ul><li><p><strong>Nitro</strong> Lifecycle Hooks - allow us to tap into the runtime behaviour of the Nitro server where we can intercept request and response lifecycle including errors.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yf4e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yf4e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png 424w, https://substackcdn.com/image/fetch/$s_!yf4e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png 848w, https://substackcdn.com/image/fetch/$s_!yf4e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png 1272w, https://substackcdn.com/image/fetch/$s_!yf4e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yf4e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png" width="552" height="538.016" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/adda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:731,&quot;width&quot;:750,&quot;resizeWidth&quot;:552,&quot;bytes&quot;:147236,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yf4e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png 424w, https://substackcdn.com/image/fetch/$s_!yf4e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png 848w, https://substackcdn.com/image/fetch/$s_!yf4e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png 1272w, https://substackcdn.com/image/fetch/$s_!yf4e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadda0ac8-083f-4f78-9287-2f956c77c98e_750x731.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Nitro Lifecycle Hooks</figcaption></figure></div></li><li><p><strong>Vue</strong> Lifecycle Hooks - provide insight into the various stages a Vue component goes through, from initialisation to destruction.</p></li><li><p><a href="https://vuejs.org/guide/built-ins/transition#css-based-transitions">Vue </a><strong><a href="https://vuejs.org/guide/built-ins/transition#css-based-transitions">Transition</a></strong><a href="https://vuejs.org/guide/built-ins/transition#css-based-transitions"> Lifecycle</a></p></li><li><p><a href="https://twitter.com/KrutiePatel/status/1622447292602273795/photo/1](https://twitter.com/KrutiePatel/status/1622447292602273795">Nuxt </a><strong><a href="https://twitter.com/KrutiePatel/status/1622447292602273795/photo/1](https://twitter.com/KrutiePatel/status/1622447292602273795">Page</a></strong><a href="https://twitter.com/KrutiePatel/status/1622447292602273795/photo/1](https://twitter.com/KrutiePatel/status/1622447292602273795"> Lifecycle</a></p></li></ul><p>This last one - Nuxt Page Lifecycle - is not an officially documented lifecycle as such. It is however, something I created to understand what happens when someone accesses a Nuxt page. Nuxt page lifecycle has evolved over time, and it was absolutely amazing to see how each new Nuxt version has brought new improvements each time. <a href="https://twitter.com/KrutiePatel/status/1000022559184764930">Here&#8217;s the very first version</a> from the old days.</p><p>By understanding when (build-time or runtime) and where (client-side or server-side) certain tasks should be performed within the application, we can write more efficient, maintainable, and performant code, while also gaining valuable insights into the inner workings of Nuxt framework.</p><p>I see so many possibilities for this chapter that is filled with examples from real-world use cases. This chapter is likely to have critical teaching-points for the beginners as well. I will have similar diagrams as above for all Lifecycles mentioned here. Going forward, these diagrams will become reference points to dive deeper into other areas of Nuxt.</p><h3>Author&#8217;s Corner</h3><blockquote><p><em>A talented tech writer is worth as much as a talented developer. Good prose is no more or less complex to write than good code.</em> - <a href="https://twitter.com/mojavelinux">Dan Allen</a></p></blockquote><p>Dan Allen is the creator of <a href="https://asciidoctor.org/">Asciidoctor</a> - an open source implementation of <a href="https://asciidoc.org/">Asciidoc</a>. Before I sat my heart on Asciidoctor, I did trial Google Docs, Notion, Scrivener and even Apple Pages. While they only partially fulfilled my requirements, Asciidoctor did everything I needed - pretty code blocks, markdown support, version control, multiple export file formats and more!</p><p>Unlike other tools I mentioned here, Asciidoc is not just a writing tool, it&#8217;s rather a tool for writing <strong>tech books</strong>. If you read its <a href="https://docs.asciidoctor.org/">documentation</a>, you will see lots of book related terminologies - such as recto, verso, abstract, colophon, index catalog, front matter, back matter, admonitions to name a few - that you may never see in a generic software. In case you are wondering, here&#8217;s a quick definition of each:</p><ul><li><p><strong>Front Matter</strong>: The introductory section of a book that includes elements like the title page, copyright page, dedication, preface, and table of contents.</p></li><li><p><strong>Back Matter</strong>: The concluding section of a book that includes elements like the index, glossary, bibliography, appendices, and acknowledgments.</p></li><li><p><strong>Recto</strong>: The right-hand page of an open book with an odd-numbered page.</p></li><li><p><strong>Verso</strong>: The left-hand page of an open book with an even-numbered page.</p></li><li><p><strong>Abstract</strong>: A concise summary of a larger work that provides an overview of its key points and findings.</p></li><li><p><strong>Colophon</strong>: A section at the end of the book that contains information about the publication, such as the publisher's name, printer, and date of publication.</p></li><li><p><strong>Index Catalog</strong>: A comprehensive list of topics, names, or terms found within a book, typically arranged alphabetically and providing page references.</p></li><li><p><strong>Admonitions</strong>: Brief notes or warnings typically included in technical or instructional texts to provide guidance, clarification, or cautionary information to the reader.</p></li></ul><p>Asciidoctor provides a straightforward and human-readable, markdown-like syntax while offering powerful features for writing technical content. Here's a step-by-step guide on how to use AsciiDoc for writing a technical book:</p><ul><li><p><strong>Install AsciiDoc on your Mac:</strong></p><p>Refer to the official AsciiDoctor website for  installation instructions: <a href="https://asciidoctor.org/#macos">AsciiDoctor Installation</a>.</p><pre><code>$ brew install asciidoctor</code></pre></li><li><p><strong>Basic Document Structure:</strong></p><p>Start your <strong>.adoc</strong> document in your favourite Code Editor with a title, author information, and other key metadata, such as <strong>:doctype: book</strong> - this is required when we want to generate a book. You can have a separate <strong>.adoc</strong> file for each of your book chapters, and then include them in your <strong>index.adoc</strong> file using <strong>include::</strong> key. Here's a simple example:</p><pre><code>// index.adoc

= Title of Your Book
Author Name
:doctype: book
:lang: en

include::chapter-1.adoc
include::chapter-2.adoc</code></pre></li><li><p><strong>Include front and back cover:</strong></p><p>Use the `image` directive to include images:</p><pre><code>// index.adoc
:doctype: book
// ...

:front-cover-image: image:images/cover-front.jpg[fit=fill]
:back-cover-image: image:images/cover-front.jpg[fit=fill]</code></pre></li><li><p><strong>Sections and Chapters:</strong></p><p>Organise your content into sections and chapters using headings. For example:</p><pre><code>// chapter-1.adoc

== Chapter 1: Introduction
This is the content of the introduction.

=== Section 1.1: Overview
This is an overview of the chapter.</code></pre></li><li><p><strong>Code Blocks:</strong></p><p>Use code blocks for displaying code snippets:</p><pre><code>[source,js]
----
export default {
  setup() {
    const count = ref(0)
    return { count }
  }
}
----</code></pre></li><li><p><strong>Generate PDF Output:</strong></p><p>Once your content is written, use the <strong>asciidoctor-pdf</strong> to generate the PDF output. You do not need to install any additional package to do this.</p><p><br>Create a basic <strong>package.json</strong> in the root of your book project and add a script <strong>asciidoctor-pdf index.adoc</strong> to export the pdf file. Now, you can run <strong>yarn pdf</strong> from your terminal to export your book.</p><pre><code>// package.json
{
"name": "my-book",
"version": "1.0.0",
"main": "index.adoc",
"scripts": {
  "pdf": "asciidoctor-pdf index.adoc"
 }
}</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!N9y8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!N9y8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png 424w, https://substackcdn.com/image/fetch/$s_!N9y8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png 848w, https://substackcdn.com/image/fetch/$s_!N9y8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png 1272w, https://substackcdn.com/image/fetch/$s_!N9y8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!N9y8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png" width="538" height="557.9532967032967" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1510,&quot;width&quot;:1456,&quot;resizeWidth&quot;:538,&quot;bytes&quot;:896176,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!N9y8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png 424w, https://substackcdn.com/image/fetch/$s_!N9y8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png 848w, https://substackcdn.com/image/fetch/$s_!N9y8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png 1272w, https://substackcdn.com/image/fetch/$s_!N9y8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35310020-fd5e-46cb-9079-45fd062d8261_1684x1746.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Exported PDF with book cover using Asciidoctor</figcaption></figure></div><p></p></li><li><p><strong>Review and Iterate:</strong></p><p>Review the generated output and iterate on your AsciiDoctor source as needed. Fine-tune formatting, fix errors, and enhance the content and most importantly now you can use a version control system to track changes and even collaborate with others.</p></li></ul><p>By following these steps, you can leverage AsciiDoctor's simplicity and power to author a technical book with ease. We will see more intricate elements of the book authoring process in coming weeks.</p><div><hr></div><h4><strong>&#128640; How You Can Participate:</strong></h4><ul><li><p><strong>&#128218; Read Along:</strong> Subscribe to the newsletter to receive updates, diagrams, and behind-the-scenes content.</p></li><li><p><strong>&#129309; Community Interaction:</strong> Share topic suggestions for the book, questions, and insights here on NuxtDojo Substack.</p></li><li><p><strong>&#128640; Spread the Word:</strong> Let others know about <strong>NuxtDojo</strong> &#8211; share on social media and among your developer circles.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nc75!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" width="208" height="148.096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896211a6-f760-4b87-8118-5e851387ec1f_500x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:356,&quot;width&quot;:500,&quot;resizeWidth&quot;:208,&quot;bytes&quot;:86449,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">nuxtdojo.com</figcaption></figure></div><p>Warm regards, <br><a href="https://twitter.com/KrutiePatel">Krutie</a> @ NuxtDojo Publication &#128640;&#128218;</p>]]></content:encoded></item><item><title><![CDATA[#1 Nuxt.js Writing Adventure! 🚀✨]]></title><description><![CDATA[Crafting Code and Prose]]></description><link>https://blog.nuxtdojo.com/p/1-nuxtjs-writing-adventure</link><guid isPermaLink="false">https://blog.nuxtdojo.com/p/1-nuxtjs-writing-adventure</guid><dc:creator><![CDATA[Krutie]]></dc:creator><pubDate>Fri, 02 Feb 2024 11:44:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I&#8217;m delighted to share this exciting news with you! I&#8217;m officially announcing my venture into writing a comprehensive guide titled &#8220;Nuxt Your Everyday Vue.js&#8221; &#10024;&nbsp;&#128072; This title may very well change by the time I finish. But nonetheless, this is going to be a Nuxt.js book &#128215;</p><h3><strong>Nuxter&#8217;s Corner</strong></h3><p>I want this Nuxt book to be what I wish I had when I started off with Nuxt back in 2017 and hope to cover topics that Nuxt beginners may encounter on the job - in the real world. So, if you are thinking about topics such as Headless CMS, E-commerce and Authentication alike - then yes, this book might be for you.</p><p>At the same time, I want to include the fundamentals of Nuxt.js - where we learn Nuxt basics in regards to what happens during runtime and build-time vs client-side and server-side, auto-imports and aliases, Vue vs Nuxt, Nuxt and TypeScript, app config vs environment variables to name a few.</p><p>I published this &#128071; <a href="https://medium.com/@krutie/nuxt-nation-2023-nuxt-layers-unwrapped-6e4288834258">diagram a while ago</a> and it has been a guiding light for me when I am planning the Nuxt Fundamentals part of this book.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8y6H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8y6H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png 424w, https://substackcdn.com/image/fetch/$s_!8y6H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png 848w, https://substackcdn.com/image/fetch/$s_!8y6H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png 1272w, https://substackcdn.com/image/fetch/$s_!8y6H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8y6H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png" width="446" height="619.070054945055" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2021,&quot;width&quot;:1456,&quot;resizeWidth&quot;:446,&quot;bytes&quot;:448109,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8y6H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png 424w, https://substackcdn.com/image/fetch/$s_!8y6H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png 848w, https://substackcdn.com/image/fetch/$s_!8y6H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png 1272w, https://substackcdn.com/image/fetch/$s_!8y6H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6e8ea9d-8faf-4dc1-9eed-fedae30bfe2e_2569x3566.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Nuxt Directory Structure</figcaption></figure></div><p>With this in mind, here&#8217;s the high-level parts of the book that I am pondering over these days:</p><ul><li><p>Nuxt Fundamentals</p></li><li><p>Nuxt Customisation Touchpoints</p></li><li><p>Backend Nuxt (Nitro)</p></li><li><p>Frontend Development - Common Parts</p></li><li><p>Nuxt By Examples</p></li><li><p>Deploying Nuxt</p></li></ul><p>I think the most challenging part of writing Nuxt basics has been to make sure it does not read like a documentation! This applies to the book&#8217;s Table of Contents (TOC) as well. While I author the topics that I am sure of, I am also spending some time trying out different TOC structures to get the feel for this book - to see if it maintains a reader-friendly flow - to see if it makes sense in case readers skipped a few chapters in-between - to see what value it&#8217;ll add to the whole project.</p><p>Overtime, I will plan and share the detailed content structure of each part. Doing this will keep me accountable to complete this project as well. </p><h3><strong>Author&#8217;s Corner</strong></h3><p>This project isn&#8217;t just about Nuxt - it&#8217;s a journey into the world of technical book writing and self-publishing as well. Self-publishing aspect of this project makes it all the more exciting. At least for me &#129335;&#8205;&#9792;&#65039;</p><p>I have chosen <a href="https://asciidoc.org/">ASCII Doctor</a> as a tool of my choice to author this book. As I am navigating the landscape of writing a technical book, I am learning a lot - from formatting book parts, chapters, pages to creating front and back book covers. Here&#8217;s the sneak peek of the initial cover designs I am tinkering with in Affinity Design. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PYdn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PYdn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png 424w, https://substackcdn.com/image/fetch/$s_!PYdn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png 848w, https://substackcdn.com/image/fetch/$s_!PYdn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!PYdn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PYdn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png" width="1456" height="1021" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1021,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:981462,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PYdn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png 424w, https://substackcdn.com/image/fetch/$s_!PYdn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png 848w, https://substackcdn.com/image/fetch/$s_!PYdn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!PYdn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f540579-635a-4a32-828a-1408ccb08d30_2322x1628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Book Cover Design - Initial Drafts</figcaption></figure></div><p>ASCII Doctor is an open-source, Ruby-based text processor that parses the markdown and converts the output into a book-like PDF format. So I am also learning a bit of Ruby basics to customise certain aspects of the book. </p><p>I am starting this newsletter with a hope to share all that I am learning and the process of authoring a technical book. I am using Nuxt.js as the canvas for my exploration, hope this inspires you to write your own one day! When I have tangible results to share, I will share behind-the-scenes stories about how I achieved specific book features using ASCII Doctor.</p><h4><strong>&#128640; How You Can Participate:</strong></h4><ul><li><p><strong>&#128218; Read Along:</strong> Subscribe to the newsletter to receive updates, diagrams, and behind-the-scenes content.</p></li><li><p><strong>&#129309; Community Interaction:</strong> Share topic suggestions for the book, questions, and insights here on NuxtDojo Substack.</p></li><li><p><strong>&#128640; Spread the Word:</strong> Let others know about <strong>NuxtDojo</strong> &#8211; share on social media and among your developer circles.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nc75!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png" width="208" height="148.096" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896211a6-f760-4b87-8118-5e851387ec1f_500x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:356,&quot;width&quot;:500,&quot;resizeWidth&quot;:208,&quot;bytes&quot;:86449,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Nc75!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 424w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 848w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Nc75!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896211a6-f760-4b87-8118-5e851387ec1f_500x356.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">nuxtdojo.com</figcaption></figure></div><div><hr></div></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.nuxtdojo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading this first <strong>NuxtDojo</strong> <strong>Publication &#128588;</strong> Subscribe for free to receive new posts and support my book project.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item></channel></rss>