Skip to content

Commit 2e01b80

Browse files
committed
docs(plg-file): improve formatting and add optional required app/file details
1 parent 1729517 commit 2e01b80

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

docs/plg-file.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: default
33
title: PLG File Reference
44
nav_order: 3
55
---
6-
6+
<!-- markdownlint ignore MD022 -->
77
# PLG File Reference
88

99
{: .note }
@@ -75,14 +75,14 @@ The `<PLUGIN>` tag supports these attributes:
7575
### Required Attributes
7676

7777
| Attribute | Description |
78-
|-----------|-------------|
78+
| --------- | ----------- |
7979
| `name` | Unique plugin identifier. Must match the folder names used. No spaces or special characters. |
8080
| `version` | Version string for update comparison. LimeTech uses `YYYY.MM.DD` format. |
8181

8282
### Recommended Attributes
8383

8484
| Attribute | Description |
85-
|-----------|-------------|
85+
| --------- | ----------- |
8686
| `author` | Displayed in Plugin Manager. Defaults to "anonymous" if omitted. |
8787
| `pluginURL` | URL to download latest version. Required for update checking. |
8888
| `support` | Link to support thread (usually Unraid forums). |
@@ -92,7 +92,7 @@ The `<PLUGIN>` tag supports these attributes:
9292
### Optional Attributes
9393

9494
| Attribute | Description |
95-
|-----------|-------------|
95+
| --------- | ----------- |
9696
| `launch` | Menu path to open after installation. Format: `MenuSection/PageTitle` |
9797
| `icon` | FontAwesome icon name (without `fa-` prefix) for Plugin Manager. |
9898
| `min` | Minimum Unraid version required (e.g., `"6.9.0"`). |
@@ -170,6 +170,7 @@ The `Run` attribute specifies a command to execute after the file is placed:
170170
```
171171

172172
Common `Run` values:
173+
173174
- `upgradepkg --install-new` - Install Slackware package
174175
- `upgradepkg --install-new --reinstall` - Force reinstall even if same version
175176
- `/bin/bash` - Run as a shell script
@@ -251,11 +252,13 @@ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAA...
251252
The `Type="base64"` attribute tells the plugin system to decode the content before writing the file.
252253

253254
**When to use base64 embedding:**
255+
254256
- Small icons (< 10KB recommended)
255257
- Files that rarely change
256258
- Reducing external dependencies during install
257259

258260
**Generate base64 content:**
261+
259262
```bash
260263
base64 -w 0 icon.png
261264
# Or with line wrapping (easier to read in PLG)
@@ -267,7 +270,7 @@ base64 icon.png
267270
The `Method` attribute controls when a FILE element is processed:
268271

269272
| Method | When Processed |
270-
|--------|----------------|
273+
| ------ | -------------- |
271274
| (none) | During install only |
272275
| `install` | During install (explicit) |
273276
| `remove` | During plugin removal only |
@@ -411,6 +414,7 @@ echo ""
411414
### 1. Use Consistent Naming
412415

413416
The plugin name, folder names, and package name should all match:
417+
414418
- Plugin name: `myplugin`
415419
- Flash folder: `/boot/config/plugins/myplugin/`
416420
- emhttp folder: `/usr/local/emhttp/plugins/myplugin/`
@@ -439,6 +443,7 @@ This ensures file integrity and helps with caching. Use SHA256 for new plugins:
439443
```
440444

441445
Generate checksums with:
446+
442447
```bash
443448
sha256sum file.txz # SHA256 (recommended)
444449
md5sum file.txz # MD5 (legacy)
@@ -464,11 +469,23 @@ If your plugin requires specific Unraid features:
464469
<PLUGIN ... min="6.9.0">
465470
```
466471

467-
### 6. Include All Required URLs
472+
### 6. Optional Community Applications requirements (CA)
473+
474+
Community Applications supports additional plugin dependency hints that are read from plugin metadata (and are useful for app feed behavior):
475+
476+
- `<Requires>` (optional) — other plugin names/IDs that are expected to exist before this plugin is useful.
477+
- `<RequiresFile>` (optional) — a filesystem path to a file to verify before enabling install/reinstall actions.
478+
- Example: `<RequiresFile>/var/log/plugins/unassigned.devices.plg</RequiresFile>`
479+
- If the file does not exist, the plugin may still be shown, but install/reinstall buttons are disabled until the dependency appears.
480+
- `min`/`max` version controls in the PLG still take precedence when evaluating eligibility.
481+
482+
> Source: Community Applications plugin template guidance from Squid (Unraid forum): https://forums.unraid.net/topic/42808-plugin-templates-for-ca-appstore/
483+
484+
### 7. Include All Required URLs
468485

469486
For updates to work, `pluginURL` must point to the raw PLG file:
470487

471-
```
488+
```text
472489
https://raw.githubusercontent.com/user/repo/branch/plugin.plg
473490
```
474491

0 commit comments

Comments
 (0)