1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/hugo/arm/README.md

64 lines
1.2 KiB
Markdown
Raw Normal View History

2015-10-18 17:42:14 +02:00
hugo-arm
========
![](https://badge.imagelayers.io/vimagick/hugo-arm:latest.svg)
[hugo][1] makes the web fun again.
## Directory Tree
```
~/fig/hugo/
|-- docker-compose.yml
`-- www/
`-- themes/
`-- hyde/
```
## docker-compose.yml
```
hugo:
image: vimagick/hugo-arm
command: >
server --bind=0.0.0.0
--port=80
2016-05-01 03:06:20 +02:00
--baseUrl=http://blog.easypi.info/
2015-10-18 17:42:14 +02:00
--theme=hyde
--watch
ports:
- "80:80"
volumes:
- ./www:/www
restart: always
```
2015-10-18 18:18:11 +02:00
> **WARNING:** `hugo server` is for testing purpose.
> The default value of `--baseUrl` option is `http://<bind>:<port>/`.
> I set it to the same value as that in `config.toml` here.
> It maybe not a good practice.
2015-10-18 17:42:14 +02:00
## Up and Running
```
$ alias hugo='docker run --rm -v `pwd`:/www vimagick/hugo-arm'
$ cd ~/fig/hugo/www
$ curl -L https://github.com/spf13/hyde/archive/master.tar.gz | tar xz --strip 1 -C ./themes/hyde/
2015-10-18 18:18:11 +02:00
2015-10-18 17:42:14 +02:00
$ hugo new site .
$ vim config.toml
2015-10-18 18:18:11 +02:00
2015-10-18 17:42:14 +02:00
$ hugo new post/hello-world.md
$ vim content/post/hello-world.md
2015-10-18 18:18:11 +02:00
2015-10-18 17:42:14 +02:00
$ docker-compose up -d
2015-10-18 18:18:11 +02:00
$ hugo
2015-10-18 17:42:14 +02:00
```
2015-10-18 18:18:11 +02:00
> The last `hugo` command will use `baseurl` in `config.toml`.
2016-05-01 03:06:20 +02:00
Open <http://blog.easypi.info/> in your browser!
2015-10-18 17:42:14 +02:00
[1]: http://gohugo.io/