clue / docker-sculpin

Sculpin Docker image, a static site generator
3 stars 0 forks source link

docker-sculpin

Sculpin is a static site generator written in PHP. This is a docker image that eases setup.

About sculpin

From the official homepage:

Sculpin is a static site generator written in PHP. It converts Markdown files, Twig templates or standard HTML into a static HTML site that can be easily deployed.

Why Sculpin?

Install

This docker image is available as a trusted build on the docker index, so using it is as simple as running:

$ docker run clue/sculpin

Running this command for the first time will download the image automatically. Further runs will be immediate, as the image will be cached locally.

To further ease running, it's recommended to set up a much shorter alias so that you can easily execute it as just sculpin:

$ alias sculpin='docker run -it --rm -p 8000:8000 -v `pwd`:/data -u `id -u` clue/sculpin'

This will create a temporary alias. In order to make it persist reboots, you can append this exact line to your ~/.bashrc (or similar) like this:

$ alias sculpin >> ~/.bashrc

While this might seem complicated at first, it's actually a rather common setup following docker's conventions:

Usage

Once installed, running sculpin is as simple as if it was installed manually.

You can invoke it like this:

$ sculpin list

Getting started

If you're new to sculpin, you should probably jump straight to their getting started guide:

$ git clone https://github.com/sculpin/sculpin-blog-skeleton.git myblog
$ cd myblog

Run sculpin

From the official getting started guide

$ sculpin generate --watch --server

The watch flag tells Sculpin to watch the files for changes, and when changed to re-generate the site automatically. server launches PHP's web server which lets you see your work in progress from http://localhost:8000. After having run this command, a new directory, output_dev, will appear in your project, folder.