<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="https://dmartinez.xyz/es/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    
    <title>Escritos · Daniel Martínez Fernández</title>
    <link>https://dmartinez.xyz/es/</link>
    <atom:link href="https://dmartinez.xyz/es/rss.xml" rel="self" type="application/rss+xml" />
    <description>Notas sobre lo que construyo y lo que aprendo en el camino.</description>
    <language>es-419</language>
    <item>
      <title>Reconstruí mi sitio con Eleventy y sin frameworks</title>
      <link>https://dmartinez.xyz/es/escritos/reconstruyendo-mi-sitio-con-eleventy/</link><description>&lt;h2&gt;Por qué no un framework&lt;/h2&gt;
&lt;p&gt;Escribo React y Next.js todos los días en el trabajo. Para un sitio personal con pocas páginas y un puñado de publicaciones, un framework del lado del cliente agrega JavaScript que el lector nunca necesita. El HTML estático carga rápido y no hay nada que mantener parchado.&lt;/p&gt;
&lt;h2&gt;Por qué Eleventy y no Hugo&lt;/h2&gt;
&lt;p&gt;Hugo era la otra opción. Compila rápido y empaqueta TypeScript sin configuración extra, pero sus plantillas de Go eran una cosa más que aprender. Eleventy es JavaScript de principio a fin, así que la configuración, los filtros y los archivos de datos son código que ya sé depurar.&lt;/p&gt;
&lt;h2&gt;TypeScript con esbuild&lt;/h2&gt;
&lt;p&gt;Eleventy no compila TypeScript por sí solo. Unas cuantas líneas en &lt;code&gt;eleventy.config.js&lt;/code&gt; ejecutan esbuild antes de cada build:&lt;/p&gt;
&lt;figure class=&quot;code-window&quot;&gt;&lt;figcaption class=&quot;code-window__bar&quot;&gt;&lt;span&gt;eleventy.config.js&lt;/span&gt;&lt;span&gt;js&lt;/span&gt;&lt;/figcaption&gt;&lt;div class=&quot;code-window__scroll&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; esbuild &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;esbuild&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;eleventyConfig&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;// Empaqueta y minifica el TypeScript del sitio&lt;/span&gt;
  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;eleventy.before&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;await&lt;/span&gt; esbuild&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;entryPoints&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;src/assets/ts/main.ts&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;outfile&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;_site/assets/main.js&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;bundle&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;minify&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addPassthroughCopy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;src/assets/css&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;src&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/figure&gt;
&lt;h2&gt;Lo que recibe el navegador&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;HTML generado en el build, un archivo por página&lt;/li&gt;
&lt;li&gt;Un solo script pequeño, que se carga solo donde la página lo necesita&lt;/li&gt;
&lt;li&gt;Una sola hoja de estilos, con propiedades personalizadas para los temas claro y oscuro&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Resultados&lt;/h2&gt;
&lt;p&gt;Corrí Lighthouse 13.5 sobre la página de inicio en línea el 24 de octubre de 2026. Las puntuaciones son de rendimiento, accesibilidad, buenas prácticas y SEO:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Escritorio:&lt;/strong&gt; 100 / 100 / 100 / 100. El contenido más grande aparece a los 0.4 s.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Móvil:&lt;/strong&gt; 99 / 100 / 100 / 100. El contenido más grande aparece a los 1.7 s con la conexión 4G lenta que simula Lighthouse.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;En ambos:&lt;/strong&gt; 0 ms de tiempo total de bloqueo, ningún desplazamiento de diseño, 6 solicitudes y 61 KiB en total.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Las dos fuentes web ocupan unos 52 KiB de eso. El HTML, la hoja de estilos y el script suman menos de 9 KiB.&lt;/p&gt;
&lt;p&gt;La primera medición salió más baja: 88 en rendimiento en móvil, 96 en buenas prácticas y 90 en SEO. Cuatro arreglos pequeños cerraron la diferencia:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fuentes alojadas en el sitio.&lt;/strong&gt; La hoja de estilos de Google Fonts bloqueaba el renderizado mientras el navegador se conectaba a dos dominios más. Servir los archivos de las fuentes desde mi propio servidor y precargarlos bajó el primer contenido en móvil de 3.1 s a 1.3 s.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Un favicon.&lt;/strong&gt; Sin él, el navegador pedía &lt;code&gt;/favicon.ico&lt;/code&gt;, recibía un 404 y registraba un error en la consola.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;URLs absolutas en &lt;code&gt;hreflang&lt;/code&gt;.&lt;/strong&gt; Los enlaces entre la versión en inglés y la versión en español usaban rutas como &lt;code&gt;/es/&lt;/code&gt;, y &lt;code&gt;hreflang&lt;/code&gt; necesita URLs completas.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nombres accesibles que coinciden con el texto visible.&lt;/strong&gt; El cambio de idioma mostraba “en” mientras los lectores de pantalla escuchaban “Read in English”, y el botón de tema mostraba “oscuro” mientras escuchaban “Cambiar a modo claro”. Ahora cada etiqueta empieza con la palabra que se ve en pantalla.&lt;/li&gt;
&lt;/ul&gt;
</description><pubDate>Fri, 23 Oct 2026 00:00:00 +0000</pubDate>
      <dc:creator>Daniel Martínez Fernández</dc:creator>
      <guid>https://dmartinez.xyz/es/escritos/reconstruyendo-mi-sitio-con-eleventy/</guid>
    </item>
  </channel>
</rss>