GithubHelp home page GithubHelp logo

docker-hexo's Introduction

docker-hexo

A Docker Container for Hexo.

docker-hexo image based on base image ubuntu:14.04, pandoc is optional for processing markdown files with better MathJax support and enhanced markdown such as footnotes.

Since docker do not provide easy user permissions control inside container. You should set the gid and uid as your current user while modifying the Dockerfile, $UID=1000 and $GID=100 are the default uid and gid.

Use example

For ease of use, you can set alias for tedious docker command in ~/.bashrc or ~/.zshenv. Be sure your current user are in docker group.

alias docker-hexo='docker run --rm -v "$PWD:/blog" -p 4000:4000 billryan/hexo'
alias hexo='docker-hexo hexo'

Use docker-hexo for npm install ..., and hexo for hexo ...

Example

hexo init <folder>
cd <folder>
docker-hexo npm install

If you want to use pandoc for markdown renderer, replace the docker-hexo with the following:

alias docker-hexo='docker run --rm -v "$PWD:/blog" -p 4000:4000 billryan/hexo:latest-pandoc'

Refer to wzpan/hexo-renderer-pandoc for more infomation. MathJax works perfect with pandoc, Play MathJax with hexo-renderer-pandoc is a good reference.

Install Hexo plugins

Various plugins can be found on Plugins · hexojs/hexo Wiki, replace npm with docker-hexo npm, happy Hexo with docker-hexo. :)

docker-hexo's People

Contributors

billryan avatar

Watchers

 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.