Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frioux/hugo.dkr
https://github.com/frioux/hugo.dkr
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/frioux/hugo.dkr
- Owner: frioux
- Created: 2015-12-23T20:39:44.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2020-06-13T18:07:28.000Z (over 4 years ago)
- Last Synced: 2024-10-22T12:00:29.417Z (2 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mdwn
Awesome Lists containing this project
README
# Hugo Container
## Usage
```
docker run -it --rm \
--publish 1313:1313 \
--volume $(pwd):/tmp/pwd \
--user $(id -u) \
frew/hugo \
server
```## Description
[Hugo](http://gohugo.io/) is a static site generator written in Go. It is
incredibly fast and efficient. Normally a container for a typical Go program
would be overkill, as the binaries are statically linked. In Hugo's case,
though, Python is used to syntax highlight code, along with a few libraries to
support that feature. This container includes everything to support the syntax
highlighting.## Ports
Port `1313` is exposed for the debug server.
## Volumes
The one exposed / required volume is `/tmp/pwd`, which represents the directory
you want to be Hugo's pwd.## Shortcut Usage
I recommend putting the following script in your path to make usage of this
container easier, presumably named `hugo`:```
#!/bin/dashexec docker run -it --rm \
--publish 1313:1313 \
--volume $(pwd):/tmp/pwd \
--user $(id -u) \
frew/hugo \
"$@"
```Note that because the above publishes to a static port you cannot, for instance,
run `hugo help` while `hugo server` is already running. I warmly welcome
patches to only add the `--publish 1313:1313` if `server` is the subcommand
being used.