HUGO
Generador de páginas estáticas
2 minutos de lectura
Formato
- Eliminar espacio en blanco al usar shortcodes
Colorear código
- Usa Chroma, en su web se pueden ver los lenguajes soportados.
- https://gohugo.io/content-management/syntax-highlighting/
Fechas
- dateformat: https://gohugohq.com/howto/hugo-dateformat/
CSS
- CSS: https://discourse.gohugo.io/t/how-to-override-css-classes-with-hugo/3033/8
- CSSS
- https://gohugo.io/getting-started/configuration/#configure-build
- https://blog.fullstackdigital.com/how-to-use-hugo-template-variables-in-scss-files-in-2018-b8a834accce
- Prune
- resources : La carpeta resources es necesaria si no se usa hugo-extended
Layout
Linea de comandos
- Para probar con todo el contenido futuro o caducado
hugo server -DEF --gc --i18n-warnings --debug
-D, --buildDrafts -> include content marked as draft
-E, --buildExpired -> include expired content
-F, --buildFuture -> include content with publishdate in the future
--gc -> enable to run some cleanup tasks (remove unused cache files) after the build
--i18n-warnings -> print missing translations
-e production
Gitlab Pages
Usar gzip con Hugo
- Docu: 1 2
- Comando y para comprobarlo
find public \( -name '*.html' -o -name '*.css' -o -name '*.js' \) -exec gzip -fk {} +
Yarn
- Instalacion en imagenes de contenedores docker
- Instalar en alpine
apk add yarn
- V1 : https://classic.yarnpkg.com/en/docs/install-ci/
- Luego se puede actualizar a berry (v2)
- Instalar en alpine
- Comparación con npm : yarn > speed
- Instalacion en imagenes de contenedores docker
Articulos
- Inicial
- Medio
- Avanzado
- https://loadbalancing.xyz/post/blogging-with-hugo-and-gitlab-custom-domains/
- https://loadbalancing.xyz/post/blogging-with-hugo-and-gitlab-https-with-letsencrypt/
- https://elblogdelazaro.gitlab.io/post/2018-02-01-gitlab-pages-con-tls-y-letsencrypt
- https://loadbalancing.xyz/post/blogging-with-hugo-and-gitlab-letsencrypt-auto-renewal/
Temas
- Repositorio oficial -> https://github.com/gohugoio/hugoThemes
Documentación
Syna
- Instalación
git submodule init # If you haven't initialized before git submodule add https://github.com/okkur/syna.git themes/syna cd themes/syna git checkout v0.17 # Latest release as of now is v0.17.0
- Empezar proyecto desde 0 con plantilla
git clone https://github.com/okkur/syna-start && cd syna-start git submodule init git submodule update
- Documentación
CSS
- Resources
- PurgeCSS con PostCSS 1
- /postcss.config.js
- /config.toml :
[build] writeStats = true
Errores
- Failed to read Git log: Git executable not found in $PATH 1
#enableGitInfo
oapk add git
Docsy
- Requisitos
- hugo-extended
- postcss postcss-cli autoprefixer
- Actualizar
- Como submodulo
git submodule update --remote; git add themes/ ;
git commit -m "Updating theme submodule" ; git push origin master
- Como submodulo
SEO
- https://buttercms.com/blog/a-complete-dead-simple-guide-to-seo-for-static-site-generators
- https://buttercms.com/blog/creating-a-static-website-with-hugo-and-buttercms
- https://keithpblog.org/post/hugo-website-seo/
Comentarios
¿Fue útil esta página?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.