mirror of
https://gitlab.com/octtspacc/sitoctt
synced 2025-06-05 22:09:20 +02:00
Fixes to search, local-file-tweaks, test ajax-navigation, update Buttons, add offline.zip packaging
This commit is contained in:
@ -11,8 +11,10 @@ cp -r \
|
||||
../hugo.toml ../static \
|
||||
./
|
||||
|
||||
if [ "${sitocttEnv}" = GitHub ]
|
||||
then cp ./layouts/partials/assetsRoot.GitHub.html ./layouts/partials/assetsRoot.html
|
||||
if [ -n "${sitocttEnv}" ]
|
||||
then
|
||||
sed -i -e "s|#${sitocttEnv}:||g" ./hugo.toml
|
||||
mv "./layouts/partials/assetsRoot.${sitocttEnv}.html" ./layouts/partials/assetsRoot.html || true
|
||||
fi
|
||||
|
||||
sh "${swd}/Translate/Get.sh"
|
||||
|
14
Scripts/Deploy.sh
Executable file
14
Scripts/Deploy.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$(realpath "$0")")/Lib/Globals.sh"
|
||||
cd "${swd}/.."
|
||||
|
||||
sh "${swd}/Requirements.sh"
|
||||
rm -rf ./dist
|
||||
|
||||
sh "${swd}/Produce.sh"
|
||||
mv ./build/public ./dist
|
||||
|
||||
sh "${swd}/Package.sh"
|
||||
mv ./build/public/offline.zip ./dist/
|
||||
|
||||
cd "${owd}"
|
14
Scripts/Package.sh
Executable file
14
Scripts/Package.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$(realpath "$0")")/Lib/Globals.sh"
|
||||
cd "${swd}/.."
|
||||
|
||||
export sitocttEnv=Offline
|
||||
export HUGO_ENV=production
|
||||
sh "${swd}/Clean.sh"
|
||||
sh "${swd}/Update.sh"
|
||||
|
||||
cd ./build/public
|
||||
#zip -9 -r ./offline.zip *
|
||||
7z a -tzip -mcp=437 -mx9 ./offline.zip *
|
||||
|
||||
cd "${owd}"
|
@ -3,6 +3,7 @@
|
||||
cd "${swd}/.."
|
||||
|
||||
export HUGO_ENV=production
|
||||
sh "${swd}/Clean.sh"
|
||||
sh "${swd}/Update.sh"
|
||||
sh "${swd}/Redirects.sh"
|
||||
|
||||
|
@ -37,7 +37,11 @@ nicename="$(echo "${nicepath}" | rev | cut -d/ -f1 | rev)"
|
||||
# fi
|
||||
#done
|
||||
for path in "${nicepath}" #${extrapaths}
|
||||
do sed -e "s|{URL}|./${nicename}/|g" ../../redirectTemplate.html > "${path}.html"
|
||||
do cat ../layouts/alias.html \
|
||||
| sed -e "s|{{ .Permalink }}|./${nicename}/|g" \
|
||||
| sed -e "s|{{ $canonicalUrl }}|./${nicename}/|g" \
|
||||
| sed -e "s|{{ site.Language.LanguageCode }}||g" \
|
||||
> "${path}.html"
|
||||
done
|
||||
#if [ "$(echo "{}" | cut -d/ -f2)" = it ]
|
||||
#then
|
||||
|
@ -11,7 +11,7 @@ hugoexternal=true
|
||||
if [ -n "$(which apt)" ]
|
||||
then
|
||||
asroot apt update
|
||||
asroot apt install -y python3 nodejs findutils git tar gzip wget
|
||||
asroot apt install -y python3 nodejs findutils git wget tar gzip p7zip-full #zip
|
||||
if [ "$(uname -o)" != Android ]
|
||||
then asroot apt install -y npm
|
||||
else
|
||||
@ -21,7 +21,7 @@ then
|
||||
elif [ -n "$(which apk)" ]
|
||||
then
|
||||
asroot apk update
|
||||
asroot apk add hugo python3 py3-pip nodejs npm findutils git tar gzip wget
|
||||
asroot apk add hugo python3 py3-pip nodejs npm findutils git wget tar gzip 7zip #zip
|
||||
hugoexternal=false
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user