{"id":129,"date":"2017-04-16T10:54:00","date_gmt":"2017-04-16T13:54:00","guid":{"rendered":"https:\/\/www.linuxpro.com.br\/2017\/04\/install-hexo-on-ubuntu\/"},"modified":"2026-09-08T02:28:46","modified_gmt":"2026-09-08T05:28:46","slug":"install-hexo-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.linuxpro.com.br\/es\/2017\/04\/install-hexo-on-ubuntu\/","title":{"rendered":"Instalando Hexo en Ubuntu"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" alt=\"Mascote do LinuxPro despejando uma pilha de arquivos de texto no funil do Hexo, que os transforma no site pronto exibido no notebook\" src=\"\/wp-content\/uploads\/2026\/09\/hexo-v3.webp\" width=\"1052\" height=\"652\" \/><\/p>\n<div style=\"background:#fff8e1;border-left:4px solid #8b1a1a;padding:.8em 1em;margin:1em 0\"><strong>Nota (2026):<\/strong> El howto original instalaba Node con nvm <code data-no-translation=\"\">v0.35.1<\/code> en Ubuntu 16.04\/18.04. Hexo 8.x pide Node <strong>\u2265 20.19<\/strong>. A continuaci\u00f3n: nvm 0.40.7, LTS actual, <code data-no-translation=\"\">hexo-cli<\/code> sin sudo, y el flujo oficial (init, server, generate). Este sitio ejecut\u00f3 Hexo durante a\u00f1os y migr\u00f3 a WordPress en 2026 \u2014 el generador sigue siendo \u00fatil para blogs est\u00e1ticos.<\/div>\n<p>Hexo es un generador de sitios est\u00e1ticos en Node.js: entra Markdown, sale HTML, sin base de datos. GitHub Pages, Netlify, un nginx apuntando a <code data-no-translation=\"\">public\/<\/code>. En septiembre de 2026 el paquete npm <code data-no-translation=\"\">hexo<\/code> est\u00e1 en la <strong>8.1.2<\/strong>. El CLI oficial sigue <code data-no-translation=\"\">npm install -g hexo-cli<\/code> \u2014 pero <em>sin<\/em> root.<\/p>\n<p><!-- more --><\/p>\n<p><iframe style=\"width:100%;aspect-ratio:16\/9;border:0\" src=\"https:\/\/www.youtube-nocookie.com\/embed\/Ii4le3TJqTw\" allowfullscreen loading=\"lazy\"><\/iframe><\/p>\n<h2>Node via nvm (no uses sudo npm)<\/h2>\n<p>Hexo 8.0+ requiere Node 20.19 o superior. El apt de Ubuntu va retrasado. nvm 0.40.7 (18 de agosto de 2026) instala el LTS en tu home:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo apt update\nsudo apt install -y build-essential git curl\ncurl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.40.7\/install.sh | bash\nsource ~\/.bashrc\nnvm install --lts\nnvm use --lts\nnode -v\nnpm -v\n<\/code><\/pre>\n<p>Si aparece <code data-no-translation=\"\">EACCES<\/code> en el npm global, el prefijo est\u00e1 mal \u2014 no lo arregles con sudo. nvm ya apunta el npm a <code data-no-translation=\"\">~\/.nvm<\/code>. Alternativa: <a href=\"https:\/\/github.com\/Schniz\/fnm\">fnm<\/a>.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">npm install -g hexo-cli\nhexo version\n<\/code><\/pre>\n<h2>Primer blog<\/h2>\n<p><code data-no-translation=\"\">hexo init<\/code> clona el starter (tema Landscape) e instala dependencias con npm, yarn o pnpm \u2014 el que est\u00e9 en el PATH:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">hexo init ~\/src\/blog\ncd ~\/src\/blog\nhexo new \"Ol\u00e1, Hexo\"\nhexo server\n<\/code><\/pre>\n<p>Abre <code data-no-translation=\"\">http:\/\/localhost:4000<\/code>. El borrador queda en <code data-no-translation=\"\">source\/_posts\/<\/code>, Markdown + front-matter. Generar est\u00e1tico:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">hexo generate\n# ou: hexo g\nls public\/\n<\/code><\/pre>\n<p>O <code data-no-translation=\"\">public\/<\/code> es lo que nginx o Pages sirven. No confirmes ese directorio \u2014 el <code data-no-translation=\"\">.gitignore<\/code> del starter ya lo ignora.<\/p>\n<h2>Publicar<\/h2>\n<p>GitHub Pages, en 2026, es Action, no solo <code data-no-translation=\"\">hexo-deployer-git<\/code> no <code data-no-translation=\"\">gh-pages<\/code>. La docs oficial: <a href=\"https:\/\/hexo.io\/docs\/github-pages\">hexo.io\/docs\/github-pages<\/a>. Deploy por rsync\/git a\u00fan existe:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">npm install hexo-deployer-git --save\n# _config.yml \u2192 deploy: type: git \/ repo: \/ branch:\nhexo clean &amp;&amp; hexo deploy\n<\/code><\/pre>\n<p>Un nginx en la VPS: <code data-no-translation=\"\">root \/caminho\/do\/blog\/public;<\/code> e <code data-no-translation=\"\">hexo generate<\/code> en cron o en CI. Sin PHP, sin MariaDB.<\/p>\n<h2>Cierre<\/h2>\n<p>Node LTS, <code data-no-translation=\"\">hexo-cli<\/code> en el usuario, <code data-no-translation=\"\">hexo init<\/code>, <code data-no-translation=\"\">hexo s<\/code>, <code data-no-translation=\"\">hexo g<\/code>. El nvm 0.35 y Ubuntu 16.04 del post original no. Docs: <a href=\"https:\/\/hexo.io\/docs\/\">hexo.io\/docs<\/a> \u00b7 <a href=\"https:\/\/github.com\/hexojs\/hexo\">github.com\/hexojs\/hexo<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Hexo \u00e9 um gerador de site est\u00e1tico em Node.js: Markdown entra, HTML sai, sem banco. GitHub Pages, Netlify, um nginx apontando para public\/. Em setembro de 2026 o pacote npm hexo est\u00e1 na 8.1.2. O CLI oficial continua npm install &#8230; <a title=\"Instalando Hexo en Ubuntu\" class=\"read-more\" href=\"https:\/\/www.linuxpro.com.br\/es\/2017\/04\/install-hexo-on-ubuntu\/\" aria-label=\"Leer m\u00e1s sobre Instalando Hexo no Ubuntu\">Leer m\u00e1s<\/a><\/p>","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[54,68,4,35],"class_list":["post-129","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-hexo","tag-html","tag-linux","tag-www"],"_links":{"self":[{"href":"https:\/\/www.linuxpro.com.br\/es\/wp-json\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxpro.com.br\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxpro.com.br\/es\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/es\/wp-json\/wp\/v2\/comments?post=129"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxpro.com.br\/es\/wp-json\/wp\/v2\/posts\/129\/revisions"}],"predecessor-version":[{"id":1075,"href":"https:\/\/www.linuxpro.com.br\/es\/wp-json\/wp\/v2\/posts\/129\/revisions\/1075"}],"wp:attachment":[{"href":"https:\/\/www.linuxpro.com.br\/es\/wp-json\/wp\/v2\/media?parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/es\/wp-json\/wp\/v2\/categories?post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/es\/wp-json\/wp\/v2\/tags?post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}