update
This commit is contained in:
parent
634aae9963
commit
832af9305b
49
build.sh
49
build.sh
@ -1,7 +1,44 @@
|
|||||||
rm -rf build
|
echo "Starting build..."
|
||||||
# rm -rf public
|
|
||||||
npm run prod:build
|
# TODO: Check if current version is latest to avoid redundant installation
|
||||||
rsync -rav static/ public/
|
if [[ -f "tailwindcss" ]]
|
||||||
echo 'see http://localhost:3000/'
|
then
|
||||||
node -e '(e=require("express"))().use(e.static("public")).listen(3000)'
|
rm tailwindcss
|
||||||
|
fi
|
||||||
|
|
||||||
|
# checks os and architecture for correct release
|
||||||
|
# https://stackoverflow.com/a/8597411
|
||||||
|
echo "Installing & building tailwind..."
|
||||||
|
ASSET="tailwindcss"
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
|
ASSET="$ASSET-linux"
|
||||||
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
ASSET="$ASSET-macos"
|
||||||
|
fi
|
||||||
|
if [[ "$(uname -m)" == "x86_64"* ]]; then
|
||||||
|
ASSET="$ASSET-x64"
|
||||||
|
elif [[ "$(uname -m)" == "arm64"* ]]; then
|
||||||
|
ASSET="$ASSET-arm64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -sLO "https://github.com/tailwindlabs/tailwindcss/releases/latest/download/${ASSET}"
|
||||||
|
chmod +x $ASSET
|
||||||
|
mv $ASSET tailwindcss
|
||||||
|
|
||||||
|
|
||||||
|
# initialized and configures tailwind if not configured
|
||||||
|
echo "Initializing tailwind..."
|
||||||
|
if [[ ! -f "tailwind.config.js" ]]
|
||||||
|
then
|
||||||
|
./tailwindcss init
|
||||||
|
sed -i '' "s| content: \\[\\],| content: \\['./templates/**/*.html'\\],|g" tailwind.config.js
|
||||||
|
fi
|
||||||
|
|
||||||
|
# compiles tailwind css for prod & builds project
|
||||||
|
echo "Compiling tailwindcss and building zola project..."
|
||||||
|
rm -rf public static/css
|
||||||
|
./tailwindcss -i css/index.css -o ./static/css/index.css --minify
|
||||||
|
zola build
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,19 +55,19 @@ smart_punctuation = true
|
|||||||
name = "categories"
|
name = "categories"
|
||||||
feed = true
|
feed = true
|
||||||
paginate_by = 2
|
paginate_by = 2
|
||||||
paginate_path = "/blog-posts"
|
paginate_path = "blog-posts"
|
||||||
|
|
||||||
[[taxonomies]]
|
[[taxonomies]]
|
||||||
name = "roles"
|
name = "roles"
|
||||||
feed = true
|
feed = true
|
||||||
paginate_by = 2
|
paginate_by = 2
|
||||||
paginate_path = "/join-us"
|
paginate_path = "join-us"
|
||||||
|
|
||||||
[[taxonomies]]
|
[[taxonomies]]
|
||||||
name = "tags"
|
name = "tags"
|
||||||
feed = true
|
feed = true
|
||||||
paginate_by = 2
|
paginate_by = 2
|
||||||
paginate_path = "/join-us"
|
paginate_path = "join-us"
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
# Put all your custom variables here
|
# Put all your custom variables here
|
||||||
|
@ -10,6 +10,6 @@ extra:
|
|||||||
|
|
||||||
- [HOME]("/")
|
- [HOME]("/")
|
||||||
- [BLOGS]("/blog")
|
- [BLOGS]("/blog")
|
||||||
- [USE CASES]("/")
|
- [USE CASES]("/use-cases")
|
||||||
- [TECH]("/")
|
- [TECH]("/")
|
||||||
- [GET IN TOUCH]("mailto:info@ourverse.tf")
|
- [GET IN TOUCH]("mailto:info@ourverse.tf")
|
||||||
|
10
start.sh
10
start.sh
@ -1,22 +1,22 @@
|
|||||||
# builds if executable isn't foound
|
# builds if executable isn't foound
|
||||||
if [ ! -f "tailwindcss" ]
|
if [[ ! -f "tailwindcss" ]]
|
||||||
then
|
then
|
||||||
sh build.sh
|
sh build.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# initialized and configures tailwind if not configured
|
# initialized and configures tailwind if not configured
|
||||||
if [ ! -f "tailwind.config.js" ]
|
if [[ ! -f "tailwind.config.js" ]]
|
||||||
then
|
then
|
||||||
tailwindcss init
|
./tailwindcss init
|
||||||
sed -i '' "s| content: \\[\\],| content: \\['./templates/**/*.html'\\],|g" tailwind.config.js
|
sed -i '' "s| content: \\[\\],| content: \\['./templates/**/*.html'\\],|g" tailwind.config.js
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# compiles tailwind css & launches locally
|
# compiles tailwind css & launches locally
|
||||||
rm -rf public static/css
|
rm -rf public static/css
|
||||||
tailwindcss -i css/index.css -o ./static/css/index.css --watch & zola serve &
|
./tailwindcss -i css/index.css -o ./static/css/index.css --watch & zola serve &
|
||||||
|
|
||||||
# compiles tailwind css for prod & builds project
|
# compiles tailwind css for prod & builds project
|
||||||
tailwindcss -i css/index.css -o ./static/css/index.css --minify
|
./tailwindcss -i css/index.css -o ./static/css/index.css --minify
|
||||||
zola build
|
zola build
|
||||||
|
|
||||||
# kills zola and tw bg processes on interrupt
|
# kills zola and tw bg processes on interrupt
|
||||||
|
BIN
tailwindcss
Executable file
BIN
tailwindcss
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user