Document Connected Library manifest layout
This commit is contained in:
@@ -20,6 +20,10 @@ This repository contains two primary packages. For detailed development informat
|
||||
- [Web Interface](apps/frontend/README.md)
|
||||
- [Desktop App](apps/app/README.md)
|
||||
|
||||
## Modrinth Plus
|
||||
|
||||
Modrinth Plus adds a Connected Library for Git-hosted modpacks. A connected modpack repository must expose a public `modrinth-plus.json` manifest in the repository root. See [Connected Library documentation](docs/connected-library.md) and the [connected modpack template](templates/connected-modpack/README.md).
|
||||
|
||||
## Contributing
|
||||
|
||||
We welcome contributions! Before submitting any contributions, please read our [contributing guidelines](https://docs.modrinth.com/contributing/getting-started/).
|
||||
|
||||
64
docs/connected-library.md
Normal file
64
docs/connected-library.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# Connected Library
|
||||
|
||||
Connected Library tracks a `.mrpack` export through a small JSON manifest hosted in a Git repository.
|
||||
|
||||
## Repository layout
|
||||
|
||||
The manifest must be named `modrinth-plus.json` and must live in the repository root:
|
||||
|
||||
```text
|
||||
my-modpack-repo/
|
||||
|-- modrinth-plus.json
|
||||
|-- CHANGELOG.md
|
||||
|-- README.md
|
||||
`-- exports/
|
||||
`-- MyModpack-1.0.0.mrpack
|
||||
```
|
||||
|
||||
When a user enters a repository URL, Modrinth Plus checks these raw URLs:
|
||||
|
||||
```text
|
||||
https://host/owner/repo/raw/branch/main/modrinth-plus.json
|
||||
https://host/owner/repo/raw/branch/master/modrinth-plus.json
|
||||
```
|
||||
|
||||
You can also paste the raw `modrinth-plus.json` URL directly.
|
||||
|
||||
## Manifest
|
||||
|
||||
```json
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"name": "My Modpack",
|
||||
"version": "1.0.0",
|
||||
"versionId": "my-modpack-1.0.0",
|
||||
"mrpackUrl": "https://git.example.com/owner/my-modpack/raw/branch/main/exports/MyModpack-1.0.0.mrpack",
|
||||
"sha512": "replace-with-the-lowercase-sha512-of-the-mrpack",
|
||||
"changelog": "Initial Connected Library release."
|
||||
}
|
||||
```
|
||||
|
||||
Fields:
|
||||
|
||||
- `schemaVersion`: Must be `1`.
|
||||
- `name`: Display name in Connected Library.
|
||||
- `version`: Human-readable version label.
|
||||
- `versionId`: Stable unique id for this release. Change it for every update.
|
||||
- `mrpackUrl`: Public HTTPS raw URL to the `.mrpack` file.
|
||||
- `sha512`: SHA-512 checksum of the `.mrpack` file.
|
||||
- `changelog`: Optional short release note shown in the app.
|
||||
|
||||
## Release workflow
|
||||
|
||||
1. Export a new `.mrpack` from the Modrinth App.
|
||||
2. Put it in `exports/` with a versioned filename.
|
||||
3. Calculate its SHA-512 checksum.
|
||||
4. Update `modrinth-plus.json` with the new `version`, `versionId`, `mrpackUrl`, `sha512`, and `changelog`.
|
||||
5. Commit and push the changes.
|
||||
6. In Modrinth Plus, click `Check for updates`.
|
||||
|
||||
On Windows, calculate the checksum with:
|
||||
|
||||
```powershell
|
||||
Get-FileHash -Algorithm SHA512 exports\MyModpack-1.0.0.mrpack
|
||||
```
|
||||
@@ -399,7 +399,11 @@ async fn resolve_manifest(
|
||||
}
|
||||
|
||||
Err(ErrorKind::InputError(format!(
|
||||
"Could not fetch {MANIFEST_FILE_NAME}. Tried: {}",
|
||||
concat!(
|
||||
"Could not fetch {MANIFEST_FILE_NAME}. Make sure the file ",
|
||||
"exists in the repository root or paste the raw manifest URL ",
|
||||
"directly. Tried: {}"
|
||||
),
|
||||
errors.join("; ")
|
||||
))
|
||||
.into())
|
||||
|
||||
5
templates/connected-modpack/CHANGELOG.md
Normal file
5
templates/connected-modpack/CHANGELOG.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- Initial Connected Library release.
|
||||
26
templates/connected-modpack/README.md
Normal file
26
templates/connected-modpack/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Connected Modpack Template
|
||||
|
||||
Use this layout for a modpack repository that should work with Modrinth Plus Connected Library.
|
||||
|
||||
```text
|
||||
.
|
||||
|-- modrinth-plus.json
|
||||
|-- CHANGELOG.md
|
||||
|-- README.md
|
||||
`-- exports/
|
||||
`-- YourPack-1.0.0.mrpack
|
||||
```
|
||||
|
||||
Update `modrinth-plus.json` after every exported `.mrpack` release. The file must stay in the repository root.
|
||||
|
||||
Connect with either the repository URL:
|
||||
|
||||
```text
|
||||
https://git.example.com/owner/your-pack
|
||||
```
|
||||
|
||||
or the raw manifest URL:
|
||||
|
||||
```text
|
||||
https://git.example.com/owner/your-pack/raw/branch/main/modrinth-plus.json
|
||||
```
|
||||
1
templates/connected-modpack/exports/.gitkeep
Normal file
1
templates/connected-modpack/exports/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
9
templates/connected-modpack/modrinth-plus.json
Normal file
9
templates/connected-modpack/modrinth-plus.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"name": "Your Pack",
|
||||
"version": "1.0.0",
|
||||
"versionId": "your-pack-1.0.0",
|
||||
"mrpackUrl": "https://git.example.com/owner/your-pack/raw/branch/main/exports/YourPack-1.0.0.mrpack",
|
||||
"sha512": "replace-with-the-lowercase-sha512-of-the-mrpack",
|
||||
"changelog": "Initial Connected Library release."
|
||||
}
|
||||
Reference in New Issue
Block a user