[{"data":1,"prerenderedAt":5576},["ShallowReactive",2],{"article-es-less-tokens-more-precision":3,"linked-es-less-tokens-more-precision":433,"less-tokens-more-precision-surround":5565},{"article":4,"isFallback":432},{"id":5,"title":6,"author":7,"body":8,"date":417,"description":418,"extension":419,"meta":420,"navigation":421,"path":422,"seo":423,"sitemap":424,"stem":425,"tags":426,"thumbnail":430,"__hash__":431},"es_articles/articles/es/less-tokens-more-precision.md","Menos tokens, más precisión: herramientas para reducir alucinaciones en IA","Edwin Gonzalez",{"type":9,"value":10,"toc":399},"minimark",[11,19,31,45,48,59,64,71,77,82,105,109,112,117,131,136,150,154,158,168,171,177,180,189,192,219,225,229,236,239,249,255,258,264,268,272,307,311,347,351,354,371,375,378,386,389,392],[12,13,14],"p",{},[15,16],"img",{"alt":17,"src":18},"Banner","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1782182984/less-tokens-more-precision-banner-es_tlxd5w.png",[12,20,21,22,26,27,30],{},"Bienvenido a este nuevo post sobre uno de los problemas más costosos y silenciosos al trabajar con IA, te a pasado que cuando abres Claude Code y le preguntas por qué tu componente de ",[23,24,25],"code",{},"Vue"," está haciendo un ",[23,28,29],{},"watch"," innecesario cada vez que cambias una props.",[12,32,33,34,36,37,40,41,44],{},"Y este te responde con una introducción amable, un recordatorio de que \"hay varias formas de abordar esto\", dos párrafos explicando qué es la reactividad en ",[23,35,25],{}," como si nunca hubieras tocado un ",[23,38,39],{},"ref()"," en tu vida, la solución real enterrada en el párrafo cuatro y como spoiler: era un ",[23,42,43],{},"computed"," de tres líneas, y un cierre tipo \"¡espero que esto te haya ayudado! 😊\". Estas palabras parecen muy didácticas, pero tambien te costó dinero.",[12,46,47],{},"Cada palabra que el modelo escribe es un token (Son la unidad de medida de todo: velocidad, precio y contexto disponible.) la gran realidad que muchos developers descubren o pretenden no darle demasiada importancia es esta: los modelos de IA tienden a hablar demasiado por defecto.",[12,49,50,51,54,55,58],{},"Este post es una pequeña guía para entender por qué pasa, qué consecuencias tiene, y que herramientas pueden ayudarnos como ",[23,52,53],{},"Caveman"," y ",[23,56,57],{},"Ponytail"," están cambiando esa dinámica.",[60,61,63],"h2",{"id":62},"qué-son-los-tokens-y-por-que-debería-importarnos","¿Qué son los tokens y por que debería importarnos?",[12,65,66,67,70],{},"Un ",[23,68,69],{},"token"," es la unidad mínima con la que un modelo de lenguaje procesa texto. Aproximadamente 4 caracteres en inglés equivalen a 1 token; en español suele ser un poco más. Cada petición que haces a un modelo de IA y cada respuesta que recibes consume tokens.",[72,73,74],"tip",{},[12,75,76],{},"Si usas agentes de IA en inglés, gastas menos tokens por defecto. No porque el modelo piense mejor en inglés, sino porque el idioma es estructuralmente más compacto.",[78,79,81],"h3",{"id":80},"importancia-de-los-tokens","Importancia de los tokens",[83,84,85,93,99],"ul",{},[86,87,88,92],"li",{},[89,90,91],"strong",{},"Costo",". Los modelos de IA cobran por tokens consumidos. Más texto generado = más dinero gastado. En proyectos grandes o en pipelines automatizados, eso escala  demasiado rápido.",[86,94,95,98],{},[89,96,97],{},"Velocidad",". Generar menos tokens es, físicamente, más rápido. Una respuesta de 100 tokens llega antes que una de 1.5K.",[86,100,101,104],{},[89,102,103],{},"Ventana de contexto",". Los modelos tienen un límite de cuánto \"recuerdan\" dentro de una conversación. Si el agente genera respuestas gigantes, la ventana se llena mucho antes, pierdes contexto previo y empieza a cometer errores o a olvidar instrucciones.",[60,106,108],{"id":107},"la-realidad-de-los-agentes-de-ia-en-2026","La realidad de los agentes de IA en 2026",[12,110,111],{},"Trabajar con agentes de IA para desarrollo de software tiene beneficios reales y comprobados. Pero también tiene fallas que la industria normalmente no menciona en sus demos:",[12,113,114],{},[89,115,116],{},"Lo que considera que funciona bien",[83,118,119,122,125,128],{},[86,120,121],{},"Generación de código boilerplate y repetitivo",[86,123,124],{},"Refactorización de funciones conocidas",[86,126,127],{},"Búsqueda de bugs cuando el contexto es claro",[86,129,130],{},"Documentación inicial de código existente",[12,132,133],{},[89,134,135],{},"Lo que falla más de lo esperado",[83,137,138,141,144,147],{},[86,139,140],{},"\"Inventa\" APIs, métodos o librerías que no existen (alucinaciones)",[86,142,143],{},"Sobre construye: pides un selector de fecha, instala una librería de 200KB",[86,145,146],{},"Genera código correcto pero con 5x más líneas de las necesarias",[86,148,149],{},"Los contextos largos degradan la calidad de las respuestas",[60,151,153],{"id":152},"dos-herramientas-que-atacan-el-problema-desde-ángulo-distintos","Dos herramientas que atacan el problema desde ángulo distintos",[78,155,157],{"id":156},"caveman-por-qué-usar-muchos-tokens-cuando-unos-pocos-hacen-el-truco","🪨 Caveman \"¿Por qué usar muchos tokens cuando unos pocos hacen el truco?\"",[12,159,160,167],{},[161,162,53],"a",{":target":163,"href":164,"rel":165},"_blank","https://github.com/juliusbrussee/caveman",[166],"nofollow"," es un skill/plugin para agentes de IA (Claude Code, Codex, Cursor, Copilot y más de 30 agentes adicionales) que instruye al modelo a comunicarse de forma telegráfica, eliminando el relleno verbal sin sacrificar precisión técnica, es como que hablaras con un cavernicola. Chequea este ejemplo.",[12,169,170],{},"En lugar de:",[172,173,174],"blockquote",{},[12,175,176],{},"\"The reason your Vue component is triggering an unnecessary watch is likely because you're passing a reactive object as a prop and the watcher is tracking the entire reference instead of the specific value you care about...\" (46 tokens)",[12,178,179],{},"Con Caveman:",[172,181,182],{},[12,183,184,185,188],{},"\"Watch tracks full ref. Use ",[23,186,187],{},"computed(() => props.val)"," instead.\" (16 tokens)",[12,190,191],{},"La misma solución. 75% menos palabras.",[12,193,194,196,197,200,201,200,204,200,207,210,211,214,215,218],{},[23,195,53],{}," incluye niveles de compresión o tambien conocidos como modos: (",[23,198,199],{},"lite",", ",[23,202,203],{},"full",[23,205,206],{},"ultra",[23,208,209],{},"wenyan",") y herramientas adicionales como ",[23,212,213],{},"/caveman-compress"," para reescribir archivos de memoria del agente (como ",[23,216,217],{},"CLAUDE.md",") en formato compacto, ahorrando tokens en cada sesión futura.",[12,220,221],{},[15,222],{"alt":223,"src":224},"Repo caveman","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1782183717/less-tokens-more-precision-caveman_ikcvnl.png",[78,226,228],{"id":227},"ponytail-el-desarrollador-senior-más-perezoso-de-la-sala","🐴 Ponytail \"El desarrollador senior más perezoso de la sala\"",[12,230,231,235],{},[161,232,57],{":target":163,"href":233,"rel":234},"https://github.com/DietrichGebert/ponytail",[166]," ataca un problema diferente pero relacionado: el agente no solo habla demasiado, sino que también escribe demasiado código.",[12,237,238],{},"Su flujo es simple: antes de escribir cualquier línea, el agente debe pasar por una escalera de decisiones:",[240,241,247],"pre",{"className":242,"code":244,"language":245,"meta":246},[243],"language-text","1. ¿Esto necesita existir?          → no: ni lo escribas (YAGNI)\n2. ¿La stdlib lo hace?              → úsala\n3. ¿El navegador/plataforma lo tiene? → úsalo\n4. ¿Hay una dependencia instalada?  → úsala\n5. ¿Cabe en una línea?              → una línea\n6. Solo entonces: el mínimo que funciona\n","text","",[23,248,244],{"__ignoreMap":246},[12,250,251,252,254],{},"El resultado en una tarea real con Claude Code sobre un componente ",[23,253,25],{}," con filtro de búsqueda: 79% menos líneas de código generado, sin dependencias externas, sin lifecycle composables innecesarios, manteniendo el 100% de reactividad y comportamiento esperado.",[12,256,257],{},"La diferencia con simplemente pedirle \"sé conciso\": Ponytail preserva explícitamente la seguridad, la accesibilidad y el manejo de errores. No es código golfing, es ingeniería mínima responsable.",[12,259,260],{},[15,261],{"alt":262,"src":263},"Repo ponytail","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1782183717/less-tokens-more-precision-ponytail_nuwzpd.png",[60,265,267],{"id":266},"ventajas-y-desventajas-reales","Ventajas y desventajas reales",[78,269,271],{"id":270},"ventajas","Ventajas",[83,273,274,280,286,292,301],{},[86,275,276,279],{},[89,277,278],{},"Reducción decostos",": Menos tokens de salida = facturas más bajas o mejor gestión de tokens. En equipos que usan agentes de forma intensiva, el ahorro es significante.",[86,281,282,285],{},[89,283,284],{},"Respuestas más rápidas",". El tiempo de generación es proporcional a la cantidad de tokens.",[86,287,288,291],{},[89,289,290],{},"Mayor persistencia de contextos",". Al generar menos por respuesta, el agente conserva y gestiona memoria útil por más tiempo dentro de una sesión.",[86,293,294,297,298,300],{},[89,295,296],{},"Código más mantenible",". ",[23,299,57],{}," tiende a producir soluciones más simples, que son inherentemente más fáciles de leer y modificar.",[86,302,303,306],{},[89,304,305],{},"Menos librerías innecesarias",". El agente deja de instalar librerías de terceros para tareas que el navegador ya resuelve con una línea nativa.",[78,308,310],{"id":309},"desventajas-y-limitaciones","Desventajas y Limitaciones",[83,312,313,319,327,335,341],{},[86,314,315,318],{},[89,316,317],{},"No es magia",". Estas herramientas funcionan instruyendo al modelo vía prompts/skills. Modelos de razonamiento que invierten tokens \"pensando\" (como GPT-5.5 o Claude con extended thinking) pueden no reducir costos o incluso aumentarlos en casos específicos.",[86,320,321,326],{},[89,322,323,325],{},[23,324,53],{}," puede perder matices",". En temas complejos donde la explicación detallada tiene valor (arquitectura, trade-offs de diseño), forzar brevedad puede omitir contexto importante.",[86,328,329,334],{},[89,330,331,333],{},[23,332,57],{}," no elimina alucinaciones",". Reduce el código innecesario, pero no resuelve el problema de que el modelo a veces invente APIs o métodos que no existen. Eso requiere otras estrategias (RAG, contexto explícito, verificación con herramientas).",[86,336,337,340],{},[89,338,339],{},"Requieren compatibilidad con el agente",". Aunque ambas herramientas soportan docenas de agentes, la experiencia varía. Las instrucciones siempre activas funcionan mejor que las activadas por sesión.",[86,342,343,346],{},[89,344,345],{},"Curva de ajustes",". En proyectos donde el agente necesita explicar decisiones al equipo o generar documentación detallada, el modo caveman puede estar en conflicto con esos objetivos.",[60,348,350],{"id":349},"consejos-prácticos-más-allá-de-las-herramientas","Consejos prácticos (Más allá de las herramientas)",[12,352,353],{},"Incluso sin instalar nada, hay ajustes que puedes hacer hoy:",[83,355,356,359,362,365,368],{},[86,357,358],{},"Sé específico en tus prompts. \"Refactoriza esta función\" genera más tokens que \"Extrae la lógica de validación de esta función a un método privado, sin cambiar el comportamiento externo.\" Cuanto más vaga es la instrucción, más extensa e imprecisa es la respuesta.",[86,360,361],{},"Dale al agente el contexto exacto, no el máximo. Pegar 500 líneas de código cuando el bug está en 20 llena el contexto innecesariamente. El agente intenta \"ayudar\" con todo lo que ve.",[86,363,364],{},"Establece restricciones explícitas. \"Responde en 3 líneas o menos\" o \"Solo dame el código, sin explicación\" son instrucciones que el modelo respeta bien.",[86,366,367],{},"Prefiere herramientas nativas. Antes de pedirle al agente que instale algo, pregúntale primero si el lenguaje o el framework ya lo resuelve. Evita que el agente tome ese camino solo.",[86,369,370],{},"Revisa el diff, no el archivo completo. Los agentes tienden a reescribir más de lo necesario cuando el archivo completo está en contexto. Trabaja con fragmentos cuando sea posible.",[60,372,374],{"id":373},"conclusión-el-agente-ideal-habla-poco-y-escribe-solo-lo-necesario","Conclusión: El agente ideal habla poco y escribe solo lo necesario",[12,376,377],{},"La conversación sobre IA en desarrollo de software gira casi siempre en torno a capacidades de lo que el agente puede hacer. Pero los equipos que la usan aprenden rápido que es importante es cómo lo hace, cuánto contexto consume, cuánto código genera de más, que tan directa es la respuesta.",[12,379,380,381,54,383,385],{},"Herramientas como ",[23,382,53],{},[23,384,57],{}," representan una respuesta pragmática a esa realidad. No son soluciones perfectas ni reemplazan el criterio de cada developer, pero atacan problemas reales con enfoques concretos y resultados medibles.",[12,387,388],{},"En posts futuros vamos a profundizar en cada una por separado: cómo instalarlas, casos de uso específicos, y cómo combinarlas para diferentes workflows.",[12,390,391],{},"Por ahora, la pregunta que te dejo es:",[172,393,394],{},[12,395,396],{},[89,397,398],{},"¿Tu agente de IA está trabajando para ti, o estás pagando para que prepare un discurso?",{"title":246,"searchDepth":400,"depth":400,"links":401},2,[402,406,407,411,415,416],{"id":62,"depth":400,"text":63,"children":403},[404],{"id":80,"depth":405,"text":81},3,{"id":107,"depth":400,"text":108},{"id":152,"depth":400,"text":153,"children":408},[409,410],{"id":156,"depth":405,"text":157},{"id":227,"depth":405,"text":228},{"id":266,"depth":400,"text":267,"children":412},[413,414],{"id":270,"depth":405,"text":271},{"id":309,"depth":405,"text":310},{"id":349,"depth":400,"text":350},{"id":373,"depth":400,"text":374},"2026-06-24T00:00:00.000Z","Descubre técnicas y herramientas como Ponytail y Caveman para optimizar prompts, ahorrar tokens y reducir alucinaciones en modelos de lenguaje de tus herramientas IA favoritas.","md",{},true,"/articles/es/less-tokens-more-precision",{"title":6,"description":418},{"loc":422},"articles/es/less-tokens-more-precision",[427,428,429,53,57],"IA","developer tools","prompt engineering","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1782181501/less-tokens-more-precision-thumbnail_uun9mj.png","_ooHVBem2nWaQcO_ldR0z1ymakIMrctRGjB4fxEleMo",false,[434,809,1229,2072,2830],{"id":435,"title":436,"author":7,"body":437,"date":417,"description":800,"extension":419,"meta":801,"navigation":421,"path":802,"seo":803,"sitemap":804,"stem":805,"tags":806,"thumbnail":430,"__hash__":808},"en_articles/articles/en/less-tokens-more-precision.md","Less tokens, more precision: tools to reduce hallucinations in AI",{"type":9,"value":438,"toc":784},[439,444,453,465,468,477,481,487,492,496,516,520,523,528,542,547,561,565,569,575,578,582,585,591,594,614,618,622,628,631,637,643,646,650,654,658,692,696,732,736,739,756,760,763,771,774,777],[12,440,441],{},[15,442],{"alt":17,"src":443},"https://res.cloudinary.com/dhgcfzhm0/image/upload/v1782182984/less-tokens-more-precision-banner-en_he2qep.png",[12,445,446,447,449,450,452],{},"Welcome to this new post about one of the most costly and silent problems when working with AI. Has it happened to you that when you open Claude Code and ask it why your ",[23,448,25],{}," component is doing an unnecessary ",[23,451,29],{}," every time you change a prop.",[12,454,455,456,458,459,461,462,464],{},"And it responds with a friendly introduction, a reminder that \"there are several ways to approach this\", two paragraphs explaining what reactivity in ",[23,457,25],{}," is as if you'd never touched a ",[23,460,39],{}," in your life, the real solution buried in paragraph four and as a spoiler: it was a three-line ",[23,463,43],{},", and a closing line like \"I hope this helped! 😊\". These words seem very educational, but they also cost you money.",[12,466,467],{},"Every word the model writes is a token (They are the unit of measurement for everything: speed, price, and available context.) The harsh reality that many developers discover or pretend not to care too much about is this: AI models tend to talk too much by default.",[12,469,470,471,473,474,476],{},"This post is a small guide to understand why it happens, what consequences it has, and what tools like ",[23,472,53],{}," and ",[23,475,57],{}," can help us and are changing that dynamic.",[60,478,480],{"id":479},"what-are-tokens-and-why-should-we-care","What are tokens and why should we care?",[12,482,483,484,486],{},"A ",[23,485,69],{}," is the minimum unit a language model uses to process text. Approximately 4 characters in English equal 1 token; in Spanish it tends to be a bit more. Every request you make to an AI model and every response you receive consumes tokens.",[72,488,489],{},[12,490,491],{},"If you use AI agents in English, you spend fewer tokens by default. Not because the model thinks better in English, but because the language is structurally more compact.",[78,493,495],{"id":494},"token-importance","Token importance",[83,497,498,504,510],{},[86,499,500,503],{},[89,501,502],{},"Cost",". AI models charge per token consumed. More generated text = more money spent. In large projects or automated pipelines, that scales too fast.",[86,505,506,509],{},[89,507,508],{},"Speed",". Generating fewer tokens is, physically, faster. A 100-token response arrives before a 1.5K one.",[86,511,512,515],{},[89,513,514],{},"Context window",". Models have a limit on how much they \"remember\" within a conversation. If the agent generates giant responses, the window fills up much sooner, you lose previous context and it starts making mistakes or forgetting instructions.",[60,517,519],{"id":518},"the-reality-of-ai-agents-in-2026","The reality of AI agents in 2026",[12,521,522],{},"Working with AI agents for software development has real and proven benefits. But it also has flaws that the industry usually doesn't mention in their demos:",[12,524,525],{},[89,526,527],{},"What works well",[83,529,530,533,536,539],{},[86,531,532],{},"Boilerplate and repetitive code generation",[86,534,535],{},"Refactoring of known functions",[86,537,538],{},"Bug hunting when the context is clear",[86,540,541],{},"Initial documentation of existing code",[12,543,544],{},[89,545,546],{},"What fails more than expected",[83,548,549,552,555,558],{},[86,550,551],{},"\"Invents\" APIs, methods, or libraries that don't exist (hallucinations)",[86,553,554],{},"Over-builds: you ask for a date picker, it installs a 200KB library",[86,556,557],{},"Generates correct code but with 5x more lines than necessary",[86,559,560],{},"Long contexts degrade the quality of responses",[60,562,564],{"id":563},"two-tools-that-attack-the-problem-from-different-angles","Two tools that attack the problem from different angles",[78,566,568],{"id":567},"caveman-why-use-many-tokens-when-few-do-the-trick","🪨 Caveman \"Why use many tokens when few do the trick?\"",[12,570,571,574],{},[161,572,53],{":target":163,"href":164,"rel":573},[166]," is a skill/plugin for AI agents (Claude Code, Codex, Cursor, Copilot and 30+ additional agents) that instructs the model to communicate telegraphically, eliminating verbal filler without sacrificing technical precision, it's like talking to a caveman. Check out this example.",[12,576,577],{},"Instead of:",[172,579,580],{},[12,581,176],{},[12,583,584],{},"With Caveman:",[172,586,587],{},[12,588,184,589,188],{},[23,590,187],{},[12,592,593],{},"Same solution. 75% fewer words.",[12,595,596,598,599,200,601,200,603,200,605,607,608,610,611,613],{},[23,597,53],{}," includes compression levels also known as modes: (",[23,600,199],{},[23,602,203],{},[23,604,206],{},[23,606,209],{},") and additional tools like ",[23,609,213],{}," to rewrite agent memory files (like ",[23,612,217],{},") in compact format, saving tokens in every future session.",[12,615,616],{},[15,617],{"alt":223,"src":224},[78,619,621],{"id":620},"ponytail-the-laziest-senior-developer-in-the-room","🐴 Ponytail \"The laziest senior developer in the room\"",[12,623,624,627],{},[161,625,57],{":target":163,"href":233,"rel":626},[166]," attacks a different but related problem: the agent doesn't just talk too much, it also writes too much code.",[12,629,630],{},"Its flow is simple: before writing any line, the agent must go through a decision ladder:",[240,632,635],{"className":633,"code":634,"language":245,"meta":246},[243],"1. Does this need to exist?           → no: don't even write it (YAGNI)\n2. Does the stdlib do it?             → use it\n3. Does the browser/platform have it? → use it\n4. Is there an installed dependency?  → use it\n5. Does it fit in one line?           → one line\n6. Only then: the minimum that works\n",[23,636,634],{"__ignoreMap":246},[12,638,639,640,642],{},"The result on a real task with Claude Code on a ",[23,641,25],{}," component with a search filter: 79% fewer generated lines of code, no external dependencies, no unnecessary lifecycle composables, maintaining 100% reactivity and expected behavior.",[12,644,645],{},"The difference from simply asking it to \"be concise\": Ponytail explicitly preserves security, accessibility, and error handling. It's not code golfing, it's responsible minimal engineering.",[12,647,648],{},[15,649],{"alt":262,"src":263},[60,651,653],{"id":652},"real-advantages-and-disadvantages","Real advantages and disadvantages",[78,655,657],{"id":656},"advantages","Advantages",[83,659,660,666,672,678,686],{},[86,661,662,665],{},[89,663,664],{},"Cost reduction",": Fewer output tokens = lower bills or better token management. In teams that use agents intensively, the savings are significant.",[86,667,668,671],{},[89,669,670],{},"Faster responses",". Generation time is proportional to the number of tokens.",[86,673,674,677],{},[89,675,676],{},"Greater context persistence",". By generating less per response, the agent retains and manages useful memory for longer within a session.",[86,679,680,297,683,685],{},[89,681,682],{},"More maintainable code",[23,684,57],{}," tends to produce simpler solutions, which are inherently easier to read and modify.",[86,687,688,691],{},[89,689,690],{},"Fewer unnecessary libraries",". The agent stops installing third-party libraries for tasks the browser already solves with a native line.",[78,693,695],{"id":694},"disadvantages-and-limitations","Disadvantages and Limitations",[83,697,698,704,712,720,726],{},[86,699,700,703],{},[89,701,702],{},"It's not magic",". These tools work by instructing the model via prompts/skills. Reasoning models that invest tokens \"thinking\" (like GPT-5.5 or Claude with extended thinking) may not reduce costs or may even increase them in specific cases.",[86,705,706,711],{},[89,707,708,710],{},[23,709,53],{}," may lose nuance",". In complex topics where detailed explanation has value (architecture, design trade-offs), forcing brevity may omit important context.",[86,713,714,719],{},[89,715,716,718],{},[23,717,57],{}," doesn't eliminate hallucinations",". It reduces unnecessary code, but doesn't solve the problem of the model sometimes inventing APIs or methods that don't exist. That requires other strategies (RAG, explicit context, tool-based verification).",[86,721,722,725],{},[89,723,724],{},"They require agent compatibility",". Although both tools support dozens of agents, the experience varies. Always-active instructions work better than session-activated ones.",[86,727,728,731],{},[89,729,730],{},"Adjustment curve",". In projects where the agent needs to explain decisions to the team or generate detailed documentation, caveman mode may conflict with those objectives.",[60,733,735],{"id":734},"practical-tips-beyond-the-tools","Practical tips (Beyond the tools)",[12,737,738],{},"Even without installing anything, there are adjustments you can make today:",[83,740,741,744,747,750,753],{},[86,742,743],{},"Be specific in your prompts. \"Refactor this function\" generates more tokens than \"Extract the validation logic from this function to a private method, without changing the external behavior.\" The vaguer the instruction, the more extensive and imprecise the response.",[86,745,746],{},"Give the agent the exact context, not the maximum. Pasting 500 lines of code when the bug is in 20 fills the context unnecessarily. The agent tries to \"help\" with everything it sees.",[86,748,749],{},"Set explicit constraints. \"Respond in 3 lines or less\" or \"Just give me the code, no explanation\" are instructions the model respects well.",[86,751,752],{},"Prefer native tools. Before asking the agent to install something, first ask it if the language or framework already solves it. Prevent the agent from taking that path on its own.",[86,754,755],{},"Review the diff, not the full file. Agents tend to rewrite more than necessary when the full file is in context. Work with fragments when possible.",[60,757,759],{"id":758},"conclusion-the-ideal-agent-talks-little-and-writes-only-whats-necessary","Conclusion: The ideal agent talks little and writes only what's necessary",[12,761,762],{},"The conversation about AI in software development almost always revolves around capabilities: what the agent can do. But teams that use it quickly learn that what matters is how it does it, how much context it consumes, how much extra code it generates, how direct the response is.",[12,764,765,766,473,768,770],{},"Tools like ",[23,767,53],{},[23,769,57],{}," represent a pragmatic response to that reality. They are not perfect solutions nor do they replace each developer's judgment, but they attack real problems with concrete approaches and measurable results.",[12,772,773],{},"In future posts we'll dive deeper into each one separately: how to install them, specific use cases, and how to combine them for different workflows.",[12,775,776],{},"For now, the question I leave you with is:",[172,778,779],{},[12,780,781],{},[89,782,783],{},"Is your AI agent working for you, or are you paying for it to prepare a speech?",{"title":246,"searchDepth":400,"depth":400,"links":785},[786,789,790,794,798,799],{"id":479,"depth":400,"text":480,"children":787},[788],{"id":494,"depth":405,"text":495},{"id":518,"depth":400,"text":519},{"id":563,"depth":400,"text":564,"children":791},[792,793],{"id":567,"depth":405,"text":568},{"id":620,"depth":405,"text":621},{"id":652,"depth":400,"text":653,"children":795},[796,797],{"id":656,"depth":405,"text":657},{"id":694,"depth":405,"text":695},{"id":734,"depth":400,"text":735},{"id":758,"depth":400,"text":759},"Discover techniques and tools like Ponytail and Caveman to optimize prompts, save tokens, and reduce hallucinations in language models of your favorite AI tools.",{},"/articles/en/less-tokens-more-precision",{"title":436,"description":800},{"loc":802},"articles/en/less-tokens-more-precision",[807,428,429,53,57],"AI","USIkkfj3wnYU6EGTJs1Ef3ijS95gIcAAbUOLx4G-ddU",{"id":810,"title":811,"author":7,"body":812,"date":1217,"description":1218,"extension":419,"meta":1219,"navigation":421,"path":1220,"seo":1221,"sitemap":1222,"stem":1223,"tags":1224,"thumbnail":871,"__hash__":1228},"en_articles/articles/en/broken-arch-linux.md","Broken Arch Linux: Kernel Panic - failed to read configuration 'etc/mkinitcpio.conf",{"type":9,"value":813,"toc":1212},[814,817,820,859,866,872,876,879,888,891,895,901,904,910,982,990,1003,1006,1064,1069,1082,1085,1096,1103,1108,1124,1127,1153,1156,1160,1167,1170,1181,1184,1205,1208],[12,815,816],{},"In this article, I will document how I resolved a critical error on Arch Linux where the system failed to generate initramfs images due to a corrupted mkinitcpio.conf file. In simpler terms, GRUB was not functioning correctly to proceed with system initialization after a faulty dependency upgrade.",[12,818,819],{},"The main error was:",[240,821,825],{"className":822,"code":823,"language":824,"meta":246,"style":246},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","error: fs/fshelp.c:find_file:266: file '/initramfs-linux.img' not found\n","bash",[23,826,827],{"__ignoreMap":246},[828,829,832,836,840,843,847,850,853,856],"span",{"class":830,"line":831},"line",1,[828,833,835],{"class":834},"sBMFI","error:",[828,837,839],{"class":838},"sfazB"," fs/fshelp.c:find_file:266:",[828,841,842],{"class":838}," file",[828,844,846],{"class":845},"sMK4o"," '",[828,848,849],{"class":838},"/initramfs-linux.img",[828,851,852],{"class":845},"'",[828,854,855],{"class":838}," not",[828,857,858],{"class":838}," found\n",[12,860,861,862,865],{},"and then ",[89,863,864],{},"KERNEL PANIC","!",[12,867,868],{},[15,869],{"alt":870,"src":871},"Kernel panic","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1779231242/kernel-panic_kwkqwr.png",[60,873,875],{"id":874},"cause-of-the-problem","Cause of the problem",[12,877,878],{},"After attempting to upgrade dependencies, for some reason (installation interruption, package corruption, or incomplete configuration), the essential file:",[240,880,882],{"className":822,"code":881,"language":824,"meta":246,"style":246},"/etc/mkinitcpio.conf\n",[23,883,884],{"__ignoreMap":246},[828,885,886],{"class":830,"line":831},[828,887,881],{"class":834},[12,889,890],{},"It was damaged/modified in the system, which made it impossible to generate an initramfs.",[60,892,894],{"id":893},"step-by-step-solution","Step by step solution",[896,897,898],"ol",{},[86,899,900],{},"Enter the chroot correctly",[12,902,903],{},"First, we mount and access the system we have installed on our disk from a live iso",[905,906,907],"warning",{},[12,908,909],{},"NOTE: You must to download and access from a live ISO",[240,911,913],{"className":822,"code":912,"language":824,"meta":246,"style":246},"mount /dev/sdXn /mnt\nmount -t proc /proc /mnt/proc\nmount --rbind /sys /mnt/sys\nmount --rbind /dev /mnt/dev\n\narch-chroot /mnt\n\n",[23,914,915,926,942,955,968,974],{"__ignoreMap":246},[828,916,917,920,923],{"class":830,"line":831},[828,918,919],{"class":834},"mount",[828,921,922],{"class":838}," /dev/sdXn",[828,924,925],{"class":838}," /mnt\n",[828,927,928,930,933,936,939],{"class":830,"line":400},[828,929,919],{"class":834},[828,931,932],{"class":838}," -t",[828,934,935],{"class":838}," proc",[828,937,938],{"class":838}," /proc",[828,940,941],{"class":838}," /mnt/proc\n",[828,943,944,946,949,952],{"class":830,"line":405},[828,945,919],{"class":834},[828,947,948],{"class":838}," --rbind",[828,950,951],{"class":838}," /sys",[828,953,954],{"class":838}," /mnt/sys\n",[828,956,958,960,962,965],{"class":830,"line":957},4,[828,959,919],{"class":834},[828,961,948],{"class":838},[828,963,964],{"class":838}," /dev",[828,966,967],{"class":838}," /mnt/dev\n",[828,969,971],{"class":830,"line":970},5,[828,972,973],{"emptyLinePlaceholder":421},"\n",[828,975,977,980],{"class":830,"line":976},6,[828,978,979],{"class":834},"arch-chroot",[828,981,925],{"class":838},[896,983,984],{"start":400},[86,985,986,987],{},"Manually create or edit  ",[23,988,989],{},"/etc/mkinitcpio.conf",[240,991,993],{"className":822,"code":992,"language":824,"meta":246,"style":246},"nano /etc/mkinitcpio.conf\n",[23,994,995],{"__ignoreMap":246},[828,996,997,1000],{"class":830,"line":831},[828,998,999],{"class":834},"nano",[828,1001,1002],{"class":838}," /etc/mkinitcpio.conf\n",[12,1004,1005],{},"And I added this content (the official default Arch file):",[240,1007,1011],{"className":1008,"code":1009,"language":1010,"meta":246,"style":246},"language-conf shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","MODULES=()\nBINARIES=()\nFILES=()\n\nHOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)\n\nCOMPRESSION=\"zstd\"\nCOMPRESSION_OPTIONS=()\n\nMODULES_DECOMPRESS=\"no\"\n","conf",[23,1012,1013,1018,1023,1028,1032,1037,1041,1047,1053,1058],{"__ignoreMap":246},[828,1014,1015],{"class":830,"line":831},[828,1016,1017],{},"MODULES=()\n",[828,1019,1020],{"class":830,"line":400},[828,1021,1022],{},"BINARIES=()\n",[828,1024,1025],{"class":830,"line":405},[828,1026,1027],{},"FILES=()\n",[828,1029,1030],{"class":830,"line":957},[828,1031,973],{"emptyLinePlaceholder":421},[828,1033,1034],{"class":830,"line":970},[828,1035,1036],{},"HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)\n",[828,1038,1039],{"class":830,"line":976},[828,1040,973],{"emptyLinePlaceholder":421},[828,1042,1044],{"class":830,"line":1043},7,[828,1045,1046],{},"COMPRESSION=\"zstd\"\n",[828,1048,1050],{"class":830,"line":1049},8,[828,1051,1052],{},"COMPRESSION_OPTIONS=()\n",[828,1054,1056],{"class":830,"line":1055},9,[828,1057,973],{"emptyLinePlaceholder":421},[828,1059,1061],{"class":830,"line":1060},10,[828,1062,1063],{},"MODULES_DECOMPRESS=\"no\"\n",[896,1065,1066],{"start":405},[86,1067,1068],{},"Regenerate the initramfs",[240,1070,1072],{"className":822,"code":1071,"language":824,"meta":246,"style":246},"mkinitcpio -P\n",[23,1073,1074],{"__ignoreMap":246},[828,1075,1076,1079],{"class":830,"line":831},[828,1077,1078],{"class":834},"mkinitcpio",[828,1080,1081],{"class":838}," -P\n",[12,1083,1084],{},"result",[240,1086,1090],{"className":1087,"code":1088,"language":1089,"meta":246,"style":246},"language-txt shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Initcpio image generation successful\n","txt",[23,1091,1092],{"__ignoreMap":246},[828,1093,1094],{"class":830,"line":831},[828,1095,1088],{},[12,1097,1098,1099,1102],{},"This confirms that the system already has a valid ",[23,1100,1101],{},"initramfs-linux.img",".",[896,1104,1105],{"start":957},[86,1106,1107],{},"Regenerate GRUB",[240,1109,1111],{"className":822,"code":1110,"language":824,"meta":246,"style":246},"grub-mkconfig -o /boot/grub/grub.cfg\n",[23,1112,1113],{"__ignoreMap":246},[828,1114,1115,1118,1121],{"class":830,"line":831},[828,1116,1117],{"class":834},"grub-mkconfig",[828,1119,1120],{"class":838}," -o",[828,1122,1123],{"class":838}," /boot/grub/grub.cfg\n",[12,1125,1126],{},"finally",[240,1128,1130],{"className":822,"code":1129,"language":824,"meta":246,"style":246},"exit\numount -R /mnt\nreboot\n",[23,1131,1132,1138,1148],{"__ignoreMap":246},[828,1133,1134],{"class":830,"line":831},[828,1135,1137],{"class":1136},"s2Zo4","exit\n",[828,1139,1140,1143,1146],{"class":830,"line":400},[828,1141,1142],{"class":834},"umount",[828,1144,1145],{"class":838}," -R",[828,1147,925],{"class":838},[828,1149,1150],{"class":830,"line":405},[828,1151,1152],{"class":834},"reboot\n",[12,1154,1155],{},"And the system started up without problems.",[60,1157,1159],{"id":1158},"conclusion","Conclusion",[12,1161,1162,1163,1166],{},"The error “failed to read configuration ",[23,1164,1165],{},"etc/mkinitcpio.conf","” usually indicates that the mkinitcpio configuration file is missing or corrupted.",[12,1168,1169],{},"The solution involves:",[83,1171,1172,1175,1178],{},[86,1173,1174],{},"Manually creating a valid file",[86,1176,1177],{},"Regenerating the initramfs",[86,1179,1180],{},"Updating GRUB",[12,1182,1183],{},"Documenting this helped me better understand how the boot process works in Arch Linux and how to handle emergencies from a Live ISO.",[1185,1186,1187,1193,1199,1202],"card",{},[12,1188,1189,1192],{},[89,1190,1191],{},"GRUB"," = Bootloader.",[12,1194,1195,1198],{},[89,1196,1197],{},"initramfs"," = Initial toolkit.",[12,1200,1201],{},"GRUB doesn't create, it only loads the initramfs.\nThe initramfs allows the kernel to find the disk and mount the actual system.",[12,1203,1204],{},"Without a proper initramfs → no boot.",[12,1206,1207],{},"It has been a pleasure to share this experience with you, see you next time!!. :)",[1209,1210,1211],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":246,"searchDepth":400,"depth":400,"links":1213},[1214,1215,1216],{"id":874,"depth":400,"text":875},{"id":893,"depth":400,"text":894},{"id":1158,"depth":400,"text":1159},"2025-11-25T00:00:00.000Z","Solution to the critical error in Arch Linux - Kernel Panic - initramfs images could not be generated (GRUB).",{},"/articles/en/broken-arch-linux",{"title":811,"description":1218},{"loc":1220},"articles/en/broken-arch-linux",[1225,1226,1227],"linux","arch-linux","opensource","kyRtTjt8r-bgD2Saw9p7ueFlG_r3qvPOPxdgzpcvcgs",{"id":1230,"title":1231,"author":7,"body":1232,"date":2058,"description":2059,"extension":419,"meta":2060,"navigation":421,"path":2061,"seo":2062,"sitemap":2063,"stem":2064,"tags":2065,"thumbnail":2070,"__hash__":2071},"en_articles/articles/en/coverage-of-jest-unit-tests-using-github-action.md","Coverage of Jest unit tests using GitHub actiong",{"type":9,"value":1233,"toc":2055},[1234,1237,1240,1243,1251,1256,1262,1266,1276,1389,1398,1499,1524,1586,1591,1649,1654,1791,1794,2017,2020,2023,2029,2032,2049,2052],[12,1235,1236],{},"Code coverage is an important metric for measuring the quality of your software tests. It provides a way to quantify how much of your code is being tested and helps you identify areas of your code that may not be adequately covered by your tests.",[12,1238,1239],{},"When you use Jest with GitHub Actions, you can automate the process of running your tests and getting coverage reports, making it easier to track your code coverage over time. This can help you ensure that your code is well-tested, reduce the risk of introducing bugs into your code, and make it easier to maintain your code in the future.",[12,1241,1242],{},"Additionally, having code coverage reports available in your GitHub repository can help you communicate the quality of your tests to other stakeholders, such as team members or customers. This can increase trust in your code and help build confidence in your development process.",[12,1244,1245,1246],{},"Now, we will use the following tool: ",[161,1247,1250],{"href":1248,"rel":1249},"https://www.covbot.dev/",[166],"Jest coverage report action",[72,1252,1253],{},[12,1254,1255],{},"It’s a tool that helps you keep track of coverage of your project. Forms a reporting comment for each PR. In addition, highlights files with reduced coverage and new files",[12,1257,1258],{},[15,1259],{"alt":1260,"src":1261},"Track code","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1779231244/track-code_ss1ich.webp",[60,1263,1265],{"id":1264},"how-can-we-set-up-our-project","How can we set up our project?",[896,1267,1268],{},[86,1269,1270,1271],{},"Create a new script to run all unit tests and generate a coverage report.\n",[905,1272,1273],{},[12,1274,1275],{},"NOTE: This script generates a new file with a JSON extension, so for our GitHub action to work well, this file must already be added to the project when doing our PR. Since if it is not generated an error that the file is not found.",[240,1277,1281],{"className":1278,"code":1279,"language":1280,"meta":246,"style":246},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","//package.json\n{\n  \"name\": \"my project\",\n  \"version\": \"1.0.0\",\n  \"scripts\": {\n    \"coverage\": \"jest --json --coverage --outputFile=report.json\"\n  }\n //...\n}\n","json",[23,1282,1283,1289,1294,1320,1340,1354,1374,1379,1384],{"__ignoreMap":246},[828,1284,1285],{"class":830,"line":831},[828,1286,1288],{"class":1287},"sHwdD","//package.json\n",[828,1290,1291],{"class":830,"line":400},[828,1292,1293],{"class":845},"{\n",[828,1295,1296,1299,1303,1306,1309,1312,1315,1317],{"class":830,"line":405},[828,1297,1298],{"class":845},"  \"",[828,1300,1302],{"class":1301},"spNyl","name",[828,1304,1305],{"class":845},"\"",[828,1307,1308],{"class":845},":",[828,1310,1311],{"class":845}," \"",[828,1313,1314],{"class":838},"my project",[828,1316,1305],{"class":845},[828,1318,1319],{"class":845},",\n",[828,1321,1322,1324,1327,1329,1331,1333,1336,1338],{"class":830,"line":957},[828,1323,1298],{"class":845},[828,1325,1326],{"class":1301},"version",[828,1328,1305],{"class":845},[828,1330,1308],{"class":845},[828,1332,1311],{"class":845},[828,1334,1335],{"class":838},"1.0.0",[828,1337,1305],{"class":845},[828,1339,1319],{"class":845},[828,1341,1342,1344,1347,1349,1351],{"class":830,"line":970},[828,1343,1298],{"class":845},[828,1345,1346],{"class":1301},"scripts",[828,1348,1305],{"class":845},[828,1350,1308],{"class":845},[828,1352,1353],{"class":845}," {\n",[828,1355,1356,1359,1362,1364,1366,1368,1371],{"class":830,"line":976},[828,1357,1358],{"class":845},"    \"",[828,1360,1361],{"class":834},"coverage",[828,1363,1305],{"class":845},[828,1365,1308],{"class":845},[828,1367,1311],{"class":845},[828,1369,1370],{"class":838},"jest --json --coverage --outputFile=report.json",[828,1372,1373],{"class":845},"\"\n",[828,1375,1376],{"class":830,"line":1043},[828,1377,1378],{"class":845},"  }\n",[828,1380,1381],{"class":830,"line":1049},[828,1382,1383],{"class":1287}," //...\n",[828,1385,1386],{"class":830,"line":1055},[828,1387,1388],{"class":845},"}\n",[896,1390,1391],{"start":400},[86,1392,1393,1394,1397],{},"Edit coverage reports from ",[23,1395,1396],{},"jest.config.js"," or jest script file.",[240,1399,1403],{"className":1400,"code":1401,"language":1402,"meta":246,"style":246},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","//jest.config.js\nmodule.exports = {\n  collectCoverage: true,\n  collectCoverageFrom: [\"**/*.{js,vue}\", \"!**/node_modules/**\"],\n  coverageReporters: [ \"text\", \"text-summary\"]\n}\n","js",[23,1404,1405,1410,1420,1434,1467,1495],{"__ignoreMap":246},[828,1406,1407],{"class":830,"line":831},[828,1408,1409],{"class":1287},"//jest.config.js\n",[828,1411,1412,1415,1418],{"class":830,"line":400},[828,1413,1414],{"class":845},"module.exports",[828,1416,1417],{"class":845}," =",[828,1419,1353],{"class":845},[828,1421,1422,1426,1428,1432],{"class":830,"line":405},[828,1423,1425],{"class":1424},"swJcz","  collectCoverage",[828,1427,1308],{"class":845},[828,1429,1431],{"class":1430},"sfNiH"," true",[828,1433,1319],{"class":845},[828,1435,1436,1439,1441,1445,1447,1450,1452,1455,1457,1460,1462,1465],{"class":830,"line":957},[828,1437,1438],{"class":1424},"  collectCoverageFrom",[828,1440,1308],{"class":845},[828,1442,1444],{"class":1443},"sTEyZ"," [",[828,1446,1305],{"class":845},[828,1448,1449],{"class":838},"**/*.{js,vue}",[828,1451,1305],{"class":845},[828,1453,1454],{"class":845},",",[828,1456,1311],{"class":845},[828,1458,1459],{"class":838},"!**/node_modules/**",[828,1461,1305],{"class":845},[828,1463,1464],{"class":1443},"]",[828,1466,1319],{"class":845},[828,1468,1469,1472,1474,1477,1479,1481,1483,1485,1487,1490,1492],{"class":830,"line":970},[828,1470,1471],{"class":1424},"  coverageReporters",[828,1473,1308],{"class":845},[828,1475,1476],{"class":1443}," [ ",[828,1478,1305],{"class":845},[828,1480,245],{"class":838},[828,1482,1305],{"class":845},[828,1484,1454],{"class":845},[828,1486,1311],{"class":845},[828,1488,1489],{"class":838},"text-summary",[828,1491,1305],{"class":845},[828,1493,1494],{"class":1443},"]\n",[828,1496,1497],{"class":830,"line":976},[828,1498,1388],{"class":845},[896,1500,1501,1515,1521],{"start":405},[86,1502,1503,1504,1507,1508,1511,1512,1514],{},"Create a new workflow file in your project: Workflow files are stored in the ",[23,1505,1506],{},".github/workflows"," directory of your repository and define the steps that the GitHub Actions runner will take. To create a new workflow file, you can create a new ",[23,1509,1510],{},".yml"," file in the ",[23,1513,1506],{}," directory.",[86,1516,1517,1518],{},"Add a new step to your GitHub Actions workflow file.\n",[23,1519,1520],{},"(e.g, coverage.yml)",[86,1522,1523],{},"Now, we need to configure in which environment of our branches we want our GitHub action to run.",[240,1525,1529],{"className":1526,"code":1527,"language":1528,"meta":246,"style":246},"language-yml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","#coverage.yml\nname: 'coverage'\non:\n  pull_request:\n    branches:\n      - main\n      - develop\n","yml",[23,1530,1531,1536,1549,1557,1564,1571,1579],{"__ignoreMap":246},[828,1532,1533],{"class":830,"line":831},[828,1534,1535],{"class":1287},"#coverage.yml\n",[828,1537,1538,1540,1542,1544,1546],{"class":830,"line":400},[828,1539,1302],{"class":1424},[828,1541,1308],{"class":845},[828,1543,846],{"class":845},[828,1545,1361],{"class":838},[828,1547,1548],{"class":845},"'\n",[828,1550,1551,1554],{"class":830,"line":405},[828,1552,1553],{"class":1430},"on",[828,1555,1556],{"class":845},":\n",[828,1558,1559,1562],{"class":830,"line":957},[828,1560,1561],{"class":1424},"  pull_request",[828,1563,1556],{"class":845},[828,1565,1566,1569],{"class":830,"line":970},[828,1567,1568],{"class":1424},"    branches",[828,1570,1556],{"class":845},[828,1572,1573,1576],{"class":830,"line":976},[828,1574,1575],{"class":845},"      -",[828,1577,1578],{"class":838}," main\n",[828,1580,1581,1583],{"class":830,"line":1043},[828,1582,1575],{"class":845},[828,1584,1585],{"class":838}," develop\n",[896,1587,1588],{"start":976},[86,1589,1590],{},"Enable permissions about our GitHub action can run.",[240,1592,1594],{"className":1526,"code":1593,"language":1528,"meta":246,"style":246},"#coverage.yml\njobs:\n  coverage:\n    permissions:\n      checks: write\n      pull-requests: write\n      contents: write\n",[23,1595,1596,1600,1607,1614,1621,1631,1640],{"__ignoreMap":246},[828,1597,1598],{"class":830,"line":831},[828,1599,1535],{"class":1287},[828,1601,1602,1605],{"class":830,"line":400},[828,1603,1604],{"class":1424},"jobs",[828,1606,1556],{"class":845},[828,1608,1609,1612],{"class":830,"line":405},[828,1610,1611],{"class":1424},"  coverage",[828,1613,1556],{"class":845},[828,1615,1616,1619],{"class":830,"line":957},[828,1617,1618],{"class":1424},"    permissions",[828,1620,1556],{"class":845},[828,1622,1623,1626,1628],{"class":830,"line":970},[828,1624,1625],{"class":1424},"      checks",[828,1627,1308],{"class":845},[828,1629,1630],{"class":838}," write\n",[828,1632,1633,1636,1638],{"class":830,"line":976},[828,1634,1635],{"class":1424},"      pull-requests",[828,1637,1308],{"class":845},[828,1639,1630],{"class":838},[828,1641,1642,1645,1647],{"class":830,"line":1043},[828,1643,1644],{"class":1424},"      contents",[828,1646,1308],{"class":845},[828,1648,1630],{"class":838},[896,1650,1651],{"start":1043},[86,1652,1653],{},"It’s time to set up the final report steps.",[240,1655,1657],{"className":1526,"code":1656,"language":1528,"meta":246,"style":246}," runs-on: ubuntu-latest\n steps:\n   - uses: actions/checkout@v3\n   - uses: actions/setup-node@v3\n     with:\n       cache: 'yarn'\n   - uses: ArtiomTr/jest-coverage-report-action@v2.1.2\n     id: coverage\n     with:\n       annotations: none\n       package-manager: yarn\n       test-script: yarn coverage\n       icons: emoji \n",[23,1658,1659,1669,1676,1689,1700,1707,1721,1732,1742,1748,1758,1769,1780],{"__ignoreMap":246},[828,1660,1661,1664,1666],{"class":830,"line":831},[828,1662,1663],{"class":1424}," runs-on",[828,1665,1308],{"class":845},[828,1667,1668],{"class":838}," ubuntu-latest\n",[828,1670,1671,1674],{"class":830,"line":400},[828,1672,1673],{"class":1424}," steps",[828,1675,1556],{"class":845},[828,1677,1678,1681,1684,1686],{"class":830,"line":405},[828,1679,1680],{"class":845},"   -",[828,1682,1683],{"class":1424}," uses",[828,1685,1308],{"class":845},[828,1687,1688],{"class":838}," actions/checkout@v3\n",[828,1690,1691,1693,1695,1697],{"class":830,"line":957},[828,1692,1680],{"class":845},[828,1694,1683],{"class":1424},[828,1696,1308],{"class":845},[828,1698,1699],{"class":838}," actions/setup-node@v3\n",[828,1701,1702,1705],{"class":830,"line":970},[828,1703,1704],{"class":1424},"     with",[828,1706,1556],{"class":845},[828,1708,1709,1712,1714,1716,1719],{"class":830,"line":976},[828,1710,1711],{"class":1424},"       cache",[828,1713,1308],{"class":845},[828,1715,846],{"class":845},[828,1717,1718],{"class":838},"yarn",[828,1720,1548],{"class":845},[828,1722,1723,1725,1727,1729],{"class":830,"line":1043},[828,1724,1680],{"class":845},[828,1726,1683],{"class":1424},[828,1728,1308],{"class":845},[828,1730,1731],{"class":838}," ArtiomTr/jest-coverage-report-action@v2.1.2\n",[828,1733,1734,1737,1739],{"class":830,"line":1049},[828,1735,1736],{"class":1424},"     id",[828,1738,1308],{"class":845},[828,1740,1741],{"class":838}," coverage\n",[828,1743,1744,1746],{"class":830,"line":1055},[828,1745,1704],{"class":1424},[828,1747,1556],{"class":845},[828,1749,1750,1753,1755],{"class":830,"line":1060},[828,1751,1752],{"class":1424},"       annotations",[828,1754,1308],{"class":845},[828,1756,1757],{"class":838}," none\n",[828,1759,1761,1764,1766],{"class":830,"line":1760},11,[828,1762,1763],{"class":1424},"       package-manager",[828,1765,1308],{"class":845},[828,1767,1768],{"class":838}," yarn\n",[828,1770,1772,1775,1777],{"class":830,"line":1771},12,[828,1773,1774],{"class":1424},"       test-script",[828,1776,1308],{"class":845},[828,1778,1779],{"class":838}," yarn coverage\n",[828,1781,1783,1786,1788],{"class":830,"line":1782},13,[828,1784,1785],{"class":1424},"       icons",[828,1787,1308],{"class":845},[828,1789,1790],{"class":838}," emoji\n",[12,1792,1793],{},"In the end, you will have a complete configuration like the following:",[240,1795,1797],{"className":1526,"code":1796,"language":1528,"meta":246,"style":246},"#coverage.yml\nname: 'coverage'\non:\n  pull_request:\n    branches:\n      - main\n      - develop\njobs:\n  coverage:\n    permissions:\n      checks: write\n      pull-requests: write\n      contents: write\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/setup-node@v3\n        with:\n          cache: 'yarn'\n      - uses: ArtiomTr/jest-coverage-report-action@v2.1.2\n        id: coverage\n        with:\n          annotations: none\n          package-manager: yarn\n          test-script: yarn coverage\n          icons: emoji\n",[23,1798,1799,1803,1815,1821,1827,1833,1839,1845,1851,1857,1863,1871,1879,1887,1897,1905,1916,1927,1935,1949,1960,1970,1977,1987,1997,2007],{"__ignoreMap":246},[828,1800,1801],{"class":830,"line":831},[828,1802,1535],{"class":1287},[828,1804,1805,1807,1809,1811,1813],{"class":830,"line":400},[828,1806,1302],{"class":1424},[828,1808,1308],{"class":845},[828,1810,846],{"class":845},[828,1812,1361],{"class":838},[828,1814,1548],{"class":845},[828,1816,1817,1819],{"class":830,"line":405},[828,1818,1553],{"class":1430},[828,1820,1556],{"class":845},[828,1822,1823,1825],{"class":830,"line":957},[828,1824,1561],{"class":1424},[828,1826,1556],{"class":845},[828,1828,1829,1831],{"class":830,"line":970},[828,1830,1568],{"class":1424},[828,1832,1556],{"class":845},[828,1834,1835,1837],{"class":830,"line":976},[828,1836,1575],{"class":845},[828,1838,1578],{"class":838},[828,1840,1841,1843],{"class":830,"line":1043},[828,1842,1575],{"class":845},[828,1844,1585],{"class":838},[828,1846,1847,1849],{"class":830,"line":1049},[828,1848,1604],{"class":1424},[828,1850,1556],{"class":845},[828,1852,1853,1855],{"class":830,"line":1055},[828,1854,1611],{"class":1424},[828,1856,1556],{"class":845},[828,1858,1859,1861],{"class":830,"line":1060},[828,1860,1618],{"class":1424},[828,1862,1556],{"class":845},[828,1864,1865,1867,1869],{"class":830,"line":1760},[828,1866,1625],{"class":1424},[828,1868,1308],{"class":845},[828,1870,1630],{"class":838},[828,1872,1873,1875,1877],{"class":830,"line":1771},[828,1874,1635],{"class":1424},[828,1876,1308],{"class":845},[828,1878,1630],{"class":838},[828,1880,1881,1883,1885],{"class":830,"line":1782},[828,1882,1644],{"class":1424},[828,1884,1308],{"class":845},[828,1886,1630],{"class":838},[828,1888,1890,1893,1895],{"class":830,"line":1889},14,[828,1891,1892],{"class":1424},"    runs-on",[828,1894,1308],{"class":845},[828,1896,1668],{"class":838},[828,1898,1900,1903],{"class":830,"line":1899},15,[828,1901,1902],{"class":1424},"    steps",[828,1904,1556],{"class":845},[828,1906,1908,1910,1912,1914],{"class":830,"line":1907},16,[828,1909,1575],{"class":845},[828,1911,1683],{"class":1424},[828,1913,1308],{"class":845},[828,1915,1688],{"class":838},[828,1917,1919,1921,1923,1925],{"class":830,"line":1918},17,[828,1920,1575],{"class":845},[828,1922,1683],{"class":1424},[828,1924,1308],{"class":845},[828,1926,1699],{"class":838},[828,1928,1930,1933],{"class":830,"line":1929},18,[828,1931,1932],{"class":1424},"        with",[828,1934,1556],{"class":845},[828,1936,1938,1941,1943,1945,1947],{"class":830,"line":1937},19,[828,1939,1940],{"class":1424},"          cache",[828,1942,1308],{"class":845},[828,1944,846],{"class":845},[828,1946,1718],{"class":838},[828,1948,1548],{"class":845},[828,1950,1952,1954,1956,1958],{"class":830,"line":1951},20,[828,1953,1575],{"class":845},[828,1955,1683],{"class":1424},[828,1957,1308],{"class":845},[828,1959,1731],{"class":838},[828,1961,1963,1966,1968],{"class":830,"line":1962},21,[828,1964,1965],{"class":1424},"        id",[828,1967,1308],{"class":845},[828,1969,1741],{"class":838},[828,1971,1973,1975],{"class":830,"line":1972},22,[828,1974,1932],{"class":1424},[828,1976,1556],{"class":845},[828,1978,1980,1983,1985],{"class":830,"line":1979},23,[828,1981,1982],{"class":1424},"          annotations",[828,1984,1308],{"class":845},[828,1986,1757],{"class":838},[828,1988,1990,1993,1995],{"class":830,"line":1989},24,[828,1991,1992],{"class":1424},"          package-manager",[828,1994,1308],{"class":845},[828,1996,1768],{"class":838},[828,1998,2000,2003,2005],{"class":830,"line":1999},25,[828,2001,2002],{"class":1424},"          test-script",[828,2004,1308],{"class":845},[828,2006,1779],{"class":838},[828,2008,2010,2013,2015],{"class":830,"line":2009},26,[828,2011,2012],{"class":1424},"          icons",[828,2014,1308],{"class":845},[828,2016,1790],{"class":838},[12,2018,2019],{},"I share the final result, once you execute your GitHub action, which we can observe as our report the percentages, the number of tests, and the number of test suites that were executed at that moment.",[12,2021,2022],{},"Also mention that the report is executed again if a new commit is made to the PR.",[12,2024,2025],{},[15,2026],{"alt":2027,"src":2028},"Pull request","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1779231244/pull-request_jmcnhs.webp",[12,2030,2031],{},"In summary, coverage of Jest unit tests using GitHub Actions is important because it helps you:",[896,2033,2034,2037,2040,2043,2046],{},[86,2035,2036],{},"Ensure that your code is well-tested.",[86,2038,2039],{},"Reduce the risk of introducing bugs into your code.",[86,2041,2042],{},"Easily track the quality of your tests over time.",[86,2044,2045],{},"Communicate the quality of your tests to others.",[86,2047,2048],{},"Build confidence in your development process.",[12,2050,2051],{},"Thank you for reading! we read soon. 🙌🏽🙌🏽",[1209,2053,2054],{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}",{"title":246,"searchDepth":400,"depth":400,"links":2056},[2057],{"id":1264,"depth":400,"text":1265},"2023-02-03T00:00:00.000Z","Discover how to set up a GitHub Action to generate and visualize coverage reports for Jest unit tests.",{},"/articles/en/coverage-of-jest-unit-tests-using-github-action",{"title":1231,"description":2059},{"loc":2061},"articles/en/coverage-of-jest-unit-tests-using-github-action",[2066,2067,2068,2069],"jest","github-action","javascript","webdev","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1779231244/thumbnail_dwb5ue.webp","m9QjUXQANBcf9TmLNyxpQHSO9Oi-jmSseAoo7BMTaS4",{"id":2073,"title":2074,"author":7,"body":2075,"date":2818,"description":2819,"extension":419,"meta":2820,"navigation":421,"path":2821,"seo":2822,"sitemap":2823,"stem":2824,"tags":2825,"thumbnail":2828,"__hash__":2829},"en_articles/articles/en/creating-custom-routes-in-nuxt3.md","Creating Custom Routes in Nuxt3 (Without Losing Your Mind)",{"type":9,"value":2076,"toc":2815},[2077,2080,2083,2087,2090,2093,2290,2300,2303,2373,2376,2379,2451,2454,2676,2679,2810,2812],[12,2078,2079],{},"I'd like to share an experience I had a couple of days ago during a work challenge, which may have happened to you or could happen to you if you use Nuxt3. Let's jump!",[12,2081,2082],{},"In Nuxt3, the routing system is based on the file structure within the pages directory, which facilitates automatic route creation. However, being built on top of vue-router, Nuxt3 also allows for flexible custom routes. This gives you the ability to extend or modify the router's behavior to suit your project's specific needs (I needed to have dynamic routes to manage subdomains for different types of users, but end users can also use the application in embed or normal format, the latter using the same components, I just needed to modify the routes).",[60,2084,2086],{"id":2085},"so-how-do-we-achieve-this","So, how do we achieve this?",[12,2088,2089],{},"We must be located inside the app/ directory because that folder is specifically designed to extend or customize the internal behavior of the framework.",[12,2091,2092],{},"Then, we can create a router.options.ts file, using router options we can optionally override or extend your routes using a function that accepts the scanned routes and returns customized routes. The following example code.",[240,2094,2098],{"className":2095,"code":2096,"language":2097,"meta":246,"style":246},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","// app/router.options.ts\n// Import the RouterConfig type for proper typing\nimport type { RouterConfig } from '@nuxt/schema'\n\nexport default {\n  // Define custom routes manually\n  routes: (_routes) => [\n    {\n      // Route name (used in programmatic navigation)\n      name: 'home',\n      // URL path\n      path: '/',\n      // Lazy-load the component\n      component: () => import('~/pages/home.vue')\n    }\n  ],\n} satisfies RouterConfig;\n// Ensures the object matches Nuxt's expected router config\n\n","ts",[23,2099,2100,2105,2110,2138,2142,2152,2157,2180,2185,2190,2206,2211,2227,2232,2260,2265,2272,2285],{"__ignoreMap":246},[828,2101,2102],{"class":830,"line":831},[828,2103,2104],{"class":1287},"// app/router.options.ts\n",[828,2106,2107],{"class":830,"line":400},[828,2108,2109],{"class":1287},"// Import the RouterConfig type for proper typing\n",[828,2111,2112,2116,2119,2122,2125,2128,2131,2133,2136],{"class":830,"line":405},[828,2113,2115],{"class":2114},"s7zQu","import",[828,2117,2118],{"class":2114}," type",[828,2120,2121],{"class":845}," {",[828,2123,2124],{"class":1443}," RouterConfig",[828,2126,2127],{"class":845}," }",[828,2129,2130],{"class":2114}," from",[828,2132,846],{"class":845},[828,2134,2135],{"class":838},"@nuxt/schema",[828,2137,1548],{"class":845},[828,2139,2140],{"class":830,"line":957},[828,2141,973],{"emptyLinePlaceholder":421},[828,2143,2144,2147,2150],{"class":830,"line":970},[828,2145,2146],{"class":2114},"export",[828,2148,2149],{"class":2114}," default",[828,2151,1353],{"class":845},[828,2153,2154],{"class":830,"line":976},[828,2155,2156],{"class":1287},"  // Define custom routes manually\n",[828,2158,2159,2162,2164,2167,2171,2174,2177],{"class":830,"line":1043},[828,2160,2161],{"class":1136},"  routes",[828,2163,1308],{"class":845},[828,2165,2166],{"class":845}," (",[828,2168,2170],{"class":2169},"sHdIc","_routes",[828,2172,2173],{"class":845},")",[828,2175,2176],{"class":1301}," =>",[828,2178,2179],{"class":1443}," [\n",[828,2181,2182],{"class":830,"line":1049},[828,2183,2184],{"class":845},"    {\n",[828,2186,2187],{"class":830,"line":1055},[828,2188,2189],{"class":1287},"      // Route name (used in programmatic navigation)\n",[828,2191,2192,2195,2197,2199,2202,2204],{"class":830,"line":1060},[828,2193,2194],{"class":1424},"      name",[828,2196,1308],{"class":845},[828,2198,846],{"class":845},[828,2200,2201],{"class":838},"home",[828,2203,852],{"class":845},[828,2205,1319],{"class":845},[828,2207,2208],{"class":830,"line":1760},[828,2209,2210],{"class":1287},"      // URL path\n",[828,2212,2213,2216,2218,2220,2223,2225],{"class":830,"line":1771},[828,2214,2215],{"class":1424},"      path",[828,2217,1308],{"class":845},[828,2219,846],{"class":845},[828,2221,2222],{"class":838},"/",[828,2224,852],{"class":845},[828,2226,1319],{"class":845},[828,2228,2229],{"class":830,"line":1782},[828,2230,2231],{"class":1287},"      // Lazy-load the component\n",[828,2233,2234,2237,2239,2242,2244,2247,2250,2252,2255,2257],{"class":830,"line":1889},[828,2235,2236],{"class":1136},"      component",[828,2238,1308],{"class":845},[828,2240,2241],{"class":845}," ()",[828,2243,2176],{"class":1301},[828,2245,2246],{"class":845}," import",[828,2248,2249],{"class":1443},"(",[828,2251,852],{"class":845},[828,2253,2254],{"class":838},"~/pages/home.vue",[828,2256,852],{"class":845},[828,2258,2259],{"class":1443},")\n",[828,2261,2262],{"class":830,"line":1899},[828,2263,2264],{"class":845},"    }\n",[828,2266,2267,2270],{"class":830,"line":1907},[828,2268,2269],{"class":1443},"  ]",[828,2271,1319],{"class":845},[828,2273,2274,2277,2280,2282],{"class":830,"line":1918},[828,2275,2276],{"class":845},"}",[828,2278,2279],{"class":2114}," satisfies",[828,2281,2124],{"class":834},[828,2283,2284],{"class":845},";\n",[828,2286,2287],{"class":830,"line":1929},[828,2288,2289],{"class":1287},"// Ensures the object matches Nuxt's expected router config\n",[2291,2292,2293],"note",{},[12,2294,2295,2296],{},"Documentation reference: ",[161,2297,2298],{"href":2298,"rel":2299},"https://nuxt.com/docs/guide/recipes/custom-routing#router-options",[166],[12,2301,2302],{},"Something that cannot be seen directly in the documentation link is that if we need to override our routes manually, the automatic route system must be disabled from the pages option in our nuxt.config.ts",[240,2304,2306],{"className":2095,"code":2305,"language":2097,"meta":246,"style":246},"// nuxt.config.ts\nexport default defineNuxtConfig({\n  devtools: { enabled: true },\n  // ...our_config,\n  pages: false, // Add this code (by default is true)\n});\n",[23,2307,2308,2313,2326,2345,2350,2365],{"__ignoreMap":246},[828,2309,2310],{"class":830,"line":831},[828,2311,2312],{"class":1287},"// nuxt.config.ts\n",[828,2314,2315,2317,2319,2322,2324],{"class":830,"line":400},[828,2316,2146],{"class":2114},[828,2318,2149],{"class":2114},[828,2320,2321],{"class":1136}," defineNuxtConfig",[828,2323,2249],{"class":1443},[828,2325,1293],{"class":845},[828,2327,2328,2331,2333,2335,2338,2340,2342],{"class":830,"line":405},[828,2329,2330],{"class":1424},"  devtools",[828,2332,1308],{"class":845},[828,2334,2121],{"class":845},[828,2336,2337],{"class":1424}," enabled",[828,2339,1308],{"class":845},[828,2341,1431],{"class":1430},[828,2343,2344],{"class":845}," },\n",[828,2346,2347],{"class":830,"line":957},[828,2348,2349],{"class":1287},"  // ...our_config,\n",[828,2351,2352,2355,2357,2360,2362],{"class":830,"line":970},[828,2353,2354],{"class":1424},"  pages",[828,2356,1308],{"class":845},[828,2358,2359],{"class":1430}," false",[828,2361,1454],{"class":845},[828,2363,2364],{"class":1287}," // Add this code (by default is true)\n",[828,2366,2367,2369,2371],{"class":830,"line":976},[828,2368,2276],{"class":845},[828,2370,2173],{"class":1443},[828,2372,2284],{"class":845},[12,2374,2375],{},"Before I go, I would like to share an extra tip that can help you organize your routes better and avoid having an extremely large file if your project will have many routes.",[12,2377,2378],{},"You can create a route-only import file (you can call it router.imports.ts).",[240,2380,2382],{"className":2095,"code":2381,"language":2097,"meta":246,"style":246},"// router.imports.ts\nexport { default as WebsiteHome } from '~~/pages/website/home.vue';\nexport { default as WebsiteAbout } from '~~/pages/website/about.vue';\n...\n...\n",[23,2383,2384,2389,2416,2442,2447],{"__ignoreMap":246},[828,2385,2386],{"class":830,"line":831},[828,2387,2388],{"class":1287},"// router.imports.ts\n",[828,2390,2391,2393,2395,2397,2400,2403,2405,2407,2409,2412,2414],{"class":830,"line":400},[828,2392,2146],{"class":2114},[828,2394,2121],{"class":845},[828,2396,2149],{"class":2114},[828,2398,2399],{"class":2114}," as",[828,2401,2402],{"class":1443}," WebsiteHome",[828,2404,2127],{"class":845},[828,2406,2130],{"class":2114},[828,2408,846],{"class":845},[828,2410,2411],{"class":838},"~~/pages/website/home.vue",[828,2413,852],{"class":845},[828,2415,2284],{"class":845},[828,2417,2418,2420,2422,2424,2426,2429,2431,2433,2435,2438,2440],{"class":830,"line":405},[828,2419,2146],{"class":2114},[828,2421,2121],{"class":845},[828,2423,2149],{"class":2114},[828,2425,2399],{"class":2114},[828,2427,2428],{"class":1443}," WebsiteAbout",[828,2430,2127],{"class":845},[828,2432,2130],{"class":2114},[828,2434,846],{"class":845},[828,2436,2437],{"class":838},"~~/pages/website/about.vue",[828,2439,852],{"class":845},[828,2441,2284],{"class":845},[828,2443,2444],{"class":830,"line":957},[828,2445,2446],{"class":845},"...\n",[828,2448,2449],{"class":830,"line":970},[828,2450,2446],{"class":845},[12,2452,2453],{},"Now we can create another barrel file for route definition (website.routes.ts)",[240,2455,2457],{"className":2095,"code":2456,"language":2097,"meta":246,"style":246},"// website.routes.ts\nimport {\n  WebsiteHome,\n  WebsiteAbout\n} from './routes.import';\n\nconst websiteChildren = [\n  {\n    name: 'WebsiteHome',\n    path: '',\n    component: WebsiteHome,\n  },\n  {\n    name: 'Website',\n    path: 'about',\n    component: WebsiteAbout,\n  },\n]\n\nexport const websiteRoutes = {\n  name: 'WebsiteRoot',\n  path: '',\n  children: websiteChildren,\n}\n",[23,2458,2459,2464,2470,2477,2482,2497,2501,2514,2519,2535,2547,2558,2563,2567,2582,2597,2607,2611,2615,2619,2633,2649,2660,2672],{"__ignoreMap":246},[828,2460,2461],{"class":830,"line":831},[828,2462,2463],{"class":1287},"// website.routes.ts\n",[828,2465,2466,2468],{"class":830,"line":400},[828,2467,2115],{"class":2114},[828,2469,1353],{"class":845},[828,2471,2472,2475],{"class":830,"line":405},[828,2473,2474],{"class":1443},"  WebsiteHome",[828,2476,1319],{"class":845},[828,2478,2479],{"class":830,"line":957},[828,2480,2481],{"class":1443},"  WebsiteAbout\n",[828,2483,2484,2486,2488,2490,2493,2495],{"class":830,"line":970},[828,2485,2276],{"class":845},[828,2487,2130],{"class":2114},[828,2489,846],{"class":845},[828,2491,2492],{"class":838},"./routes.import",[828,2494,852],{"class":845},[828,2496,2284],{"class":845},[828,2498,2499],{"class":830,"line":976},[828,2500,973],{"emptyLinePlaceholder":421},[828,2502,2503,2506,2509,2512],{"class":830,"line":1043},[828,2504,2505],{"class":1301},"const",[828,2507,2508],{"class":1443}," websiteChildren ",[828,2510,2511],{"class":845},"=",[828,2513,2179],{"class":1443},[828,2515,2516],{"class":830,"line":1049},[828,2517,2518],{"class":845},"  {\n",[828,2520,2521,2524,2526,2528,2531,2533],{"class":830,"line":1055},[828,2522,2523],{"class":1424},"    name",[828,2525,1308],{"class":845},[828,2527,846],{"class":845},[828,2529,2530],{"class":838},"WebsiteHome",[828,2532,852],{"class":845},[828,2534,1319],{"class":845},[828,2536,2537,2540,2542,2545],{"class":830,"line":1060},[828,2538,2539],{"class":1424},"    path",[828,2541,1308],{"class":845},[828,2543,2544],{"class":845}," ''",[828,2546,1319],{"class":845},[828,2548,2549,2552,2554,2556],{"class":830,"line":1760},[828,2550,2551],{"class":1424},"    component",[828,2553,1308],{"class":845},[828,2555,2402],{"class":1443},[828,2557,1319],{"class":845},[828,2559,2560],{"class":830,"line":1771},[828,2561,2562],{"class":845},"  },\n",[828,2564,2565],{"class":830,"line":1782},[828,2566,2518],{"class":845},[828,2568,2569,2571,2573,2575,2578,2580],{"class":830,"line":1889},[828,2570,2523],{"class":1424},[828,2572,1308],{"class":845},[828,2574,846],{"class":845},[828,2576,2577],{"class":838},"Website",[828,2579,852],{"class":845},[828,2581,1319],{"class":845},[828,2583,2584,2586,2588,2590,2593,2595],{"class":830,"line":1899},[828,2585,2539],{"class":1424},[828,2587,1308],{"class":845},[828,2589,846],{"class":845},[828,2591,2592],{"class":838},"about",[828,2594,852],{"class":845},[828,2596,1319],{"class":845},[828,2598,2599,2601,2603,2605],{"class":830,"line":1907},[828,2600,2551],{"class":1424},[828,2602,1308],{"class":845},[828,2604,2428],{"class":1443},[828,2606,1319],{"class":845},[828,2608,2609],{"class":830,"line":1918},[828,2610,2562],{"class":845},[828,2612,2613],{"class":830,"line":1929},[828,2614,1494],{"class":1443},[828,2616,2617],{"class":830,"line":1937},[828,2618,973],{"emptyLinePlaceholder":421},[828,2620,2621,2623,2626,2629,2631],{"class":830,"line":1951},[828,2622,2146],{"class":2114},[828,2624,2625],{"class":1301}," const",[828,2627,2628],{"class":1443}," websiteRoutes ",[828,2630,2511],{"class":845},[828,2632,1353],{"class":845},[828,2634,2635,2638,2640,2642,2645,2647],{"class":830,"line":1962},[828,2636,2637],{"class":1424},"  name",[828,2639,1308],{"class":845},[828,2641,846],{"class":845},[828,2643,2644],{"class":838},"WebsiteRoot",[828,2646,852],{"class":845},[828,2648,1319],{"class":845},[828,2650,2651,2654,2656,2658],{"class":830,"line":1972},[828,2652,2653],{"class":1424},"  path",[828,2655,1308],{"class":845},[828,2657,2544],{"class":845},[828,2659,1319],{"class":845},[828,2661,2662,2665,2667,2670],{"class":830,"line":1979},[828,2663,2664],{"class":1424},"  children",[828,2666,1308],{"class":845},[828,2668,2669],{"class":1443}," websiteChildren",[828,2671,1319],{"class":845},[828,2673,2674],{"class":830,"line":1989},[828,2675,1388],{"class":845},[12,2677,2678],{},"Finally, we can use our router.options.ts with the route imports defined like this:",[240,2680,2682],{"className":2095,"code":2681,"language":2097,"meta":246,"style":246},"import type { RouterConfig } from '@nuxt/schema';\nimport { exampleRoutes } from './example.routes';\nimport { websiteRoutes } from './website.routes'\n\nexport default {\n  routes: (_routes) => [\n    exampleRoutes,\n    websiteRoutes,\n    //...\n  ],\n} satisfies RouterConfig\n\n",[23,2683,2684,2706,2728,2748,2752,2760,2776,2783,2790,2795,2801],{"__ignoreMap":246},[828,2685,2686,2688,2690,2692,2694,2696,2698,2700,2702,2704],{"class":830,"line":831},[828,2687,2115],{"class":2114},[828,2689,2118],{"class":2114},[828,2691,2121],{"class":845},[828,2693,2124],{"class":1443},[828,2695,2127],{"class":845},[828,2697,2130],{"class":2114},[828,2699,846],{"class":845},[828,2701,2135],{"class":838},[828,2703,852],{"class":845},[828,2705,2284],{"class":845},[828,2707,2708,2710,2712,2715,2717,2719,2721,2724,2726],{"class":830,"line":400},[828,2709,2115],{"class":2114},[828,2711,2121],{"class":845},[828,2713,2714],{"class":1443}," exampleRoutes",[828,2716,2127],{"class":845},[828,2718,2130],{"class":2114},[828,2720,846],{"class":845},[828,2722,2723],{"class":838},"./example.routes",[828,2725,852],{"class":845},[828,2727,2284],{"class":845},[828,2729,2730,2732,2734,2737,2739,2741,2743,2746],{"class":830,"line":405},[828,2731,2115],{"class":2114},[828,2733,2121],{"class":845},[828,2735,2736],{"class":1443}," websiteRoutes",[828,2738,2127],{"class":845},[828,2740,2130],{"class":2114},[828,2742,846],{"class":845},[828,2744,2745],{"class":838},"./website.routes",[828,2747,1548],{"class":845},[828,2749,2750],{"class":830,"line":957},[828,2751,973],{"emptyLinePlaceholder":421},[828,2753,2754,2756,2758],{"class":830,"line":970},[828,2755,2146],{"class":2114},[828,2757,2149],{"class":2114},[828,2759,1353],{"class":845},[828,2761,2762,2764,2766,2768,2770,2772,2774],{"class":830,"line":976},[828,2763,2161],{"class":1136},[828,2765,1308],{"class":845},[828,2767,2166],{"class":845},[828,2769,2170],{"class":2169},[828,2771,2173],{"class":845},[828,2773,2176],{"class":1301},[828,2775,2179],{"class":1443},[828,2777,2778,2781],{"class":830,"line":1043},[828,2779,2780],{"class":1443},"    exampleRoutes",[828,2782,1319],{"class":845},[828,2784,2785,2788],{"class":830,"line":1049},[828,2786,2787],{"class":1443},"    websiteRoutes",[828,2789,1319],{"class":845},[828,2791,2792],{"class":830,"line":1055},[828,2793,2794],{"class":1287},"    //...\n",[828,2796,2797,2799],{"class":830,"line":1060},[828,2798,2269],{"class":1443},[828,2800,1319],{"class":845},[828,2802,2803,2805,2807],{"class":830,"line":1760},[828,2804,2276],{"class":845},[828,2806,2279],{"class":2114},[828,2808,2809],{"class":834}," RouterConfig\n",[12,2811,1207],{},[1209,2813,2814],{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":246,"searchDepth":400,"depth":400,"links":2816},[2817],{"id":2085,"depth":400,"text":2086},"2025-05-05T00:00:00.000Z","Learn how to create custom routes in Nuxt 3 without losing your mind, how to disable automatic routing, and how to organize your route files with a clean architecture.",{},"/articles/en/creating-custom-routes-in-nuxt3",{"title":2074,"description":2819},{"loc":2821},"articles/en/creating-custom-routes-in-nuxt3",[2826,2827,2068,2069],"nuxt3","vue","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1779231246/creating-custom-routes-in-nuxt3_brrrmq.webp","uwtvgF3lh1OBLbpkxOKHwwub_ofXihqCNTaVLHLC4vo",{"id":2831,"title":2832,"author":7,"body":2833,"date":5554,"description":5555,"extension":419,"meta":5556,"navigation":421,"path":5557,"seo":5558,"sitemap":5559,"stem":5560,"tags":5561,"thumbnail":5563,"__hash__":5564},"en_articles/articles/en/effortlessly-build-and-test-your-frontend-applications-with-vitepress.md","Effortlessly Build and Test Your Frontend Applications with VitePress: A Step-by-Step Tutorial to Create a Blog",{"type":9,"value":2834,"toc":5548},[2835,2838,2841,2845,2853,2875,2880,2892,2897,2927,2932,2937,3044,3049,3096,3101,3387,3391,3394,3397,3404,3409,3979,3984,4004,4008,4013,4249,4254,4639,4644,5114,5125,5525,5528,5537,5543,5545],[12,2836,2837],{},"First of all, we must talk about what is vitepress. VitePress is a modern static site generator based on the Vite front-end build tool. It is designed to be fast and efficient, making it a great choice for building small to medium-sized websites and blogs. With its easy-to-use interface and compatibility with a wide range of technologies, including Vue.js, JavaScript, and CSS, VitePress is a versatile option for front-end development.",[12,2839,2840],{},"Here’s how to get started with VitePress:",[60,2842,2844],{"id":2843},"installation","Installation",[896,2846,2847,2850],{},[86,2848,2849],{},"Install Node.js and yarn or npm if you haven’t already.",[86,2851,2852],{},"Create a new folder project.",[240,2854,2856],{"className":822,"code":2855,"language":824,"meta":246,"style":246},"mkdir vitepress-project && cd vitepress-project\n",[23,2857,2858],{"__ignoreMap":246},[828,2859,2860,2863,2866,2869,2872],{"class":830,"line":831},[828,2861,2862],{"class":834},"mkdir",[828,2864,2865],{"class":838}," vitepress-project",[828,2867,2868],{"class":845}," &&",[828,2870,2871],{"class":1136}," cd",[828,2873,2874],{"class":838}," vitepress-project\n",[896,2876,2877],{"start":405},[86,2878,2879],{},"Initialize our project with your preferred package manager.",[240,2881,2883],{"className":822,"code":2882,"language":824,"meta":246,"style":246},"yarn init\n",[23,2884,2885],{"__ignoreMap":246},[828,2886,2887,2889],{"class":830,"line":831},[828,2888,1718],{"class":834},[828,2890,2891],{"class":838}," init\n",[896,2893,2894],{"start":957},[86,2895,2896],{},"Now, install some packages including vitePress. (These last 4 will help create our collection of JSON pages).",[240,2898,2900],{"className":822,"code":2899,"language":824,"meta":246,"style":246},"yarn add vitepress vue nodemon gray-matter remove-markdown concurrently\n",[23,2901,2902],{"__ignoreMap":246},[828,2903,2904,2906,2909,2912,2915,2918,2921,2924],{"class":830,"line":831},[828,2905,1718],{"class":834},[828,2907,2908],{"class":838}," add",[828,2910,2911],{"class":838}," vitepress",[828,2913,2914],{"class":838}," vue",[828,2916,2917],{"class":838}," nodemon",[828,2919,2920],{"class":838}," gray-matter",[828,2922,2923],{"class":838}," remove-markdown",[828,2925,2926],{"class":838}," concurrently\n",[896,2928,2929],{"start":970},[86,2930,2931],{},"Set up our scripts in package.json.",[905,2933,2934],{},[12,2935,2936],{},"NOTE: Every time we run our development environment, the data collection mentioned below will be updated.",[240,2938,2940],{"className":1278,"code":2939,"language":1280,"meta":246,"style":246},"{\n  ...\n  \"scripts\": {\n    \"dev\": \"concurrently \\\"nodemon --watch blog -e md collection.mjs\\\" && vitepress dev\",\n    \"build\": \"node collection.mjs && vitepress build\",\n    \"preview\": \"vitepress preview\"\n  },\n  ...\n}\n",[23,2941,2942,2946,2951,2963,2994,3014,3032,3036,3040],{"__ignoreMap":246},[828,2943,2944],{"class":830,"line":831},[828,2945,1293],{"class":845},[828,2947,2948],{"class":830,"line":400},[828,2949,2950],{"class":1443},"  ...\n",[828,2952,2953,2955,2957,2959,2961],{"class":830,"line":405},[828,2954,1298],{"class":845},[828,2956,1346],{"class":1301},[828,2958,1305],{"class":845},[828,2960,1308],{"class":845},[828,2962,1353],{"class":845},[828,2964,2965,2967,2970,2972,2974,2976,2979,2982,2985,2987,2990,2992],{"class":830,"line":957},[828,2966,1358],{"class":845},[828,2968,2969],{"class":834},"dev",[828,2971,1305],{"class":845},[828,2973,1308],{"class":845},[828,2975,1311],{"class":845},[828,2977,2978],{"class":838},"concurrently ",[828,2980,2981],{"class":1443},"\\\"",[828,2983,2984],{"class":838},"nodemon --watch blog -e md collection.mjs",[828,2986,2981],{"class":1443},[828,2988,2989],{"class":838}," && vitepress dev",[828,2991,1305],{"class":845},[828,2993,1319],{"class":845},[828,2995,2996,2998,3001,3003,3005,3007,3010,3012],{"class":830,"line":970},[828,2997,1358],{"class":845},[828,2999,3000],{"class":834},"build",[828,3002,1305],{"class":845},[828,3004,1308],{"class":845},[828,3006,1311],{"class":845},[828,3008,3009],{"class":838},"node collection.mjs && vitepress build",[828,3011,1305],{"class":845},[828,3013,1319],{"class":845},[828,3015,3016,3018,3021,3023,3025,3027,3030],{"class":830,"line":976},[828,3017,1358],{"class":845},[828,3019,3020],{"class":834},"preview",[828,3022,1305],{"class":845},[828,3024,1308],{"class":845},[828,3026,1311],{"class":845},[828,3028,3029],{"class":838},"vitepress preview",[828,3031,1373],{"class":845},[828,3033,3034],{"class":830,"line":1043},[828,3035,2562],{"class":845},[828,3037,3038],{"class":830,"line":1049},[828,3039,2950],{"class":1443},[828,3041,3042],{"class":830,"line":1055},[828,3043,1388],{"class":845},[896,3045,3046],{"start":976},[86,3047,3048],{},"Create our first views.",[240,3050,3052],{"className":822,"code":3051,"language":824,"meta":246,"style":246},"echo '# Hello from Index' > index.md\nmkdir blog && echo '# Hello from First Article' > blog/first_article.md\n",[23,3053,3054,3072],{"__ignoreMap":246},[828,3055,3056,3059,3061,3064,3066,3069],{"class":830,"line":831},[828,3057,3058],{"class":1136},"echo",[828,3060,846],{"class":845},[828,3062,3063],{"class":838},"# Hello from Index",[828,3065,852],{"class":845},[828,3067,3068],{"class":845}," >",[828,3070,3071],{"class":838}," index.md\n",[828,3073,3074,3076,3079,3081,3084,3086,3089,3091,3093],{"class":830,"line":400},[828,3075,2862],{"class":834},[828,3077,3078],{"class":838}," blog",[828,3080,2868],{"class":845},[828,3082,3083],{"class":1136}," echo",[828,3085,846],{"class":845},[828,3087,3088],{"class":838},"# Hello from First Article",[828,3090,852],{"class":845},[828,3092,3068],{"class":845},[828,3094,3095],{"class":838}," blog/first_article.md\n",[896,3097,3098],{"start":1043},[86,3099,3100],{},"It is also possible to configure our project, for SEO, and themes, among others. Here is an example:",[240,3102,3104],{"className":1400,"code":3103,"language":1402,"meta":246,"style":246},"// .vitepress/config.js\nconst META_TITLE = 'Blog VitePress';\n\nexport default {\n  lang: 'es',\n  title: META_TITLE,\n  description: 'A new website',\n  themeConfig: {\n    siteTitle: false,\n    socialLinks: [\n      { icon: 'github', link: '' },\n    ]\n  },\n  head: [\n    ['link', { rel: 'icon', type: 'image/x-icon', href: '/vite.ico' }],\n    ['link', { rel: 'icon', type: 'image/png', href: '/vite.png' }],\n  ],\n}\n",[23,3105,3106,3111,3129,3133,3141,3157,3169,3185,3194,3205,3214,3242,3247,3251,3260,3321,3377,3383],{"__ignoreMap":246},[828,3107,3108],{"class":830,"line":831},[828,3109,3110],{"class":1287},"// .vitepress/config.js\n",[828,3112,3113,3115,3118,3120,3122,3125,3127],{"class":830,"line":400},[828,3114,2505],{"class":1301},[828,3116,3117],{"class":1443}," META_TITLE ",[828,3119,2511],{"class":845},[828,3121,846],{"class":845},[828,3123,3124],{"class":838},"Blog VitePress",[828,3126,852],{"class":845},[828,3128,2284],{"class":845},[828,3130,3131],{"class":830,"line":405},[828,3132,973],{"emptyLinePlaceholder":421},[828,3134,3135,3137,3139],{"class":830,"line":957},[828,3136,2146],{"class":2114},[828,3138,2149],{"class":2114},[828,3140,1353],{"class":845},[828,3142,3143,3146,3148,3150,3153,3155],{"class":830,"line":970},[828,3144,3145],{"class":1424},"  lang",[828,3147,1308],{"class":845},[828,3149,846],{"class":845},[828,3151,3152],{"class":838},"es",[828,3154,852],{"class":845},[828,3156,1319],{"class":845},[828,3158,3159,3162,3164,3167],{"class":830,"line":976},[828,3160,3161],{"class":1424},"  title",[828,3163,1308],{"class":845},[828,3165,3166],{"class":1443}," META_TITLE",[828,3168,1319],{"class":845},[828,3170,3171,3174,3176,3178,3181,3183],{"class":830,"line":1043},[828,3172,3173],{"class":1424},"  description",[828,3175,1308],{"class":845},[828,3177,846],{"class":845},[828,3179,3180],{"class":838},"A new website",[828,3182,852],{"class":845},[828,3184,1319],{"class":845},[828,3186,3187,3190,3192],{"class":830,"line":1049},[828,3188,3189],{"class":1424},"  themeConfig",[828,3191,1308],{"class":845},[828,3193,1353],{"class":845},[828,3195,3196,3199,3201,3203],{"class":830,"line":1055},[828,3197,3198],{"class":1424},"    siteTitle",[828,3200,1308],{"class":845},[828,3202,2359],{"class":1430},[828,3204,1319],{"class":845},[828,3206,3207,3210,3212],{"class":830,"line":1060},[828,3208,3209],{"class":1424},"    socialLinks",[828,3211,1308],{"class":845},[828,3213,2179],{"class":1443},[828,3215,3216,3219,3222,3224,3226,3229,3231,3233,3236,3238,3240],{"class":830,"line":1760},[828,3217,3218],{"class":845},"      {",[828,3220,3221],{"class":1424}," icon",[828,3223,1308],{"class":845},[828,3225,846],{"class":845},[828,3227,3228],{"class":838},"github",[828,3230,852],{"class":845},[828,3232,1454],{"class":845},[828,3234,3235],{"class":1424}," link",[828,3237,1308],{"class":845},[828,3239,2544],{"class":845},[828,3241,2344],{"class":845},[828,3243,3244],{"class":830,"line":1771},[828,3245,3246],{"class":1443},"    ]\n",[828,3248,3249],{"class":830,"line":1782},[828,3250,2562],{"class":845},[828,3252,3253,3256,3258],{"class":830,"line":1889},[828,3254,3255],{"class":1424},"  head",[828,3257,1308],{"class":845},[828,3259,2179],{"class":1443},[828,3261,3262,3265,3267,3270,3272,3274,3276,3279,3281,3283,3286,3288,3290,3292,3294,3296,3299,3301,3303,3306,3308,3310,3313,3315,3317,3319],{"class":830,"line":1899},[828,3263,3264],{"class":1443},"    [",[828,3266,852],{"class":845},[828,3268,3269],{"class":838},"link",[828,3271,852],{"class":845},[828,3273,1454],{"class":845},[828,3275,2121],{"class":845},[828,3277,3278],{"class":1424}," rel",[828,3280,1308],{"class":845},[828,3282,846],{"class":845},[828,3284,3285],{"class":838},"icon",[828,3287,852],{"class":845},[828,3289,1454],{"class":845},[828,3291,2118],{"class":1424},[828,3293,1308],{"class":845},[828,3295,846],{"class":845},[828,3297,3298],{"class":838},"image/x-icon",[828,3300,852],{"class":845},[828,3302,1454],{"class":845},[828,3304,3305],{"class":1424}," href",[828,3307,1308],{"class":845},[828,3309,846],{"class":845},[828,3311,3312],{"class":838},"/vite.ico",[828,3314,852],{"class":845},[828,3316,2127],{"class":845},[828,3318,1464],{"class":1443},[828,3320,1319],{"class":845},[828,3322,3323,3325,3327,3329,3331,3333,3335,3337,3339,3341,3343,3345,3347,3349,3351,3353,3356,3358,3360,3362,3364,3366,3369,3371,3373,3375],{"class":830,"line":1907},[828,3324,3264],{"class":1443},[828,3326,852],{"class":845},[828,3328,3269],{"class":838},[828,3330,852],{"class":845},[828,3332,1454],{"class":845},[828,3334,2121],{"class":845},[828,3336,3278],{"class":1424},[828,3338,1308],{"class":845},[828,3340,846],{"class":845},[828,3342,3285],{"class":838},[828,3344,852],{"class":845},[828,3346,1454],{"class":845},[828,3348,2118],{"class":1424},[828,3350,1308],{"class":845},[828,3352,846],{"class":845},[828,3354,3355],{"class":838},"image/png",[828,3357,852],{"class":845},[828,3359,1454],{"class":845},[828,3361,3305],{"class":1424},[828,3363,1308],{"class":845},[828,3365,846],{"class":845},[828,3367,3368],{"class":838},"/vite.png",[828,3370,852],{"class":845},[828,3372,2127],{"class":845},[828,3374,1464],{"class":1443},[828,3376,1319],{"class":845},[828,3378,3379,3381],{"class":830,"line":1918},[828,3380,2269],{"class":1443},[828,3382,1319],{"class":845},[828,3384,3385],{"class":830,"line":1929},[828,3386,1388],{"class":845},[60,3388,3390],{"id":3389},"convert-our-markdown-pages-to-a-json-collection","Convert our markdown pages to a JSON collection",[12,3392,3393],{},"Why is it important? 🤔🤔",[12,3395,3396],{},"The answer is simple, the collections help us to create previews of our articles without the need to create double information. (It’s like we have an API)",[12,3398,3399,3400,3403],{},"This is possible thanks to ",[89,3401,3402],{},"nodemon, gray-matter, remove-markdown, simultaneously",". Which work together to process and convert a markdown file to a JSON file.",[896,3405,3406],{},[86,3407,3408],{},"Configure our collection data articles.",[240,3410,3412],{"className":1400,"code":3411,"language":1402,"meta":246,"style":246},"// collection.mjs\nimport fs from 'node:fs/promises';\nimport matter from 'gray-matter';\nimport removeMd from 'remove-markdown';\n\nconst articles = await fs.readdir('./blog/');\n\nconst data = await Promise.all(\n  articles.map(async (article) => {\n    const file = matter.read(`./blog/${article}`, {\n      excerpt: true,\n      excerpt_separator: ''\n    });\n\n    const { data, content, path } = file;\n    const contents = removeMd(content).trim().split(/\\r\\n|\\n|\\r/);\n\n    return {\n      ...data,\n      title: contents[0].replace(/\\s{2,}/g, '').trim(),\n      path: path.replace(/\\.md$/, '.html'),\n      description: contents.slice(1).join('').replace(/\\s{2,}/g, '').trim().substring(0, 300) + '...'\n    }\n  })\n)\n\nawait fs.writeFile('./data.json', JSON.stringify(data), 'utf-8');\n",[23,3413,3414,3419,3438,3456,3474,3478,3511,3515,3537,3563,3599,3610,3620,3629,3633,3660,3716,3720,3727,3737,3787,3826,3912,3916,3923,3927,3931],{"__ignoreMap":246},[828,3415,3416],{"class":830,"line":831},[828,3417,3418],{"class":1287},"// collection.mjs\n",[828,3420,3421,3423,3426,3429,3431,3434,3436],{"class":830,"line":400},[828,3422,2115],{"class":2114},[828,3424,3425],{"class":1443}," fs ",[828,3427,3428],{"class":2114},"from",[828,3430,846],{"class":845},[828,3432,3433],{"class":838},"node:fs/promises",[828,3435,852],{"class":845},[828,3437,2284],{"class":845},[828,3439,3440,3442,3445,3447,3449,3452,3454],{"class":830,"line":405},[828,3441,2115],{"class":2114},[828,3443,3444],{"class":1443}," matter ",[828,3446,3428],{"class":2114},[828,3448,846],{"class":845},[828,3450,3451],{"class":838},"gray-matter",[828,3453,852],{"class":845},[828,3455,2284],{"class":845},[828,3457,3458,3460,3463,3465,3467,3470,3472],{"class":830,"line":957},[828,3459,2115],{"class":2114},[828,3461,3462],{"class":1443}," removeMd ",[828,3464,3428],{"class":2114},[828,3466,846],{"class":845},[828,3468,3469],{"class":838},"remove-markdown",[828,3471,852],{"class":845},[828,3473,2284],{"class":845},[828,3475,3476],{"class":830,"line":970},[828,3477,973],{"emptyLinePlaceholder":421},[828,3479,3480,3482,3485,3487,3490,3493,3495,3498,3500,3502,3505,3507,3509],{"class":830,"line":976},[828,3481,2505],{"class":1301},[828,3483,3484],{"class":1443}," articles ",[828,3486,2511],{"class":845},[828,3488,3489],{"class":2114}," await",[828,3491,3492],{"class":1443}," fs",[828,3494,1102],{"class":845},[828,3496,3497],{"class":1136},"readdir",[828,3499,2249],{"class":1443},[828,3501,852],{"class":845},[828,3503,3504],{"class":838},"./blog/",[828,3506,852],{"class":845},[828,3508,2173],{"class":1443},[828,3510,2284],{"class":845},[828,3512,3513],{"class":830,"line":1043},[828,3514,973],{"emptyLinePlaceholder":421},[828,3516,3517,3519,3522,3524,3526,3529,3531,3534],{"class":830,"line":1049},[828,3518,2505],{"class":1301},[828,3520,3521],{"class":1443}," data ",[828,3523,2511],{"class":845},[828,3525,3489],{"class":2114},[828,3527,3528],{"class":834}," Promise",[828,3530,1102],{"class":845},[828,3532,3533],{"class":1136},"all",[828,3535,3536],{"class":1443},"(\n",[828,3538,3539,3542,3544,3547,3549,3552,3554,3557,3559,3561],{"class":830,"line":1055},[828,3540,3541],{"class":1443},"  articles",[828,3543,1102],{"class":845},[828,3545,3546],{"class":1136},"map",[828,3548,2249],{"class":1443},[828,3550,3551],{"class":1301},"async",[828,3553,2166],{"class":845},[828,3555,3556],{"class":2169},"article",[828,3558,2173],{"class":845},[828,3560,2176],{"class":1301},[828,3562,1353],{"class":845},[828,3564,3565,3568,3570,3572,3575,3577,3580,3582,3585,3587,3590,3592,3595,3597],{"class":830,"line":1060},[828,3566,3567],{"class":1301},"    const",[828,3569,842],{"class":1443},[828,3571,1417],{"class":845},[828,3573,3574],{"class":1443}," matter",[828,3576,1102],{"class":845},[828,3578,3579],{"class":1136},"read",[828,3581,2249],{"class":1424},[828,3583,3584],{"class":845},"`",[828,3586,3504],{"class":838},[828,3588,3589],{"class":845},"${",[828,3591,3556],{"class":1443},[828,3593,3594],{"class":845},"}`",[828,3596,1454],{"class":845},[828,3598,1353],{"class":845},[828,3600,3601,3604,3606,3608],{"class":830,"line":1760},[828,3602,3603],{"class":1424},"      excerpt",[828,3605,1308],{"class":845},[828,3607,1431],{"class":1430},[828,3609,1319],{"class":845},[828,3611,3612,3615,3617],{"class":830,"line":1771},[828,3613,3614],{"class":1424},"      excerpt_separator",[828,3616,1308],{"class":845},[828,3618,3619],{"class":845}," ''\n",[828,3621,3622,3625,3627],{"class":830,"line":1782},[828,3623,3624],{"class":845},"    }",[828,3626,2173],{"class":1424},[828,3628,2284],{"class":845},[828,3630,3631],{"class":830,"line":1889},[828,3632,973],{"emptyLinePlaceholder":421},[828,3634,3635,3637,3639,3642,3644,3647,3649,3652,3654,3656,3658],{"class":830,"line":1899},[828,3636,3567],{"class":1301},[828,3638,2121],{"class":845},[828,3640,3641],{"class":1443}," data",[828,3643,1454],{"class":845},[828,3645,3646],{"class":1443}," content",[828,3648,1454],{"class":845},[828,3650,3651],{"class":1443}," path",[828,3653,2127],{"class":845},[828,3655,1417],{"class":845},[828,3657,842],{"class":1443},[828,3659,2284],{"class":845},[828,3661,3662,3664,3667,3669,3672,3674,3677,3679,3681,3684,3687,3689,3692,3694,3696,3699,3702,3705,3707,3710,3712,3714],{"class":830,"line":1907},[828,3663,3567],{"class":1301},[828,3665,3666],{"class":1443}," contents",[828,3668,1417],{"class":845},[828,3670,3671],{"class":1136}," removeMd",[828,3673,2249],{"class":1424},[828,3675,3676],{"class":1443},"content",[828,3678,2173],{"class":1424},[828,3680,1102],{"class":845},[828,3682,3683],{"class":1136},"trim",[828,3685,3686],{"class":1424},"()",[828,3688,1102],{"class":845},[828,3690,3691],{"class":1136},"split",[828,3693,2249],{"class":1424},[828,3695,2222],{"class":845},[828,3697,3698],{"class":838},"\\r\\n",[828,3700,3701],{"class":845},"|",[828,3703,3704],{"class":838},"\\n",[828,3706,3701],{"class":845},[828,3708,3709],{"class":838},"\\r",[828,3711,2222],{"class":845},[828,3713,2173],{"class":1424},[828,3715,2284],{"class":845},[828,3717,3718],{"class":830,"line":1918},[828,3719,973],{"emptyLinePlaceholder":421},[828,3721,3722,3725],{"class":830,"line":1929},[828,3723,3724],{"class":2114},"    return",[828,3726,1353],{"class":845},[828,3728,3729,3732,3735],{"class":830,"line":1937},[828,3730,3731],{"class":845},"      ...",[828,3733,3734],{"class":1443},"data",[828,3736,1319],{"class":845},[828,3738,3739,3742,3744,3746,3749,3753,3755,3757,3760,3762,3764,3767,3770,3773,3775,3777,3779,3781,3783,3785],{"class":830,"line":1951},[828,3740,3741],{"class":1424},"      title",[828,3743,1308],{"class":845},[828,3745,3666],{"class":1443},[828,3747,3748],{"class":1424},"[",[828,3750,3752],{"class":3751},"sbssI","0",[828,3754,1464],{"class":1424},[828,3756,1102],{"class":845},[828,3758,3759],{"class":1136},"replace",[828,3761,2249],{"class":1424},[828,3763,2222],{"class":845},[828,3765,3766],{"class":838},"\\s",[828,3768,3769],{"class":845},"{2,}/",[828,3771,3772],{"class":3751},"g",[828,3774,1454],{"class":845},[828,3776,2544],{"class":845},[828,3778,2173],{"class":1424},[828,3780,1102],{"class":845},[828,3782,3683],{"class":1136},[828,3784,3686],{"class":1424},[828,3786,1319],{"class":845},[828,3788,3789,3791,3793,3795,3797,3799,3801,3803,3806,3808,3811,3813,3815,3817,3820,3822,3824],{"class":830,"line":1962},[828,3790,2215],{"class":1424},[828,3792,1308],{"class":845},[828,3794,3651],{"class":1443},[828,3796,1102],{"class":845},[828,3798,3759],{"class":1136},[828,3800,2249],{"class":1424},[828,3802,2222],{"class":845},[828,3804,3805],{"class":1443},"\\.",[828,3807,419],{"class":838},[828,3809,3810],{"class":2114},"$",[828,3812,2222],{"class":845},[828,3814,1454],{"class":845},[828,3816,846],{"class":845},[828,3818,3819],{"class":838},".html",[828,3821,852],{"class":845},[828,3823,2173],{"class":1424},[828,3825,1319],{"class":845},[828,3827,3828,3831,3833,3835,3837,3840,3842,3845,3847,3849,3852,3854,3857,3859,3861,3863,3865,3867,3869,3871,3873,3875,3877,3879,3881,3883,3885,3887,3890,3892,3894,3896,3899,3902,3905,3907,3910],{"class":830,"line":1972},[828,3829,3830],{"class":1424},"      description",[828,3832,1308],{"class":845},[828,3834,3666],{"class":1443},[828,3836,1102],{"class":845},[828,3838,3839],{"class":1136},"slice",[828,3841,2249],{"class":1424},[828,3843,3844],{"class":3751},"1",[828,3846,2173],{"class":1424},[828,3848,1102],{"class":845},[828,3850,3851],{"class":1136},"join",[828,3853,2249],{"class":1424},[828,3855,3856],{"class":845},"''",[828,3858,2173],{"class":1424},[828,3860,1102],{"class":845},[828,3862,3759],{"class":1136},[828,3864,2249],{"class":1424},[828,3866,2222],{"class":845},[828,3868,3766],{"class":838},[828,3870,3769],{"class":845},[828,3872,3772],{"class":3751},[828,3874,1454],{"class":845},[828,3876,2544],{"class":845},[828,3878,2173],{"class":1424},[828,3880,1102],{"class":845},[828,3882,3683],{"class":1136},[828,3884,3686],{"class":1424},[828,3886,1102],{"class":845},[828,3888,3889],{"class":1136},"substring",[828,3891,2249],{"class":1424},[828,3893,3752],{"class":3751},[828,3895,1454],{"class":845},[828,3897,3898],{"class":3751}," 300",[828,3900,3901],{"class":1424},") ",[828,3903,3904],{"class":845},"+",[828,3906,846],{"class":845},[828,3908,3909],{"class":838},"...",[828,3911,1548],{"class":845},[828,3913,3914],{"class":830,"line":1979},[828,3915,2264],{"class":845},[828,3917,3918,3921],{"class":830,"line":1989},[828,3919,3920],{"class":845},"  }",[828,3922,2259],{"class":1443},[828,3924,3925],{"class":830,"line":1999},[828,3926,2259],{"class":1443},[828,3928,3929],{"class":830,"line":2009},[828,3930,973],{"emptyLinePlaceholder":421},[828,3932,3934,3937,3939,3941,3944,3946,3948,3951,3953,3955,3958,3960,3963,3966,3968,3970,3973,3975,3977],{"class":830,"line":3933},27,[828,3935,3936],{"class":2114},"await",[828,3938,3492],{"class":1443},[828,3940,1102],{"class":845},[828,3942,3943],{"class":1136},"writeFile",[828,3945,2249],{"class":1443},[828,3947,852],{"class":845},[828,3949,3950],{"class":838},"./data.json",[828,3952,852],{"class":845},[828,3954,1454],{"class":845},[828,3956,3957],{"class":1443}," JSON",[828,3959,1102],{"class":845},[828,3961,3962],{"class":1136},"stringify",[828,3964,3965],{"class":1443},"(data)",[828,3967,1454],{"class":845},[828,3969,846],{"class":845},[828,3971,3972],{"class":838},"utf-8",[828,3974,852],{"class":845},[828,3976,2173],{"class":1443},[828,3978,2284],{"class":845},[896,3980,3981],{"start":400},[86,3982,3983],{},"Now, build a new JSON file. (This command will generate one more file for our project, where it simplifies the markdown items to JSON).",[240,3985,3987],{"className":822,"code":3986,"language":824,"meta":246,"style":246},"yarn build && yarn dev\n",[23,3988,3989],{"__ignoreMap":246},[828,3990,3991,3993,3996,3998,4001],{"class":830,"line":831},[828,3992,1718],{"class":834},[828,3994,3995],{"class":838}," build",[828,3997,2868],{"class":845},[828,3999,4000],{"class":834}," yarn",[828,4002,4003],{"class":838}," dev\n",[60,4005,4007],{"id":4006},"creating-new-vue-components","Creating new Vue components",[896,4009,4010],{},[86,4011,4012],{},"Create a Hero component.",[240,4014,4017],{"className":4015,"code":4016,"language":2827,"meta":246,"style":246},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003C!-- .vitepress/components/Hero.vue -->\n\u003Cscript setup>\nimport DefaultTheme from 'vitepress/theme'\n\nconst { Layout } = DefaultTheme;\n\n\u003C/script>\n\n\u003Ctemplate #home-hero-before>\n  \u003Cdiv class=\"container\">\n    \u003Cdiv class=\"banner\">\n      \u003Cdiv class=\"banner-hero\">\u003C/div>\n      \u003Cdiv class=\"banner-hero-text\">\n        \u003Ch1>Creating a new blog\u003C/h1>\n      \u003C/div>\n    \u003C/div>\n  \u003C/div>\n\u003C/template>\n",[23,4018,4019,4024,4038,4054,4058,4076,4080,4089,4093,4108,4130,4150,4175,4194,4214,4223,4232,4241],{"__ignoreMap":246},[828,4020,4021],{"class":830,"line":831},[828,4022,4023],{"class":1287},"\u003C!-- .vitepress/components/Hero.vue -->\n",[828,4025,4026,4029,4032,4035],{"class":830,"line":400},[828,4027,4028],{"class":845},"\u003C",[828,4030,4031],{"class":1424},"script",[828,4033,4034],{"class":1301}," setup",[828,4036,4037],{"class":845},">\n",[828,4039,4040,4042,4045,4047,4049,4052],{"class":830,"line":405},[828,4041,2115],{"class":2114},[828,4043,4044],{"class":1443}," DefaultTheme ",[828,4046,3428],{"class":2114},[828,4048,846],{"class":845},[828,4050,4051],{"class":838},"vitepress/theme",[828,4053,1548],{"class":845},[828,4055,4056],{"class":830,"line":957},[828,4057,973],{"emptyLinePlaceholder":421},[828,4059,4060,4062,4064,4067,4069,4071,4074],{"class":830,"line":970},[828,4061,2505],{"class":1301},[828,4063,2121],{"class":845},[828,4065,4066],{"class":1443}," Layout ",[828,4068,2276],{"class":845},[828,4070,1417],{"class":845},[828,4072,4073],{"class":1443}," DefaultTheme",[828,4075,2284],{"class":845},[828,4077,4078],{"class":830,"line":976},[828,4079,973],{"emptyLinePlaceholder":421},[828,4081,4082,4085,4087],{"class":830,"line":1043},[828,4083,4084],{"class":845},"\u003C/",[828,4086,4031],{"class":1424},[828,4088,4037],{"class":845},[828,4090,4091],{"class":830,"line":1049},[828,4092,973],{"emptyLinePlaceholder":421},[828,4094,4095,4097,4100,4103,4106],{"class":830,"line":1055},[828,4096,4028],{"class":845},[828,4098,4099],{"class":1424},"template",[828,4101,4102],{"class":845}," #",[828,4104,4105],{"class":1301},"home-hero-before",[828,4107,4037],{"class":845},[828,4109,4110,4113,4116,4119,4121,4123,4126,4128],{"class":830,"line":1060},[828,4111,4112],{"class":845},"  \u003C",[828,4114,4115],{"class":1424},"div",[828,4117,4118],{"class":1301}," class",[828,4120,2511],{"class":845},[828,4122,1305],{"class":845},[828,4124,4125],{"class":838},"container",[828,4127,1305],{"class":845},[828,4129,4037],{"class":845},[828,4131,4132,4135,4137,4139,4141,4143,4146,4148],{"class":830,"line":1760},[828,4133,4134],{"class":845},"    \u003C",[828,4136,4115],{"class":1424},[828,4138,4118],{"class":1301},[828,4140,2511],{"class":845},[828,4142,1305],{"class":845},[828,4144,4145],{"class":838},"banner",[828,4147,1305],{"class":845},[828,4149,4037],{"class":845},[828,4151,4152,4155,4157,4159,4161,4163,4166,4168,4171,4173],{"class":830,"line":1771},[828,4153,4154],{"class":845},"      \u003C",[828,4156,4115],{"class":1424},[828,4158,4118],{"class":1301},[828,4160,2511],{"class":845},[828,4162,1305],{"class":845},[828,4164,4165],{"class":838},"banner-hero",[828,4167,1305],{"class":845},[828,4169,4170],{"class":845},">\u003C/",[828,4172,4115],{"class":1424},[828,4174,4037],{"class":845},[828,4176,4177,4179,4181,4183,4185,4187,4190,4192],{"class":830,"line":1782},[828,4178,4154],{"class":845},[828,4180,4115],{"class":1424},[828,4182,4118],{"class":1301},[828,4184,2511],{"class":845},[828,4186,1305],{"class":845},[828,4188,4189],{"class":838},"banner-hero-text",[828,4191,1305],{"class":845},[828,4193,4037],{"class":845},[828,4195,4196,4199,4202,4205,4208,4210,4212],{"class":830,"line":1889},[828,4197,4198],{"class":845},"        \u003C",[828,4200,4201],{"class":1424},"h1",[828,4203,4204],{"class":845},">",[828,4206,4207],{"class":1443},"Creating a new blog",[828,4209,4084],{"class":845},[828,4211,4201],{"class":1424},[828,4213,4037],{"class":845},[828,4215,4216,4219,4221],{"class":830,"line":1899},[828,4217,4218],{"class":845},"      \u003C/",[828,4220,4115],{"class":1424},[828,4222,4037],{"class":845},[828,4224,4225,4228,4230],{"class":830,"line":1907},[828,4226,4227],{"class":845},"    \u003C/",[828,4229,4115],{"class":1424},[828,4231,4037],{"class":845},[828,4233,4234,4237,4239],{"class":830,"line":1918},[828,4235,4236],{"class":845},"  \u003C/",[828,4238,4115],{"class":1424},[828,4240,4037],{"class":845},[828,4242,4243,4245,4247],{"class":830,"line":1929},[828,4244,4084],{"class":845},[828,4246,4099],{"class":1424},[828,4248,4037],{"class":845},[896,4250,4251],{"start":400},[86,4252,4253],{},"Now it’s time to create a component to list our articles that have been created in the blog folder.",[240,4255,4257],{"className":4015,"code":4256,"language":2827,"meta":246,"style":246},"\u003C!-- .vitepress/components/ListArticles.vue -->\n\u003Cscript setup>\nimport data from '../../data.json';\nimport DefaultTheme from 'vitepress/theme';\nimport Card from './Card.vue';\n\nconst { Layout } = DefaultTheme;\n\n// sort articles\nconst articles = data.sort(\n  (a, b) => new Date(b.Updated) - new Date(a.Updated)\n)\n\n\u003C/script>\n\n\u003Ctemplate>\n  \u003CLayout>\n    \u003Ctemplate #home-hero-after>\n      \u003Cdiv class=\"container\">\n        \u003Ch2 class=\"title\">List of recent added articles\u003C/h2>\u003Cbr>\n        \u003Cdiv class=\"article-container\">\n          \u003Cdiv v-for=\"article in articles\">\n            \u003CCard :article=\"article\" />\n          \u003C/div>\n        \u003C/div>\n      \u003C/div>\n    \u003C/template>\n  \u003C/Layout>\n\u003C/template>\n",[23,4258,4259,4264,4274,4291,4307,4325,4329,4345,4349,4354,4371,4416,4420,4424,4432,4436,4444,4453,4466,4484,4518,4537,4563,4587,4596,4605,4613,4621,4630],{"__ignoreMap":246},[828,4260,4261],{"class":830,"line":831},[828,4262,4263],{"class":1287},"\u003C!-- .vitepress/components/ListArticles.vue -->\n",[828,4265,4266,4268,4270,4272],{"class":830,"line":400},[828,4267,4028],{"class":845},[828,4269,4031],{"class":1424},[828,4271,4034],{"class":1301},[828,4273,4037],{"class":845},[828,4275,4276,4278,4280,4282,4284,4287,4289],{"class":830,"line":405},[828,4277,2115],{"class":2114},[828,4279,3521],{"class":1443},[828,4281,3428],{"class":2114},[828,4283,846],{"class":845},[828,4285,4286],{"class":838},"../../data.json",[828,4288,852],{"class":845},[828,4290,2284],{"class":845},[828,4292,4293,4295,4297,4299,4301,4303,4305],{"class":830,"line":957},[828,4294,2115],{"class":2114},[828,4296,4044],{"class":1443},[828,4298,3428],{"class":2114},[828,4300,846],{"class":845},[828,4302,4051],{"class":838},[828,4304,852],{"class":845},[828,4306,2284],{"class":845},[828,4308,4309,4311,4314,4316,4318,4321,4323],{"class":830,"line":970},[828,4310,2115],{"class":2114},[828,4312,4313],{"class":1443}," Card ",[828,4315,3428],{"class":2114},[828,4317,846],{"class":845},[828,4319,4320],{"class":838},"./Card.vue",[828,4322,852],{"class":845},[828,4324,2284],{"class":845},[828,4326,4327],{"class":830,"line":976},[828,4328,973],{"emptyLinePlaceholder":421},[828,4330,4331,4333,4335,4337,4339,4341,4343],{"class":830,"line":1043},[828,4332,2505],{"class":1301},[828,4334,2121],{"class":845},[828,4336,4066],{"class":1443},[828,4338,2276],{"class":845},[828,4340,1417],{"class":845},[828,4342,4073],{"class":1443},[828,4344,2284],{"class":845},[828,4346,4347],{"class":830,"line":1049},[828,4348,973],{"emptyLinePlaceholder":421},[828,4350,4351],{"class":830,"line":1055},[828,4352,4353],{"class":1287},"// sort articles\n",[828,4355,4356,4358,4360,4362,4364,4366,4369],{"class":830,"line":1060},[828,4357,2505],{"class":1301},[828,4359,3484],{"class":1443},[828,4361,2511],{"class":845},[828,4363,3641],{"class":1443},[828,4365,1102],{"class":845},[828,4367,4368],{"class":1136},"sort",[828,4370,3536],{"class":1443},[828,4372,4373,4376,4378,4380,4383,4385,4387,4390,4393,4396,4398,4401,4404,4406,4408,4411,4413],{"class":830,"line":1760},[828,4374,4375],{"class":845},"  (",[828,4377,161],{"class":2169},[828,4379,1454],{"class":845},[828,4381,4382],{"class":2169}," b",[828,4384,2173],{"class":845},[828,4386,2176],{"class":1301},[828,4388,4389],{"class":845}," new",[828,4391,4392],{"class":1136}," Date",[828,4394,4395],{"class":1443},"(b",[828,4397,1102],{"class":845},[828,4399,4400],{"class":1443},"Updated) ",[828,4402,4403],{"class":845},"-",[828,4405,4389],{"class":845},[828,4407,4392],{"class":1136},[828,4409,4410],{"class":1443},"(a",[828,4412,1102],{"class":845},[828,4414,4415],{"class":1443},"Updated)\n",[828,4417,4418],{"class":830,"line":1771},[828,4419,2259],{"class":1443},[828,4421,4422],{"class":830,"line":1782},[828,4423,973],{"emptyLinePlaceholder":421},[828,4425,4426,4428,4430],{"class":830,"line":1889},[828,4427,4084],{"class":845},[828,4429,4031],{"class":1424},[828,4431,4037],{"class":845},[828,4433,4434],{"class":830,"line":1899},[828,4435,973],{"emptyLinePlaceholder":421},[828,4437,4438,4440,4442],{"class":830,"line":1907},[828,4439,4028],{"class":845},[828,4441,4099],{"class":1424},[828,4443,4037],{"class":845},[828,4445,4446,4448,4451],{"class":830,"line":1918},[828,4447,4112],{"class":845},[828,4449,4450],{"class":1424},"Layout",[828,4452,4037],{"class":845},[828,4454,4455,4457,4459,4461,4464],{"class":830,"line":1929},[828,4456,4134],{"class":845},[828,4458,4099],{"class":1424},[828,4460,4102],{"class":845},[828,4462,4463],{"class":1301},"home-hero-after",[828,4465,4037],{"class":845},[828,4467,4468,4470,4472,4474,4476,4478,4480,4482],{"class":830,"line":1937},[828,4469,4154],{"class":845},[828,4471,4115],{"class":1424},[828,4473,4118],{"class":1301},[828,4475,2511],{"class":845},[828,4477,1305],{"class":845},[828,4479,4125],{"class":838},[828,4481,1305],{"class":845},[828,4483,4037],{"class":845},[828,4485,4486,4488,4490,4492,4494,4496,4499,4501,4503,4506,4508,4510,4513,4516],{"class":830,"line":1951},[828,4487,4198],{"class":845},[828,4489,60],{"class":1424},[828,4491,4118],{"class":1301},[828,4493,2511],{"class":845},[828,4495,1305],{"class":845},[828,4497,4498],{"class":838},"title",[828,4500,1305],{"class":845},[828,4502,4204],{"class":845},[828,4504,4505],{"class":1443},"List of recent added articles",[828,4507,4084],{"class":845},[828,4509,60],{"class":1424},[828,4511,4512],{"class":845},">\u003C",[828,4514,4515],{"class":1424},"br",[828,4517,4037],{"class":845},[828,4519,4520,4522,4524,4526,4528,4530,4533,4535],{"class":830,"line":1962},[828,4521,4198],{"class":845},[828,4523,4115],{"class":1424},[828,4525,4118],{"class":1301},[828,4527,2511],{"class":845},[828,4529,1305],{"class":845},[828,4531,4532],{"class":838},"article-container",[828,4534,1305],{"class":845},[828,4536,4037],{"class":845},[828,4538,4539,4542,4544,4547,4549,4551,4553,4556,4559,4561],{"class":830,"line":1972},[828,4540,4541],{"class":845},"          \u003C",[828,4543,4115],{"class":1424},[828,4545,4546],{"class":2114}," v-for",[828,4548,2511],{"class":845},[828,4550,1305],{"class":845},[828,4552,3556],{"class":1443},[828,4554,4555],{"class":845}," in ",[828,4557,4558],{"class":1443},"articles",[828,4560,1305],{"class":845},[828,4562,4037],{"class":845},[828,4564,4565,4568,4571,4574,4576,4578,4580,4582,4584],{"class":830,"line":1979},[828,4566,4567],{"class":845},"            \u003C",[828,4569,4570],{"class":1424},"Card",[828,4572,4573],{"class":845}," :",[828,4575,3556],{"class":1301},[828,4577,2511],{"class":845},[828,4579,1305],{"class":845},[828,4581,3556],{"class":1443},[828,4583,1305],{"class":845},[828,4585,4586],{"class":845}," />\n",[828,4588,4589,4592,4594],{"class":830,"line":1989},[828,4590,4591],{"class":845},"          \u003C/",[828,4593,4115],{"class":1424},[828,4595,4037],{"class":845},[828,4597,4598,4601,4603],{"class":830,"line":1999},[828,4599,4600],{"class":845},"        \u003C/",[828,4602,4115],{"class":1424},[828,4604,4037],{"class":845},[828,4606,4607,4609,4611],{"class":830,"line":2009},[828,4608,4218],{"class":845},[828,4610,4115],{"class":1424},[828,4612,4037],{"class":845},[828,4614,4615,4617,4619],{"class":830,"line":3933},[828,4616,4227],{"class":845},[828,4618,4099],{"class":1424},[828,4620,4037],{"class":845},[828,4622,4624,4626,4628],{"class":830,"line":4623},28,[828,4625,4236],{"class":845},[828,4627,4450],{"class":1424},[828,4629,4037],{"class":845},[828,4631,4633,4635,4637],{"class":830,"line":4632},29,[828,4634,4084],{"class":845},[828,4636,4099],{"class":1424},[828,4638,4037],{"class":845},[896,4640,4641],{"start":405},[86,4642,4643],{},"We can also create a single card component for each article preview.",[240,4645,4647],{"className":4015,"code":4646,"language":2827,"meta":246,"style":246},"\u003C!-- .vitepress/components/Card.vue -->\n\u003Cscript setup>\n  defineProps({\n    article: Object\n  });\n\n  const transformDate = (date) => {\n    return new Date(date).toLocaleDateString('en-US', {\n      year: 'numeric',\n      month: 'long',\n      day: 'numeric'\n    })\n  }\n\n\u003C/script>\n\n\u003Ctemplate>\n  \u003Ca :href=\"article.path\">\n    \u003Cdiv class=\"card\">\n      \u003Cdiv class=\"card-header\">\n        \u003Cimg :src=\"article.image\" :alt=\"article.title\" />\n      \u003C/div>\n      \u003Cdiv class=\"card-body\">\n        \u003Ch4>\n          {{ article.title }}\n        \u003C/h4>\n        \u003Cp>\n          {{ article.description }}\n        \u003C/p>\n        \u003Cdiv>\n          \u003Ch5 class=\"date\">{{ transformDate(article.Updated) }}\u003C/h5>\n        \u003C/div>\n      \u003C/div>\n    \u003C/div>\n  \u003C/a>\n\u003C/template>\n",[23,4648,4649,4654,4664,4673,4683,4691,4695,4716,4748,4764,4780,4793,4799,4803,4807,4815,4819,4827,4853,4871,4890,4933,4941,4960,4969,4985,4993,5001,5014,5022,5031,5069,5078,5087,5096,5105],{"__ignoreMap":246},[828,4650,4651],{"class":830,"line":831},[828,4652,4653],{"class":1287},"\u003C!-- .vitepress/components/Card.vue -->\n",[828,4655,4656,4658,4660,4662],{"class":830,"line":400},[828,4657,4028],{"class":845},[828,4659,4031],{"class":1424},[828,4661,4034],{"class":1301},[828,4663,4037],{"class":845},[828,4665,4666,4669,4671],{"class":830,"line":405},[828,4667,4668],{"class":1136},"  defineProps",[828,4670,2249],{"class":1443},[828,4672,1293],{"class":845},[828,4674,4675,4678,4680],{"class":830,"line":957},[828,4676,4677],{"class":1424},"    article",[828,4679,1308],{"class":845},[828,4681,4682],{"class":1443}," Object\n",[828,4684,4685,4687,4689],{"class":830,"line":970},[828,4686,3920],{"class":845},[828,4688,2173],{"class":1443},[828,4690,2284],{"class":845},[828,4692,4693],{"class":830,"line":976},[828,4694,973],{"emptyLinePlaceholder":421},[828,4696,4697,4700,4703,4705,4707,4710,4712,4714],{"class":830,"line":1043},[828,4698,4699],{"class":1301},"  const",[828,4701,4702],{"class":1443}," transformDate ",[828,4704,2511],{"class":845},[828,4706,2166],{"class":845},[828,4708,4709],{"class":2169},"date",[828,4711,2173],{"class":845},[828,4713,2176],{"class":1301},[828,4715,1353],{"class":845},[828,4717,4718,4720,4722,4724,4726,4728,4730,4732,4735,4737,4739,4742,4744,4746],{"class":830,"line":1049},[828,4719,3724],{"class":2114},[828,4721,4389],{"class":845},[828,4723,4392],{"class":1136},[828,4725,2249],{"class":1424},[828,4727,4709],{"class":1443},[828,4729,2173],{"class":1424},[828,4731,1102],{"class":845},[828,4733,4734],{"class":1136},"toLocaleDateString",[828,4736,2249],{"class":1424},[828,4738,852],{"class":845},[828,4740,4741],{"class":838},"en-US",[828,4743,852],{"class":845},[828,4745,1454],{"class":845},[828,4747,1353],{"class":845},[828,4749,4750,4753,4755,4757,4760,4762],{"class":830,"line":1055},[828,4751,4752],{"class":1424},"      year",[828,4754,1308],{"class":845},[828,4756,846],{"class":845},[828,4758,4759],{"class":838},"numeric",[828,4761,852],{"class":845},[828,4763,1319],{"class":845},[828,4765,4766,4769,4771,4773,4776,4778],{"class":830,"line":1060},[828,4767,4768],{"class":1424},"      month",[828,4770,1308],{"class":845},[828,4772,846],{"class":845},[828,4774,4775],{"class":838},"long",[828,4777,852],{"class":845},[828,4779,1319],{"class":845},[828,4781,4782,4785,4787,4789,4791],{"class":830,"line":1760},[828,4783,4784],{"class":1424},"      day",[828,4786,1308],{"class":845},[828,4788,846],{"class":845},[828,4790,4759],{"class":838},[828,4792,1548],{"class":845},[828,4794,4795,4797],{"class":830,"line":1771},[828,4796,3624],{"class":845},[828,4798,2259],{"class":1424},[828,4800,4801],{"class":830,"line":1782},[828,4802,1378],{"class":845},[828,4804,4805],{"class":830,"line":1889},[828,4806,973],{"emptyLinePlaceholder":421},[828,4808,4809,4811,4813],{"class":830,"line":1899},[828,4810,4084],{"class":845},[828,4812,4031],{"class":1424},[828,4814,4037],{"class":845},[828,4816,4817],{"class":830,"line":1907},[828,4818,973],{"emptyLinePlaceholder":421},[828,4820,4821,4823,4825],{"class":830,"line":1918},[828,4822,4028],{"class":845},[828,4824,4099],{"class":1424},[828,4826,4037],{"class":845},[828,4828,4829,4831,4833,4835,4838,4840,4842,4844,4846,4849,4851],{"class":830,"line":1929},[828,4830,4112],{"class":845},[828,4832,161],{"class":1424},[828,4834,4573],{"class":845},[828,4836,4837],{"class":1301},"href",[828,4839,2511],{"class":845},[828,4841,1305],{"class":845},[828,4843,3556],{"class":1443},[828,4845,1102],{"class":845},[828,4847,4848],{"class":1443},"path",[828,4850,1305],{"class":845},[828,4852,4037],{"class":845},[828,4854,4855,4857,4859,4861,4863,4865,4867,4869],{"class":830,"line":1937},[828,4856,4134],{"class":845},[828,4858,4115],{"class":1424},[828,4860,4118],{"class":1301},[828,4862,2511],{"class":845},[828,4864,1305],{"class":845},[828,4866,1185],{"class":838},[828,4868,1305],{"class":845},[828,4870,4037],{"class":845},[828,4872,4873,4875,4877,4879,4881,4883,4886,4888],{"class":830,"line":1951},[828,4874,4154],{"class":845},[828,4876,4115],{"class":1424},[828,4878,4118],{"class":1301},[828,4880,2511],{"class":845},[828,4882,1305],{"class":845},[828,4884,4885],{"class":838},"card-header",[828,4887,1305],{"class":845},[828,4889,4037],{"class":845},[828,4891,4892,4894,4896,4898,4901,4903,4905,4907,4909,4912,4914,4916,4919,4921,4923,4925,4927,4929,4931],{"class":830,"line":1962},[828,4893,4198],{"class":845},[828,4895,15],{"class":1424},[828,4897,4573],{"class":845},[828,4899,4900],{"class":1301},"src",[828,4902,2511],{"class":845},[828,4904,1305],{"class":845},[828,4906,3556],{"class":1443},[828,4908,1102],{"class":845},[828,4910,4911],{"class":1443},"image",[828,4913,1305],{"class":845},[828,4915,4573],{"class":845},[828,4917,4918],{"class":1301},"alt",[828,4920,2511],{"class":845},[828,4922,1305],{"class":845},[828,4924,3556],{"class":1443},[828,4926,1102],{"class":845},[828,4928,4498],{"class":1443},[828,4930,1305],{"class":845},[828,4932,4586],{"class":845},[828,4934,4935,4937,4939],{"class":830,"line":1972},[828,4936,4218],{"class":845},[828,4938,4115],{"class":1424},[828,4940,4037],{"class":845},[828,4942,4943,4945,4947,4949,4951,4953,4956,4958],{"class":830,"line":1979},[828,4944,4154],{"class":845},[828,4946,4115],{"class":1424},[828,4948,4118],{"class":1301},[828,4950,2511],{"class":845},[828,4952,1305],{"class":845},[828,4954,4955],{"class":838},"card-body",[828,4957,1305],{"class":845},[828,4959,4037],{"class":845},[828,4961,4962,4964,4967],{"class":830,"line":1989},[828,4963,4198],{"class":845},[828,4965,4966],{"class":1424},"h4",[828,4968,4037],{"class":845},[828,4970,4971,4974,4977,4979,4982],{"class":830,"line":1999},[828,4972,4973],{"class":845},"          {{",[828,4975,4976],{"class":1443}," article",[828,4978,1102],{"class":845},[828,4980,4981],{"class":1443},"title ",[828,4983,4984],{"class":845},"}}\n",[828,4986,4987,4989,4991],{"class":830,"line":2009},[828,4988,4600],{"class":845},[828,4990,4966],{"class":1424},[828,4992,4037],{"class":845},[828,4994,4995,4997,4999],{"class":830,"line":3933},[828,4996,4198],{"class":845},[828,4998,12],{"class":1424},[828,5000,4037],{"class":845},[828,5002,5003,5005,5007,5009,5012],{"class":830,"line":4623},[828,5004,4973],{"class":845},[828,5006,4976],{"class":1443},[828,5008,1102],{"class":845},[828,5010,5011],{"class":1443},"description ",[828,5013,4984],{"class":845},[828,5015,5016,5018,5020],{"class":830,"line":4632},[828,5017,4600],{"class":845},[828,5019,12],{"class":1424},[828,5021,4037],{"class":845},[828,5023,5025,5027,5029],{"class":830,"line":5024},30,[828,5026,4198],{"class":845},[828,5028,4115],{"class":1424},[828,5030,4037],{"class":845},[828,5032,5034,5036,5039,5041,5043,5045,5047,5049,5052,5055,5058,5060,5062,5065,5067],{"class":830,"line":5033},31,[828,5035,4541],{"class":845},[828,5037,5038],{"class":1424},"h5",[828,5040,4118],{"class":1301},[828,5042,2511],{"class":845},[828,5044,1305],{"class":845},[828,5046,4709],{"class":838},[828,5048,1305],{"class":845},[828,5050,5051],{"class":845},">{{",[828,5053,5054],{"class":1136}," transformDate",[828,5056,5057],{"class":1443},"(article",[828,5059,1102],{"class":845},[828,5061,4400],{"class":1443},[828,5063,5064],{"class":845},"}}\u003C/",[828,5066,5038],{"class":1424},[828,5068,4037],{"class":845},[828,5070,5072,5074,5076],{"class":830,"line":5071},32,[828,5073,4600],{"class":845},[828,5075,4115],{"class":1424},[828,5077,4037],{"class":845},[828,5079,5081,5083,5085],{"class":830,"line":5080},33,[828,5082,4218],{"class":845},[828,5084,4115],{"class":1424},[828,5086,4037],{"class":845},[828,5088,5090,5092,5094],{"class":830,"line":5089},34,[828,5091,4227],{"class":845},[828,5093,4115],{"class":1424},[828,5095,4037],{"class":845},[828,5097,5099,5101,5103],{"class":830,"line":5098},35,[828,5100,4236],{"class":845},[828,5102,161],{"class":1424},[828,5104,4037],{"class":845},[828,5106,5108,5110,5112],{"class":830,"line":5107},36,[828,5109,4084],{"class":845},[828,5111,4099],{"class":1424},[828,5113,4037],{"class":845},[896,5115,5116],{"start":957},[86,5117,5118,5119,5124],{},"Create a theme entry file. It should export the theme as its default export. Also, check the ",[161,5120,5123],{"href":5121,"rel":5122},"https://vitepress.dev/guide/extending-default-theme#layout-slots",[166],"Layout slots"," offered by Vitepress.",[240,5126,5128],{"className":1400,"code":5127,"language":1402,"meta":246,"style":246},"//.vitepress/theme/index.js\nimport { h } from 'vue'\nimport DefaultTheme from 'vitepress/theme';\nimport Hero from '../components/Hero.vue';\nimport ListArticles from '../components/ListArticles.vue';\nimport '../main.css'\n\nexport default {\n  ...DefaultTheme,\n  Layout() {\n    return h(DefaultTheme.Layout, null, {\n      'home-hero-before': () => h(Hero),\n      'home-hero-after': () => h(ListArticles),\n      'doc-after': () => h('div', {}, [\n        h(\n          'div',\n          {\n            class: 'link',\n          },\n          [\n            h(\n              'a',\n              {\n                href: '/',\n                rel: 'noopener',\n              },\n              [h('span', '\u003C Back')]\n            ),\n          ]\n        )\n      ]),\n    })\n  }\n}\n",[23,5129,5130,5135,5154,5170,5188,5206,5217,5221,5229,5239,5248,5269,5295,5320,5352,5359,5370,5375,5390,5395,5400,5407,5418,5423,5438,5454,5459,5487,5494,5499,5504,5511,5517,5521],{"__ignoreMap":246},[828,5131,5132],{"class":830,"line":831},[828,5133,5134],{"class":1287},"//.vitepress/theme/index.js\n",[828,5136,5137,5139,5141,5144,5146,5148,5150,5152],{"class":830,"line":400},[828,5138,2115],{"class":2114},[828,5140,2121],{"class":845},[828,5142,5143],{"class":1443}," h",[828,5145,2127],{"class":845},[828,5147,2130],{"class":2114},[828,5149,846],{"class":845},[828,5151,2827],{"class":838},[828,5153,1548],{"class":845},[828,5155,5156,5158,5160,5162,5164,5166,5168],{"class":830,"line":405},[828,5157,2115],{"class":2114},[828,5159,4044],{"class":1443},[828,5161,3428],{"class":2114},[828,5163,846],{"class":845},[828,5165,4051],{"class":838},[828,5167,852],{"class":845},[828,5169,2284],{"class":845},[828,5171,5172,5174,5177,5179,5181,5184,5186],{"class":830,"line":957},[828,5173,2115],{"class":2114},[828,5175,5176],{"class":1443}," Hero ",[828,5178,3428],{"class":2114},[828,5180,846],{"class":845},[828,5182,5183],{"class":838},"../components/Hero.vue",[828,5185,852],{"class":845},[828,5187,2284],{"class":845},[828,5189,5190,5192,5195,5197,5199,5202,5204],{"class":830,"line":970},[828,5191,2115],{"class":2114},[828,5193,5194],{"class":1443}," ListArticles ",[828,5196,3428],{"class":2114},[828,5198,846],{"class":845},[828,5200,5201],{"class":838},"../components/ListArticles.vue",[828,5203,852],{"class":845},[828,5205,2284],{"class":845},[828,5207,5208,5210,5212,5215],{"class":830,"line":976},[828,5209,2115],{"class":2114},[828,5211,846],{"class":845},[828,5213,5214],{"class":838},"../main.css",[828,5216,1548],{"class":845},[828,5218,5219],{"class":830,"line":1043},[828,5220,973],{"emptyLinePlaceholder":421},[828,5222,5223,5225,5227],{"class":830,"line":1049},[828,5224,2146],{"class":2114},[828,5226,2149],{"class":2114},[828,5228,1353],{"class":845},[828,5230,5231,5234,5237],{"class":830,"line":1055},[828,5232,5233],{"class":845},"  ...",[828,5235,5236],{"class":1443},"DefaultTheme",[828,5238,1319],{"class":845},[828,5240,5241,5244,5246],{"class":830,"line":1060},[828,5242,5243],{"class":1424},"  Layout",[828,5245,3686],{"class":845},[828,5247,1353],{"class":845},[828,5249,5250,5252,5254,5256,5258,5260,5262,5264,5267],{"class":830,"line":1760},[828,5251,3724],{"class":2114},[828,5253,5143],{"class":1136},[828,5255,2249],{"class":1424},[828,5257,5236],{"class":1443},[828,5259,1102],{"class":845},[828,5261,4450],{"class":1443},[828,5263,1454],{"class":845},[828,5265,5266],{"class":845}," null,",[828,5268,1353],{"class":845},[828,5270,5271,5274,5276,5278,5280,5282,5284,5286,5288,5291,5293],{"class":830,"line":1771},[828,5272,5273],{"class":845},"      '",[828,5275,4105],{"class":1424},[828,5277,852],{"class":845},[828,5279,1308],{"class":845},[828,5281,2241],{"class":845},[828,5283,2176],{"class":1301},[828,5285,5143],{"class":1136},[828,5287,2249],{"class":1424},[828,5289,5290],{"class":1443},"Hero",[828,5292,2173],{"class":1424},[828,5294,1319],{"class":845},[828,5296,5297,5299,5301,5303,5305,5307,5309,5311,5313,5316,5318],{"class":830,"line":1782},[828,5298,5273],{"class":845},[828,5300,4463],{"class":1424},[828,5302,852],{"class":845},[828,5304,1308],{"class":845},[828,5306,2241],{"class":845},[828,5308,2176],{"class":1301},[828,5310,5143],{"class":1136},[828,5312,2249],{"class":1424},[828,5314,5315],{"class":1443},"ListArticles",[828,5317,2173],{"class":1424},[828,5319,1319],{"class":845},[828,5321,5322,5324,5327,5329,5331,5333,5335,5337,5339,5341,5343,5345,5347,5350],{"class":830,"line":1889},[828,5323,5273],{"class":845},[828,5325,5326],{"class":1424},"doc-after",[828,5328,852],{"class":845},[828,5330,1308],{"class":845},[828,5332,2241],{"class":845},[828,5334,2176],{"class":1301},[828,5336,5143],{"class":1136},[828,5338,2249],{"class":1424},[828,5340,852],{"class":845},[828,5342,4115],{"class":838},[828,5344,852],{"class":845},[828,5346,1454],{"class":845},[828,5348,5349],{"class":845}," {},",[828,5351,2179],{"class":1424},[828,5353,5354,5357],{"class":830,"line":1899},[828,5355,5356],{"class":1136},"        h",[828,5358,3536],{"class":1424},[828,5360,5361,5364,5366,5368],{"class":830,"line":1907},[828,5362,5363],{"class":845},"          '",[828,5365,4115],{"class":838},[828,5367,852],{"class":845},[828,5369,1319],{"class":845},[828,5371,5372],{"class":830,"line":1918},[828,5373,5374],{"class":845},"          {\n",[828,5376,5377,5380,5382,5384,5386,5388],{"class":830,"line":1929},[828,5378,5379],{"class":1424},"            class",[828,5381,1308],{"class":845},[828,5383,846],{"class":845},[828,5385,3269],{"class":838},[828,5387,852],{"class":845},[828,5389,1319],{"class":845},[828,5391,5392],{"class":830,"line":1937},[828,5393,5394],{"class":845},"          },\n",[828,5396,5397],{"class":830,"line":1951},[828,5398,5399],{"class":1424},"          [\n",[828,5401,5402,5405],{"class":830,"line":1962},[828,5403,5404],{"class":1136},"            h",[828,5406,3536],{"class":1424},[828,5408,5409,5412,5414,5416],{"class":830,"line":1972},[828,5410,5411],{"class":845},"              '",[828,5413,161],{"class":838},[828,5415,852],{"class":845},[828,5417,1319],{"class":845},[828,5419,5420],{"class":830,"line":1979},[828,5421,5422],{"class":845},"              {\n",[828,5424,5425,5428,5430,5432,5434,5436],{"class":830,"line":1989},[828,5426,5427],{"class":1424},"                href",[828,5429,1308],{"class":845},[828,5431,846],{"class":845},[828,5433,2222],{"class":838},[828,5435,852],{"class":845},[828,5437,1319],{"class":845},[828,5439,5440,5443,5445,5447,5450,5452],{"class":830,"line":1999},[828,5441,5442],{"class":1424},"                rel",[828,5444,1308],{"class":845},[828,5446,846],{"class":845},[828,5448,5449],{"class":838},"noopener",[828,5451,852],{"class":845},[828,5453,1319],{"class":845},[828,5455,5456],{"class":830,"line":2009},[828,5457,5458],{"class":845},"              },\n",[828,5460,5461,5464,5467,5469,5471,5473,5475,5477,5479,5482,5484],{"class":830,"line":3933},[828,5462,5463],{"class":1424},"              [",[828,5465,5466],{"class":1136},"h",[828,5468,2249],{"class":1424},[828,5470,852],{"class":845},[828,5472,828],{"class":838},[828,5474,852],{"class":845},[828,5476,1454],{"class":845},[828,5478,846],{"class":845},[828,5480,5481],{"class":838},"\u003C Back",[828,5483,852],{"class":845},[828,5485,5486],{"class":1424},")]\n",[828,5488,5489,5492],{"class":830,"line":4623},[828,5490,5491],{"class":1424},"            )",[828,5493,1319],{"class":845},[828,5495,5496],{"class":830,"line":4632},[828,5497,5498],{"class":1424},"          ]\n",[828,5500,5501],{"class":830,"line":5024},[828,5502,5503],{"class":1424},"        )\n",[828,5505,5506,5509],{"class":830,"line":5033},[828,5507,5508],{"class":1424},"      ])",[828,5510,1319],{"class":845},[828,5512,5513,5515],{"class":830,"line":5071},[828,5514,3624],{"class":845},[828,5516,2259],{"class":1424},[828,5518,5519],{"class":830,"line":5080},[828,5520,1378],{"class":845},[828,5522,5523],{"class":830,"line":5089},[828,5524,1388],{"class":845},[60,5526,5527],{"id":1126},"Finally",[12,5529,5530,5531,5536],{},"Now, you can create a blog using vitePress in a very simple way. I share the ",[161,5532,5535],{"href":5533,"rel":5534},"https://github.com/edgonzalez24/blog-vitepress",[166],"repo Github"," so you can review the source code.",[12,5538,5539],{},[15,5540],{"alt":5541,"src":5542},"Demo Image","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1779231243/demo_qkllvg.webp",[12,5544,2051],{},[1209,5546,5547],{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":246,"searchDepth":400,"depth":400,"links":5549},[5550,5551,5552,5553],{"id":2843,"depth":400,"text":2844},{"id":3389,"depth":400,"text":3390},{"id":4006,"depth":400,"text":4007},{"id":1126,"depth":400,"text":5527},"2023-02-09T00:00:00.000Z","Learn how to build, structure, and test your frontend applications using VitePress with this step-by-step tutorial.",{},"/articles/en/effortlessly-build-and-test-your-frontend-applications-with-vitepress",{"title":2832,"description":5555},{"loc":5557},"articles/en/effortlessly-build-and-test-your-frontend-applications-with-vitepress",[5562,2827,2068,2069],"vitepress","https://res.cloudinary.com/dhgcfzhm0/image/upload/v1779231242/thumbmail_egtlqh.jpg","3Sk6H4ZYgcpKJD440VmcBeEEQvb_RAX9u58Ul4bPTN0",[5566,5571],{"title":5567,"path":5568,"stem":5569,"description":5570},"Kitbag Router vs Vue Router: Is it worth using a new alternative?","/articles/en/kitbag-router-and-vue-router","articles/en/kitbag-router-and-vue-router","A powerful new alternative for routing in VueJS; it's worth switching from the official router.",{"title":5572,"path":5573,"stem":5574,"description":5575},"A single source of truth for AI: How to unify context across multiple tools","/articles/en/unifying-ai-context-engineering-team","articles/en/unifying-ai-context-engineering-team","Discover how to unify AI context, commands, and skills in a single place to work consistently across Cursor, Claude, Codex, and other tools, reducing duplication and improving collaboration within your engineering team.",1782240943868]