<div align="center">

###### *Welcome to the most complete database of all AppImage packages and portable applications for GNU/Linux.*

# PORTABLE LINUX APPS

### *the first AUR-inspired AppImage Software Center!*

--------

# Main page "[Portable-Linux-Apps.github.io](https://portable-linux-apps.github.io)"

--------

| *[Go to the applications list](https://portable-linux-apps.github.io/apps.html)* | *[Install "AM", the package manager](https://github.com/ivan-hc/AM)* |
| - | - |
| [<img loading="lazy" src="https://github.com/user-attachments/assets/f55d4242-bd5f-4195-946c-e01c6fe5e264" width="512" height="256">](https://portable-linux-apps.github.io/apps.html) | [<img loading="lazy" src="https://raw.githubusercontent.com/ivan-hc/AM/main/sample/sample.png" width="512" height="256">](https://github.com/ivan-hc/AM) |

### Testing

Most pages on this site are auto-generated by `tools/am2pla-site` in
the [`ivan-hc/AM`](https://github.com/ivan-hc/AM) repository — a
GitHub Actions workflow runs that script every 30 minutes and pushes
the output back to `main`. Hand-edits to generated files (`index.md`,
`apps.md`, `appimages.md`, the 24 category pages, `apps.json`, the
`am2pla-site` copy in this repo) are overwritten on the next sync.
Durable changes live in `_layouts/`, `assets/css/`, `assets/js/`,
`_config.yml`, `Gemfile`, this README, and `.github/workflows/`.

To test changes to the website before pushing or while working on a
pull request, pick one of the three options below. Docker is
recommended because the container matches the GitHub Pages build
environment and works on any host Ruby version.

</div>

#### Option 1: Docker (recommended, no local Ruby needed)

Uses the official `ruby:3.3` image, which matches the Ruby version GitHub
Pages itself builds with. The first run takes a few minutes while
`bundle install` compiles native gems; the named `jekyll-bundle` volume
caches them so later runs start quickly.

```sh
# delete any host-generated lockfile so the container can regenerate one
rm -f Gemfile.lock

docker run --rm -it -p 4000:4000 \
  -v "$PWD:/srv/jekyll" -w /srv/jekyll \
  -v jekyll-bundle:/usr/local/bundle \
  ruby:3.3 \
  bash -c "bundle install && bundle exec jekyll serve --host 0.0.0.0"
```

#### Option 2: Local Jekyll

* [Install Jekyll](https://jekyllrb.com/docs/installation/)
* In a terminal, change to the repository root directory
* run `bundle install` (only needed the first time, or after `Gemfile`
  changes)
* run `bundle exec jekyll serve`

Requires **Ruby 3.0 - 3.3**. The `github-pages` gem currently pins an old
version of `jekyll-github-metadata` (2.16.1) that crashes on Ruby 3.4+
with an `instance_variable_defined?` `NameError`. If your distribution
ships Ruby 3.4 or newer, use Docker (Option 1) or install Ruby 3.3 via a
version manager such as [`rbenv`](https://github.com/rbenv/rbenv) or
[`asdf`](https://asdf-vm.com/). The `Gemfile` declares `webrick` in the
`:development` group so `jekyll serve` works on Ruby 3.0+ (GitHub Pages
production does not use `webrick`).

#### Option 3: Testing changes to the site generation script

If you are changing `tools/am2pla-site` in the `ivan-hc/AM` repository
(the script that produces the catalog pages on every sync), run it
against a detached worktree of this site so the output doesn't pollute
your main checkout. The `sed` mirrors what the sync workflow does — it
neutralises the script's `cd "$(xdg-user-dir DESKTOP)"` so output lands
in the worktree instead of your Desktop directory.

```sh
# Adjust to wherever you have ivan-hc/AM cloned
AM_REPO=~/src/AM

# Detached worktree of this repo's main branch
git worktree add -d ../pla-site-test main

# Run the patched script inside the worktree
sed 's|^cd "$(xdg-user-dir|#&|' "$AM_REPO/tools/am2pla-site" > /tmp/am2pla-site-test
cd ../pla-site-test && bash /tmp/am2pla-site-test

# Preview with the Docker command from Option 1 (or use Option 2)
docker run --rm -it -p 4000:4000 \
  -v "$PWD:/srv/jekyll" -w /srv/jekyll \
  -v jekyll-bundle:/usr/local/bundle \
  ruby:3.3 \
  bash -c "bundle install && bundle exec jekyll serve --host 0.0.0.0"

# Clean up when done
cd - && git worktree remove --force ../pla-site-test
```

When the Docker container runs as root it leaves a root-owned
`_site/` and `Gemfile.lock` inside the worktree; `git worktree remove
--force` will fail to delete those, so finish with
`sudo rm -rf ../pla-site-test` if the remove complains.

#### Viewing the site

You will see messages that confirm that site has generated and the server is
running. Then in your browser, navigate to http://127.0.0.1:4000 to confirm
the changes you made are what you expected. Error messages will appear in the
terminal window from where you ran Jekyll. When you change a file, the site
will rebuild automatically (it will take a few moments and you'll be informed
in the terminal when it's done). However, if you change '_config.yml', you
must kill Jekyll with ctrl-c and run it again to test the change.

--------

*© 2020-present Ivan Alessandro Sala aka 'Ivan-HC'* - I'm here just for fun!

------------------------------------------------------------------------

| [**ko-fi.com**](https://ko-fi.com/IvanAlexHC) | [**PayPal.me**](https://paypal.me/IvanAlexHC) |
| - | - |

------------------------------------------------------------------------

