Update README.md

This commit is contained in:
jake authored and GitHub committed 2020-07-26 10:43:41 -04:00
1 parent d719294af7
commit a80a8bb35e
1 file changed
+8 -6
+8 -6
View File
@@ -1,13 +1,15 @@
# ✏️ [Hugo](https://github.com/gohugoio/hugo) via Docker # ✏️ [Hugo Extended](https://github.com/gohugoio/hugo) via Docker
[![Build docs](https://img.shields.io/docker/cloud/build/jakejarvis/hugo-extended?label=Docker%20Hub&logo=docker&logoColor=%23fff)](https://hub.docker.com/r/jakejarvis/hugo-extended) [![Build docs](https://img.shields.io/docker/cloud/build/jakejarvis/hugo-extended?label=Docker%20Hub&logo=docker&logoColor=%23fff)](https://hub.docker.com/r/jakejarvis/hugo-extended)
A base image to ease local development of Hugo sites, including [Hugo Extended](https://gohugo.io/troubleshooting/faq/#i-get-tocss-this-feature-is-not-available-in-your-current-hugo-version) (with SASS/SCSS support) and third-party tools [listed below](#third-party-software). A base image to ease local development of Hugo sites, including [Hugo Extended](https://gohugo.io/troubleshooting/faq/#i-get-tocss-this-feature-is-not-available-in-your-current-hugo-version) (with SASS/SCSS support) and optional third-party tools ([listed below](#third-party-software)).
## Usage ## Usage
### Command line ### Command line
This will start a live server at http://localhost:1313/ from the Hugo site in your current directory:
```bash ```bash
docker run -v $(pwd):/src -p 1313:1313 jakejarvis/hugo-extended:latest server --buildDrafts --buildFuture --bind 0.0.0.0 docker run -v $(pwd):/src -p 1313:1313 jakejarvis/hugo-extended:latest server --buildDrafts --buildFuture --bind 0.0.0.0
``` ```
@@ -15,7 +17,7 @@ docker run -v $(pwd):/src -p 1313:1313 jakejarvis/hugo-extended:latest server --
### `docker-compose.yml` ### `docker-compose.yml`
```yaml ```yaml
version: 3 version: '3'
services: services:
hugo: hugo:
@@ -27,9 +29,9 @@ services:
command: server --buildDrafts --buildFuture --bind 0.0.0.0 command: server --buildDrafts --buildFuture --bind 0.0.0.0
``` ```
### Live server ### Notes
When using Docker to run a live server (via `hugo server`), you must pass `--bind 0.0.0.0` as an argument to fix some networking quirks between Hugo, the container, and the host. When using Docker to run a live server (i.e. `hugo server`), you must pass `--bind 0.0.0.0` as an argument to fix some networking quirks between Hugo, the container, and the host.
## Third-party software ## Third-party software
@@ -45,4 +47,4 @@ Node (with NPM and Yarn) and Go (for [Hugo Modules](https://gohugo.io/hugo-modul
## Licenses ## Licenses
This action is distributed under the [MIT License](LICENSE.md). Hugo is distributed under the [Apache License 2.0](https://github.com/gohugoio/hugo/blob/master/LICENSE). This project is distributed under the [MIT License](LICENSE.md). Hugo is distributed under the [Apache License 2.0](https://github.com/gohugoio/hugo/blob/master/LICENSE).