Coder Social home page Coder Social logo

conoro / docker-hugo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hubci/hugo-docker

0.0 3.0 0.0 23 KB

Docker image for Hugo, the static-site generator. Includes HTMLProofer for testing.

Home Page: https://hub.docker.com/r/felicianotech/docker-hugo/

License: MIT License

Shell 100.00%

docker-hugo's Introduction

Docker Hugo Logo

Docker Hugo Build Status Docker Repository Software License

A Docker image for Hugo, a static-site generator. Includes HTMLProofer for testing. Hosted on Docker Hub.

Currently, this Docker image is designed to be used as a base image on CircleCI 2.0 for building, testing, and deploying Hugo based websites.

I plan to make this image useful for local testing and build/test/deploy on Travis CI as well in the future.

Using on CircleCI

Using this image to build your Hugo generated website on CircleCI 2.0 can be as simple as using the following configuration in .circleci/config.yml:

version: 2
jobs:
  build:
    docker:
      - image: felicianotech/docker-hugo:0.22.1
    working_directory: ~/project
    steps:
      - checkout
      - run:
          name: "Run Hugo"
          command: HUGO_ENV=production hugo -v -s src/
      - run:
          name: "Test Website"
          command: htmlproofer src/public --allow-hash-href --check-html --empty-alt-ignore --disable-external

In this example, we assume the Hugo files are in a directory called src in the repo. A full walkthrough on how to do this can be found on CircleCI's blog.

Building The Images

To prepare new images, I run ./gen-dockerfiles.sh locally, passing it the current Hugo versions that I am "supporting". For example, for the initial release, I ran ./gen-dockerfiles.sh 0.18.1 0.19.

I then commit the resulting files and push up to GitHub. CircleCI builds everything and publishes the new Docker images to Docker Hub.

Websites Using This & Examples

The following sites use Hugo and this image (and some have their config public):

Feedback & Contributing

Please feel free to open GitHub Issues for any questions, bugs, request, etc. You can also write a new post on Hugo's forum and ping me, FelicianoTech. Pull Request welcome as well.

docker-hugo's People

Contributors

felicianotech avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.