Skip to content

Commit

Permalink
Improve justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
salif committed Dec 10, 2024
1 parent ea9ef98 commit 1b44f44
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
## Links

- [Demo site](https://salif.github.io/linkita/en/)
- [Demo source on Codeberg](https://codeberg.org/salif/linkita-demo)
- [Demo source on GitHub](https://github.com/salif/linkita/tree/demo)

- [Linkita source on Codeberg](https://codeberg.org/salif/linkita)
- [Linkita source on GitHub](https://github.com/salif/linkita)

- [Demo source](https://codeberg.org/salif/linkita-demo)
- [Demo source mirror](https://github.com/salif/linkita/tree/demo)
- [Theme source](https://codeberg.org/salif/linkita)
- [Theme source mirror](https://github.com/salif/linkita)
- [Matrix chat room](https://matrix.to/#/#linkita:mozilla.org)

- [Zola Themes Collection](https://salif.github.io/zola-themes-collection/)
Expand Down
18 changes: 11 additions & 7 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
#!/usr/bin/env -S just --justfile

just := just_executable() + " --justfile '" + justfile() + "'"
just := just_executable()
zola := "zola"
git := "git"
browser := "brave"
screenshot_url := "http://127.0.0.1:1111"

_:
@command {{ just }} --list --unsorted
@command {{ just }} --list --list-heading 'Available recipes for demo:{{ "\n" }}'

[group('dev')]
[private]
serve-and args='':
command {{ zola }} serve {{ args }} --interface 0.0.0.0 --base-url \
$(ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p')
"$(ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p')"

[doc('Serve the demo site')]
[group('dev')]
serve: (serve-and)
serve: serve-and

[doc('git push')]
[group('dev')]
push-demo:
command {{ git }} push codeberg-demo demo
command {{ git }} push github demo

[doc('Format source code')]
[group('dev')]
format:
command {{ just }} --fmt --unstable
Expand All @@ -39,8 +42,9 @@ set-screenshot-mode mode='light' schema='org.x.apps.portal':
fi
[group('dev')]
add-screenshot screenshot_url=screenshot_url browser=browser:
command {{ browser }} --headless --disable-gpu --screenshot=static/images/screenshot.png --window-size=1400,936 \
--hide-scrollbars --force-device-scale-factor=1.2 "{{ screenshot_url }}/en/"
update-screenshot screenshot_url=screenshot_url browser=browser:
command {{ browser }} --headless --disable-gpu --screenshot=static/images/screenshot.png \
--window-size=1400,936 --hide-scrollbars --force-device-scale-factor=1.2 "{{ screenshot_url }}/en/"
magick static/images/screenshot.png -gravity north -crop '1360x765+0+0' static/images/screenshot.png
-mat2 --inplace static/images/screenshot.png
cp static/images/screenshot.png ./themes/linkita/screenshot.png
Binary file modified static/processed_images/04-gutenberg.faa753e9bf9c7908.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/processed_images/05-example.ae15f30d897ab593.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/processed_images/06-example.c154d01e3ae79960.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/processed_images/07-example.0bae5e2aea7a32b4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/processed_images/08-example.5c0108fc0d117d1c.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion themes/linkita
Submodule linkita updated from 7fb96c to 663cdb

0 comments on commit 1b44f44

Please sign in to comment.