All Projects → jguyomard → Docker Hugo

jguyomard / Docker Hugo

Licence: mit
🐳 Docker Image for Hugo, a fast and flexible static site generator

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Docker Hugo

Hugo Boilerplate
A Hugo boilerplate for building modern websites
Stars: ✭ 58 (-3.33%)
Mutual labels:  static-site-generator, hugo
hugo-gulp-template
Enhanced template for Hugo projects
Stars: ✭ 28 (-53.33%)
Mutual labels:  static-site-generator, hugo
influencer-hugo
Influencer is a Hugo theme for book authors and writers. It has also Snipcart supports for order books and payments.
Stars: ✭ 66 (+10%)
Mutual labels:  static-site-generator, hugo
Hugo
Docker image for Hugo, the static-site generator. Includes HTMLProofer for testing.
Stars: ✭ 54 (-10%)
Mutual labels:  static-site-generator, hugo
Ox Hugo
A carefully crafted Org exporter back-end for Hugo
Stars: ✭ 591 (+885%)
Mutual labels:  static-site-generator, hugo
hugo-minimalist-theme
Port of Raphael Riegger's Minimalistic Ghost theme to Hugo.
Stars: ✭ 25 (-58.33%)
Mutual labels:  static-site-generator, hugo
hugo-initio
Hugo Theme port of Initio bootstrap template by GetTemplate
Stars: ✭ 58 (-3.33%)
Mutual labels:  static-site-generator, hugo
persian-hugo
Persian is a box design personal blog theme based on Bootstrap and powered by Hugo. It is very responsive and perfectly fits on any sized screen device.
Stars: ✭ 32 (-46.67%)
Mutual labels:  static-site-generator, hugo
bookworm-light
Bookworm is a clean and modern Hugo blog theme focused on high speed and support multiple authors.
Stars: ✭ 59 (-1.67%)
Mutual labels:  static-site-generator, hugo
hugo-travelify-theme
Port of Aigars Silkalns's Wordpress theme Travelify to Hugo. Demo -
Stars: ✭ 34 (-43.33%)
Mutual labels:  static-site-generator, hugo
timer-hugo
Timer is a personal portfolio theme powered by Hugo. It also can be use as a landing page theme.
Stars: ✭ 123 (+105%)
Mutual labels:  static-site-generator, hugo
Awesome Docs With Static Site Generators
Pointers to all templates and implementations based on static site generators
Stars: ✭ 44 (-26.67%)
Mutual labels:  static-site-generator, hugo
contentful-export
Extract Contentful to Hugo
Stars: ✭ 22 (-63.33%)
Mutual labels:  static-site-generator, hugo
navigator-hugo
Navigator Business theme powered by Hugo. It also could be used for a personal portfolio.
Stars: ✭ 133 (+121.67%)
Mutual labels:  static-site-generator, hugo
trailing-slash-guide
Understand and fix your static website trailing slash issues!
Stars: ✭ 255 (+325%)
Mutual labels:  static-site-generator, hugo
forty
Forty theme - Hugo theme ported from HTML5UP origrinal theme called Forty.
Stars: ✭ 116 (+93.33%)
Mutual labels:  static-site-generator, hugo
contentful-hugo
A CLI tool that pulls data from Contentful and turns it into markdown files for Hugo and other static site generators. It also includes an express server that can be used for local development and content previews
Stars: ✭ 31 (-48.33%)
Mutual labels:  static-site-generator, hugo
hugofy-vscode
Hugofy is a plugin for Visual Studio Code to make life easier to use Hugo static site generator
Stars: ✭ 27 (-55%)
Mutual labels:  static-site-generator, hugo
snipcart-hugo-integration
Hugo Website Tutorial with a Live Static E-Commerce Example
Stars: ✭ 38 (-36.67%)
Mutual labels:  static-site-generator, hugo
Wowchemy Hugo Modules
🔥 Hugo website builder, Hugo themes & Hugo CMS. No code, build with widgets! 创建在线课程,学术简历或初创网站。
Stars: ✭ 6,093 (+10055%)
Mutual labels:  static-site-generator, hugo

Hugo Docker Image

Docker Automated build Docker Build Status Docker Pulls Image Info

Hugo is a fast and flexible static site generator, written in Go. Hugo flexibly works with many formats and is ideal for blogs, docs, portfolios and much more. Hugo’s speed fosters creativity and makes building a website fun again.

This Lightweight Docker Image is based on Alpine, and comes with rsync for Continuous Deployment.

Get Started

Print Hugo Help:

docker run --rm -it jguyomard/hugo-builder hugo help

Create a new Hugo managed website:

docker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder hugo new site mysite
cd mysite

# Now, you probably want to add a theme (see https://themes.gohugo.io/):
git init
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke;
echo 'theme = "ananke"' >> config.toml

Add some content:

docker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder hugo new posts/my-first-post.md

# Now, you can edit this post, add your content and remove "draft" flag:
xdg-open content/posts/my-first-post.md

Build your site:

docker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder hugo

Serve your site locally:

docker run --rm -it -v $PWD:/src -p 1313:1313 -u hugo jguyomard/hugo-builder hugo server -w --bind=0.0.0.0

Then open http://localhost:1313/ in your browser.

To go further, read the Hugo documentation.

Bash Alias

For ease of use, you can create a bash alias:

alias hugo='docker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder hugo'
alias hugo-server='docker run --rm -it -v $PWD:/src -p 1313:1313 -u hugo jguyomard/hugo-builder hugo server --bind 0.0.0.0'

Now, you can use hugo help, hugo new foo/bar.md, hugo-server -w, etc.

Supported tags

The latest builds are:

A complete list of available tags can be found on the docker store page.

Users

By default, this docker image run as the root user. This makes it easy to use as base image for other Dockerfiles (switching back and forth adds extra layers and is against the current best practices advised by Docker). Most (all official?) base images leave the default user as root.

However, this docker image also define a non-root user hugo (UID 1000, GID 1000) which can be switched on at run time using the --user flag to docker run.

docker run --rm -it -v $PWD:/src --user hugo jguyomard/hugo-builder hugo

You can also change this according your needs, by setting another UID/GID. For instance, to run hugo with user www-data:www-data (UID 33, GID 33) :

docker run --rm -it -v $PWD:/src -u 33:33 jguyomard/hugo-builder hugo

Extras

The extras tag adds additional tools and packages:

  • py-pygments

To use this version:

docker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder:extras hugo

Continuous Deployment

I use this Docker image for Continuous Deployment. You can find some CI config examples in the ci-deploy directory.

This Docker image also comes with:

  • rsync
  • git
  • openssh-client
  • minify

Issues

If you have any problems with or questions about this docker image, please contact me through a GitHub issue. If the issue is related to Hugo itself, please leave an issue on the Hugo official repository.

Contributing

You are invited to contribute new features, fixes or updates to this container, through a Github Pull Request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].