diff --git a/README.md b/README.md index 1781c23..f423e62 100644 --- a/README.md +++ b/README.md @@ -711,6 +711,7 @@ Open bug reports and feature requests on [Codeberg](https://codeberg.org/salif/l ## Blogs using this theme - [salif.eu](https://salif.eu): Personal website +- [Zola Themes Collection](https://salif.github.io/zola-themes-collection/) If you use Linkita, feel free to create a pull request to add your site to this list. diff --git a/justfile b/justfile index 1acf395..12c799e 100755 --- a/justfile +++ b/justfile @@ -4,23 +4,25 @@ just := just_executable() + " --justfile '" + justfile() + "'" zola := "zola" git := "git" npm := "npm" +browser := "brave" +screenshot_url := "http://127.0.0.1:1111" version_major := "0" version_minor := `date +%Y_%m_%d` version_patch := "0" version := version_major + "." + version_minor + "." + version_patch _: - @{{ just }} --list --unsorted + @command {{ just }} --list --unsorted [group('user')] switch-to-latest: - {{ git }} checkout $({{ git }} describe --tags $({{ git }} \ + command {{ git }} checkout $(command {{ git }} describe --tags $(command {{ git }} \ rev-list --tags --max-count=1)) [group('dev')] [private] serve-and args='': - {{ zola }} serve {{ args }} --interface 0.0.0.0 --base-url \ + 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') [group('dev')] @@ -28,24 +30,24 @@ serve: (serve-and) [group('dev')] push-linkita: - {{ git }} push codeberg linkita - {{ git }} push github linkita + command {{ git }} push codeberg linkita + command {{ git }} push github linkita [group('dev')] release: (release-json version) && (release-git version) - {{ npm }} run build - @{{ git }} add ./static/main.css - {{ zola }} check - {{ git }} diff --cached --quiet - @! {{ git }} show-ref --tags 'v{{ version }}' --quiet + command {{ npm }} run build + @command {{ git }} add ./static/main.css + command {{ zola }} check + command {{ git }} diff --cached --quiet + @! command {{ git }} show-ref --tags 'v{{ version }}' --quiet @printf '%s\n' 'Releasing v{{ version }}' [confirm("Are you sure?")] [group('dev')] [private] release-git version: - {{ git }} tag -s -a 'v{{ version }}' -m 'Release v{{ version }}' - {{ git }} push --follow-tags + command {{ git }} tag -s -a 'v{{ version }}' -m 'Release v{{ version }}' + command {{ git }} push --follow-tags [group('dev')] [private] @@ -60,15 +62,23 @@ release-json version: [group('dev')] format: - {{ just }} --fmt --unstable + command {{ just }} --fmt --unstable [group('dev')] -add-screenshot url='127.0.0.1:1111' browser='brave' forcelight='false' schema='org.x.apps.portal': - if [[ "{{ forcelight }}" == "true" ]]; then \ - if [[ "$(gsettings get {{ schema }} color-scheme)" == "'prefer-dark'" ]]; then \ - gsettings set {{ schema }} color-scheme 'prefer-light'; fi; fi - {{ browser }} --headless --disable-gpu --screenshot=screenshot.png --window-size=1400,936 \ - --hide-scrollbars --force-device-scale-factor=1.2 "http://{{ url }}/en/" +set-screenshot-mode mode='light' schema='org.x.apps.portal': + #!/usr/bin/env bash + if [[ "{{ mode }}" == "light" ]]; then + if [[ "$(gsettings get {{ schema }} color-scheme)" != "'prefer-light'" ]]; then + gsettings set {{ schema }} color-scheme 'prefer-light'; fi + elif [[ "{{ mode }}" == "dark" ]]; then + if [[ "$(gsettings get {{ schema }} color-scheme)" != "'prefer-dark'" ]]; then + gsettings set {{ schema }} color-scheme 'prefer-dark'; fi + fi + +[group('dev')] +add-screenshot screenshot_url=screenshot_url browser=browser: + command {{ browser }} --headless --disable-gpu --screenshot=screenshot.png --window-size=1400,936 \ + --hide-scrollbars --force-device-scale-factor=1.2 "{{ screenshot_url }}/en/" magick screenshot.png -gravity north -crop '1360x765+0+0' screenshot.png -mat2 --inplace screenshot.png cp screenshot.png static/images/ diff --git a/theme.toml b/theme.toml index 1700a4b..f3e0107 100644 --- a/theme.toml +++ b/theme.toml @@ -4,6 +4,7 @@ license = "MIT" homepage = "https://codeberg.org/salif/linkita" min_version = "0.19.0" demo = "https://salif.github.io/linkita/en/" +tags = ["Blog", "SEO-friendly", "Multilingual", "Responsive"] [author] name = "Salif Mehmed"