first commit
This commit is contained in:
commit
6db283eb13
7
README.md
Normal file
7
README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#Hugo-Buildpack
|
||||||
|
|
||||||
|
## What is it?
|
||||||
|
|
||||||
|
A buildpack for easy deploy hugo website on dokku / heroku
|
||||||
|
|
||||||
|
## How to use it?
|
||||||
25
bin/compile
Normal file
25
bin/compile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
BUILD_DIR=$1
|
||||||
|
|
||||||
|
HUGO_VERSION=$(grep 'hugoVersion' $BUILD_DIR/config.yaml | cut -d '"' -f 2)
|
||||||
|
|
||||||
|
if [ -z "$HUGO_VERSION" ]; then
|
||||||
|
HUGO_VERSION="0.111.2" # default version
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Download and install Hugo
|
||||||
|
|
||||||
|
curl -s https://api.github.com/repos/gohugoio/hugo/releases/tags/v$HUGO_VERSION \
|
||||||
|
| grep browser_download_url \
|
||||||
|
| grep linux-amd64.deb \
|
||||||
|
| grep extended \
|
||||||
|
| cut -d '"' -f 4 \
|
||||||
|
| wget -i -
|
||||||
|
|
||||||
|
dpkg -i hugo*_linux-amd64.deb
|
||||||
|
rm hugo*_linux-amd64.deb
|
||||||
|
|
||||||
|
cd $BUILD_DIR
|
||||||
|
hugo
|
||||||
8
bin/detect
Normal file
8
bin/detect
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# check if config.toml or config.yaml exists
|
||||||
|
if [ -f "config.toml" ] || [ -f "config.yaml" ]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
0
bin/release
Normal file
0
bin/release
Normal file
Loading…
x
Reference in New Issue
Block a user