Skip to content

Commit

Permalink
Add just recipes for local SSG development
Browse files Browse the repository at this point in the history
  • Loading branch information
samtay committed Sep 23, 2024
1 parent 3a0c530 commit cf48fce
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,31 @@ watch-tailwind:
cd app
npx tailwindcss -i ./input.css -o ./assets/tailwind.css --watch
# build SSG site
build-ssg:
#!/usr/bin/env bash
set -euxo pipefail
cd app
dx clean
dx build --profile release --platform static-generation --features static-generation
cd ..
./dist/birdtalk
cp -r ./static/* ./dist/public
rm -rf ./static
cd dist/public
sed -i 's/<html>/<html lang="en">/' index.html
sed -i 's/<html>/<html lang="en">/' birds/index.html
sed -i 's/<html>/<html lang="en">/' play/index.html
# serve SSG site
serve-ssg:
miniserve --spa --index index.html --port 3000 ./dist/public

# build and serve SSG site
build-and-serve-ssg:
just build-ssg
just serve-ssg

# deploy linode
deploy-linode:
rsync --compress --recursive --verbose --human-readable --progress --rsh ssh --exclude target --exclude app/.dioxus --exclude app/dist ~/code/birdtalk linode:
Expand Down

0 comments on commit cf48fce

Please sign in to comment.