diff --git a/pack_web_offline.sh b/pack_web_offline.sh index a19348e..d4c7311 100755 --- a/pack_web_offline.sh +++ b/pack_web_offline.sh @@ -22,6 +22,7 @@ ### DOMAINNAME=example.com HOSTEDBYNAME=DeathByDenim ./pack_web_offline.sh set -e +bootstrap_version="5.3.0" if ! which jekyll > /dev/null; then echo "Jekyll is required to generate the website" @@ -32,12 +33,12 @@ webroot=${TMPDIR:-/tmp}/website mkdir -p ${webroot} cp -r "$(dirname "$0")"/website/* ${webroot} -curl --location https://github.com/twbs/bootstrap/archive/v5.2.3.zip > ${TMPDIR:-/tmp}/bootstrap.zip -unzip -o -d ${TMPDIR:-/tmp}/bootstrap ${TMPDIR:-/tmp}/bootstrap.zip "bootstrap-5.2.3/scss/*" +curl --location https://github.com/twbs/bootstrap/archive/v"${bootstrap_version}".zip > ${TMPDIR:-/tmp}/bootstrap.zip +unzip -o -d ${TMPDIR:-/tmp}/bootstrap ${TMPDIR:-/tmp}/bootstrap.zip "bootstrap-${bootstrap_version}/scss/*" if [ -d "$(dirname "$0")"/../website/_sass/bootstrap ]; then rm -r "$(dirname "$0")"/../website/_sass/bootstrap fi -mv ${TMPDIR:-/tmp}/bootstrap/bootstrap-5.2.3/scss ${webroot}/_sass/bootstrap +mv ${TMPDIR:-/tmp}/bootstrap/bootstrap-"${bootstrap_version}"/scss ${webroot}/_sass/bootstrap rm -r ${TMPDIR:-/tmp}/bootstrap.zip ${TMPDIR:-/tmp}/bootstrap if [ x"$NOSSL" = "x" ] || [ $NOSSL -ne 1 ]; then @@ -60,18 +61,7 @@ content: offline: true ssl: ${ssl} md5password: "$(echo -n "${systempassword}" | md5sum | cut -d' ' -f1)" - -defaults: - - - scope: - path: "" - type: "posts" - values: - layout: "post" - -plugins: - - jekyll-feed EOF jekyll build --source ${webroot} --destination ${webroot}/_site tar -cjf web.tar.bz2 --directory="${webroot}/_site" . -rm -rf "${webroot}" +#rm -rf "${webroot}" diff --git a/scripts/deploy_webserver.sh b/scripts/deploy_webserver.sh index b6d2cbc..373723d 100755 --- a/scripts/deploy_webserver.sh +++ b/scripts/deploy_webserver.sh @@ -17,6 +17,8 @@ set -e +bootstrap_version="5.3.0" + # Web dashboard systemctl enable --now nginx @@ -35,12 +37,12 @@ else fi # Generate the website and put in place -curl --location https://github.com/twbs/bootstrap/archive/v5.2.3.zip > ${TMPDIR:-/tmp}/bootstrap.zip -unzip -o -d ${TMPDIR:-/tmp}/bootstrap ${TMPDIR:-/tmp}/bootstrap.zip "bootstrap-5.2.3/scss/*" +curl --location https://github.com/twbs/bootstrap/archive/v"${bootstrap_version}".zip > ${TMPDIR:-/tmp}/bootstrap.zip +unzip -o -d ${TMPDIR:-/tmp}/bootstrap ${TMPDIR:-/tmp}/bootstrap.zip "bootstrap-${bootstrap_version}/scss/*" if [ -d "$(dirname "$0")"/../website/_sass/bootstrap ]; then rm -r "$(dirname "$0")"/../website/_sass/bootstrap fi -mv ${TMPDIR:-/tmp}/bootstrap/bootstrap-5.2.3/scss "$(dirname "$0")"/../website/_sass/bootstrap +mv ${TMPDIR:-/tmp}/bootstrap/bootstrap-"${bootstrap_version}"/scss "$(dirname "$0")"/../website/_sass/bootstrap rm -r ${TMPDIR:-/tmp}/bootstrap.zip ${TMPDIR:-/tmp}/bootstrap cat > "$(dirname "$0")"/../website/_config.yml < - var event_year = {{ event.date | date: "%Y" }}; - var event_month = {{ event.date | date: "%-m" }}; - var event_day = {{ event.date | date: "%e" }}; - var d = new Date(Date.UTC(event_year, event_month, event_day, {{ event.date | date: "%H" }}, {{ event.date | date: "%M" }})); -