Code Monkey home page Code Monkey logo

weblorg-docker's Introduction

weblorg-docker

A companion container image that helps to streamline the iteration loop when developing emacs-love/weblorg sites.

The image nanzhong/weblorg is regularly built and pushed to Docker Hub. In general, nanzhong/weblorg:latest should be stable and ready for use. However, tags that are pinned to releases are built using the same name as the release and can be also be used.

How it works

This container handles the rebuild iteration loop that’s typical of static site generator. It expects a weblorg site to be mounted in and it will watch for changes triggering rebuilds as necessary. It imposes very little assumptions to how the weblorg site is configured except that a self-contained emacs lisp file exists that defines the weblorg site. Pre and post build scripts are also supported if additional processing is needed.

The built static site is served using Caddy on port 80.

Included dependencies

  • Emacs 27.1
  • sass
  • Caddy

Usage

Development

Example usage

docker run \
       -v $(pwd -P):/workspace \
       -p 8080:80 \
       --rm \
       --name weblorg \
       nanzhong/weblorg

This container image expects the weblorg site to be mounted as a volume into the container (by default to /workspace). A caddy file server serves the built static site on port 80. Any file changes will kick off a rebuild of the site.

One Time Build

docker run \
       -v $(pwd -P):/workspace \
       --rm \
       --name weblorg \
       nanzhong/weblorg build

This forgoes the file watching and serving of the static site and instead just performs a one time build of the site.

Configuration

There are a number environment variables that can be set to configure the behaviour. The defaults are shown below.

Env VarDefault ValueDescription
WORKSPACE/workspacePath in the container that the weblorg site is mounted to.
PRE_BUILD_SCRIPTpre.shPre-build script that will be run if it exists (e.g. sass compilation).
POST_BUILD_SCRIPTpost.shPost-build script that will be run if it exists (e.g. additional asset processing).
WEBLORG_DEFNpublish.elEmacs lisp script to run that contains the weblorg site definition.
WEBLORG_OUTPUT_PATHoutputThe directory configured in the weblorg site definition where the static site will be built to.

weblorg-docker's People

Contributors

nanzhong avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

maker2413

weblorg-docker's Issues

Support emacs 28

Now that emacs 28 released I think it would be a good idea to support emacs 28. It would be even better if there were image tags for version 27 and 28 of emacs.

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.