mirror of
https://github.com/jakejarvis/hugo-docker.git
synced 2026-11-23 17:16:45 -05:00
Update README.md
This commit is contained in:
1 file changed
+8
-6
@@ -1,13 +1,15 @@
|
|||||||
# ✏️ [Hugo](https://github.com/gohugoio/hugo) via Docker
|
# ✏️ [Hugo Extended](https://github.com/gohugoio/hugo) via Docker
|
||||||
|
|
||||||
[](https://hub.docker.com/r/jakejarvis/hugo-extended)
|
[](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).
|
||||||
Reference in new issue
Block a user