Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmooring/hugo-docker-test
Use this repository to test Hugo Docker containers
https://github.com/jmooring/hugo-docker-test
Last synced: about 1 month ago
JSON representation
Use this repository to test Hugo Docker containers
- Host: GitHub
- URL: https://github.com/jmooring/hugo-docker-test
- Owner: jmooring
- License: apache-2.0
- Created: 2023-08-05T22:30:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-29T16:15:13.000Z (about 2 months ago)
- Last Synced: 2024-12-14T00:10:53.079Z (about 1 month ago)
- Language: HTML
- Homepage:
- Size: 18 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hugo Docker Test
Use this repository to test Docker images such as:
- (official)
-These live sites were built with a [veriphor/hugo](https://hub.docker.com/r/veriphor/hugo) container:
- [Built and deployed on GitHub Pages](https://jmooring.github.io/hugo-docker-test/)
- [Built and deployed on GitLab Pages](https://jmooring.gitlab.io/hugo-docker-test/)This site is designed to test these features and capabilities:
1. Including content from a Hugo module
1. Transpiling Sass to CSS using Dart Sass
1. Vendor prefixing of CSS rules using the postcss, postcss-cli, and autoprefixer Node.js packages
1. Processing CSS files using the tailwindcss and @tailwindcss-cli Node.js packages
1. Encoding images to the WebP format to verify that we're using Hugo's extended edition
1. Including a content file named hugö.md to verify that the Git `core.quotepath` setting is `false`[^1]
1. Rendering of AsciiDoc content
1. Rendering of Pandoc content
1. Rendering of reStructuredText content
1. Enabling site search with PagefindTo test items 7-10 you must use the `-e extra` command line flag.
[^1]: See [issue #9810](https://github.com/gohugoio/hugo/issues/9810). Git's `core.quotepath` setting is `false` if `/other/hugö` has a non-zero "last modified" date.
[^2]: To test this characteristic you must use the `-e extra` command line flag.## Using the official Docker image
Clone the repository:
```text
git clone https://github.com/jmooring/hugo-docker-test
cd hugo-docker-test
```Then see the Hugo documentation for the relevant operating system:
- [BSD](https://gohugo.io/installation/bsd/#docker-container)
- [Linux](https://gohugo.io/installation/linux/#docker-container)
- [macOS](https://gohugo.io/installation/macos/#docker-container)
- [Windows](https://gohugo.io/installation/windows/#docker-container)Note that the official Docker image does not support items 7-10 above.
## Using the veriphor/hugo image
Clone the repository and install the Node.js packages:
```text
git clone https://github.com/jmooring/hugo-docker-test
cd hugo-docker-test
npm ci
```The commands below assume you have aliased `dhugo` to:
```text
docker run --rm -v .:/project -v $HOME/.cache/hugo_cache:/cache -u $(id -u):$(id -g) --network host veriphor/hugo hugo
```Build the site without Pagefind:
```text
dhugo server -e extra
```Build the site using a local installation of the Pagefind executable:
```text
dhugo -e extra && ./pagefind --site public --serve
```Build the site using the Pagefind executable within the Docker image:
```text
docker run --rm -v .:/project -v $HOME/.cache/hugo_cache:/cache -u $(id -u):$(id -g) --network host veriphor/hugo bash -c "hugo -e extra && pagefind --site public --serve"
```