update
This commit is contained in:
parent
634aae9963
commit
832af9305b
49
build.sh
49
build.sh
@ -1,7 +1,44 @@
|
||||
rm -rf build
|
||||
# rm -rf public
|
||||
npm run prod:build
|
||||
rsync -rav static/ public/
|
||||
echo 'see http://localhost:3000/'
|
||||
node -e '(e=require("express"))().use(e.static("public")).listen(3000)'
|
||||
echo "Starting build..."
|
||||
|
||||
# TODO: Check if current version is latest to avoid redundant installation
|
||||
if [[ -f "tailwindcss" ]]
|
||||
then
|
||||
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"
|
||||
feed = true
|
||||
paginate_by = 2
|
||||
paginate_path = "/blog-posts"
|
||||
paginate_path = "blog-posts"
|
||||
|
||||
[[taxonomies]]
|
||||
name = "roles"
|
||||
feed = true
|
||||
paginate_by = 2
|
||||
paginate_path = "/join-us"
|
||||
paginate_path = "join-us"
|
||||
|
||||
[[taxonomies]]
|
||||
name = "tags"
|
||||
feed = true
|
||||
paginate_by = 2
|
||||
paginate_path = "/join-us"
|
||||
paginate_path = "join-us"
|
||||
|
||||
[extra]
|
||||
# Put all your custom variables here
|
||||
|
@ -10,6 +10,6 @@ extra:
|
||||
|
||||
- [HOME]("/")
|
||||
- [BLOGS]("/blog")
|
||||
- [USE CASES]("/")
|
||||
- [USE CASES]("/use-cases")
|
||||
- [TECH]("/")
|
||||
- [GET IN TOUCH]("mailto:info@ourverse.tf")
|
||||
|
10
start.sh
10
start.sh
@ -1,22 +1,22 @@
|
||||
# builds if executable isn't foound
|
||||
if [ ! -f "tailwindcss" ]
|
||||
if [[ ! -f "tailwindcss" ]]
|
||||
then
|
||||
sh build.sh
|
||||
fi
|
||||
|
||||
# initialized and configures tailwind if not configured
|
||||
if [ ! -f "tailwind.config.js" ]
|
||||
if [[ ! -f "tailwind.config.js" ]]
|
||||
then
|
||||
tailwindcss init
|
||||
./tailwindcss init
|
||||
sed -i '' "s| content: \\[\\],| content: \\['./templates/**/*.html'\\],|g" tailwind.config.js
|
||||
fi
|
||||
|
||||
# compiles tailwind css & launches locally
|
||||
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
|
||||
tailwindcss -i css/index.css -o ./static/css/index.css --minify
|
||||
./tailwindcss -i css/index.css -o ./static/css/index.css --minify
|
||||
zola build
|
||||
|
||||
# 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