Giter Site home page Giter Site logo

hexo-dockerfile's Introduction

What is Hexo?

Hexo is a fast, simple & powerful blog framework, powered by Node.js. It allows for Blazing fast generation of pages, github flavored markdown, one command deployment, and a powerful plugin system

How to use this image

Start Hexo

This image will initialize a base hexo system by default using nginx and Hexo to generate the initial page. In addition, this image will generate your Hexo static files on start.

To start Hexo:

sudo docker run --name hexo -it -p 80:80 -v <hexo source dir>:/usr/share/nginx/html/source simplyintricate/hexo

You should now be able to see the default Hexo page on your server.

Customizing Hexo

Hexo can be further customized by either adding or mounting a local instance of _config.yml to /usr/share/nginx/html/_config.yml in the container. Adding is recommended by extending this image so you are able to preserve the immutability of the container for your Hexo needs. Here is an example Dockerfile

FROM simplyintricate/hexo
ADD _config.yml /usr/share/nginx/html/_config.yml

If you choose to mount the config instead, you may do so as such

sudo docker run --name hexo -it -p 80:80 -v <hexo source dir>:/usr/share/nginx/html/source -v <config path>:/usr/share/nginx/html/_config.yml simplyintricate/hexo

Interacting with Hexo

To interact with Hexo, such as for the purposes of publishing a new article, you may execute the docker exec command to communicate with the hexo command inside the container.

For example, to add re-generate your source files:

sudo docker exec -it hexo hexo generate

To create a new post:

sudo docker exec -it hexo hexo new "New Post"

The create command will create a new post in /usr/share/nginx/html/source which you can then modify on your host's source directory you have chosen.

hexo-dockerfile's People

Contributors

paulzfm avatar

Watchers

 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.