-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document plugin manifests #25
Open
sersorrel
wants to merge
3
commits into
goatcorp:main
Choose a base branch
from
sersorrel:plugin-metadata
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Setting Plugin Metadata | ||
|
||
Writing a plugin is all well and good, but you're also going to want some way to | ||
configure how it appears in the plugin installer: its name, description, icon, | ||
and so on. You do this by writing a _plugin manifest_, which is a JSON or YAML | ||
file named after your plugin's internal name (for example: `SamplePlugin.yaml`). | ||
|
||
:::info | ||
|
||
When using a YAML manifest, you should replace CamelCase keys with snake_case | ||
(for example, where a JSON manifest would contain `RepoUrl`, a YAML manifest | ||
would contain `repo_url`). | ||
|
||
::: | ||
|
||
## Example | ||
|
||
A very basic YAML manifest might look something like this: | ||
|
||
```yaml | ||
name: Test Plugin | ||
author: You | ||
punchline: Does nothing! # short summary that fits on one line | ||
description: |- # long description, shown when your plugin is clicked on | ||
This is a test plugin - this first line is a summary. | ||
|
||
Down here is a more detailed explanation of what the plugin | ||
does, manually wrapped to make sure it stays visible in the | ||
installer. | ||
repo_url: https://example.com # where can users find your plugin's source code? | ||
``` | ||
|
||
## Available manifest keys | ||
|
||
These keys are required: | ||
|
||
- Name | ||
- Author | ||
- Description | ||
- Punchline | ||
|
||
Optional keys include: | ||
|
||
- ApplicableVersion | ||
- RepoUrl | ||
- Tags | ||
- CategoryTags | ||
- LoadRequiredState | ||
- LoadSync | ||
- CanUnloadAsync | ||
- LoadPriority | ||
- ImageUrls | ||
- IconUrl | ||
- Changelog | ||
- AcceptsFeedback | ||
- FeedbackMessage | ||
|
||
See [the DalamudPackager source][] for further information. (You may also be | ||
interested in [the properties Dalamud will load][], some of which are set | ||
automatically by the various plumbing that gets your plugins from GitHub to | ||
people's computers.) | ||
|
||
Note that the following keys are also required for Dalamud to load a plugin, but | ||
if you're using [DalamudPackager][], it will automatically fill them in for you, | ||
so **you can and should ignore these**: | ||
|
||
- AssemblyVersion | ||
- InternalName | ||
- DalamudApiLevel | ||
|
||
[DalamudPackager]: https://github.com/goatcorp/DalamudPackager | ||
[the DalamudPackager source]: | ||
https://github.com/goatcorp/DalamudPackager/blob/084f66e6af7edbf8a45820590ca71765376b901c/DalamudPackager/DalamudPackager.cs#L303 | ||
[the properties Dalamud will load]: | ||
https://github.com/goatcorp/Dalamud/blob/532781308d6291a2c0117e0e73a8252358e2d91a/Dalamud/Plugin/Internal/Types/PluginManifest.cs | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should link to IPluginManifest instead. It'll have all of the fields documented, instead of inheritdoc. I would also prefer if you linked to the Dalamud source as the "main" point.