1
mirror of https://github.com/jakejarvis/hugo-docker.git synced 2025-04-26 06:05:23 -04:00

re-work installing third-party dependencies, such as:

- postcss-cli
- autoprefixer
- pygments
- asciidoctor
This commit is contained in:
Jake Jarvis 2020-05-17 16:07:47 -04:00
parent 3802fc5234
commit 24e16b7387
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
2 changed files with 19 additions and 5 deletions

View File

@ -20,11 +20,13 @@ RUN apk update && \
apk add --no-cache \
ca-certificates \
git \
asciidoctor \
python3 \
py3-pygments \
ruby \
${HUGO_EXTENDED:+libc6-compat libstdc++} && \
update-ca-certificates && \
npm install --global postcss-cli autoprefixer && \
pip3 install --upgrade Pygments==2.* && \
gem install asciidoctor && \
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_EXTENDED:+extended_}${HUGO_VERSION}_Linux-64bit.tar.gz && \
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_checksums.txt && \
grep hugo_${HUGO_EXTENDED:+extended_}${HUGO_VERSION}_Linux-64bit.tar.gz hugo_${HUGO_VERSION}_checksums.txt | sha256sum -c && \
@ -33,7 +35,11 @@ RUN apk update && \
chmod +x /usr/bin/hugo && \
rm -rf hugo_*
# make sure everything's okay
RUN hugo version
# verify everything's OK
RUN hugo env && \
postcss --version && \
autoprefixer --version && \
pygmentize -V && \
asciidoctor --version
ENTRYPOINT ["hugo"]

View File

@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: jakejarvis/hugo-build-action@master
- uses: jakejarvis/hugo-build-action@master # ...or replace 'master' with a full version tag, such as: v0.64.1
with:
args: --minify --buildDrafts
- uses: actions/upload-artifact@master
@ -29,6 +29,14 @@ jobs:
path: './public'
```
## Included Software
Just in case, the final container includes a few small third-party tools that are required by certain optional Hugo features.
- [Asciidoctor](https://asciidoctor.org/)
- [Pygments](https://pygments.org/)
- [PostCSS (CLI)](https://github.com/postcss/postcss-cli)
- [Autoprefixer](https://github.com/postcss/autoprefixer)
## Licenses