Browse Source

Added files for Hugo extended in Netlify

resume-pdf
Kevin Mok 4 years ago
parent
commit
486827f466
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 4
      .gitlab-ci.yml
  2. 15
      netlify-build-fix.sh
  3. 5
      package.json

4
.gitlab-ci.yml

@ -17,6 +17,6 @@ pages:
artifacts:
paths:
- public
# only:
# - master
only:
- master

15
netlify-build-fix.sh

@ -0,0 +1,15 @@
#!/bin/bash
HUGO_FLAVOUR="hugo_extended"
HUGO_VERSION="0.53"
[ -z "${NF_IMAGE_VERSION}" ] && exit 0
rm -fr *.deb
wget --no-clobber http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb || exit 1
wget --no-clobber https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_FLAVOUR}_${HUGO_VERSION}_Linux-64bit.deb || exit 1
grep "hugo=" ~/.bashrc || echo "alias hugo='LD_LIBRARY_PATH=$(pwd)/tmp/usr/lib/x86_64-linux-gnu $(pwd)/tmp/usr/local/bin/hugo'" >> ~/.bashrc
find -name '*.deb' -exec dpkg -x {} $(pwd)/tmp \;
rm -fr *.deb
exit 0

5
package.json

@ -0,0 +1,5 @@
{
"scripts": {
"build": "NF_IMAGE_VERSION=1 bash ./netlify-build-fix.sh && LD_LIBRARY_PATH=$(pwd)/tmp/usr/lib/x86_64-linux-gnu $(pwd)/tmp/usr/local/bin/hugo"
}
}
Loading…
Cancel
Save