Difference between revisions of "Mudlet Map Browser"
| Line 6: | Line 6: | ||
| By || <!-- handle|alias|name --> Delwing | | By || <!-- handle|alias|name --> Delwing | ||
|- | |- | ||
| − | | Download || [https://github.com/Delwing/ | + | | Download || [https://github.com/Delwing/mudlet-map-page Github] |
|- | |- | ||
| Dependencies || <!-- any package dependencies|mudlet version requirements --> Mudlet 4.17 | | Dependencies || <!-- any package dependencies|mudlet version requirements --> Mudlet 4.17 | ||
|} | |} | ||
| − | = | + | = Publishing a Mudlet map online = |
| − | |||
| − | + | This guide uses the [https://github.com/Delwing/mudlet-map-page mudlet-map-page] GitHub Action. You point it at your Mudlet binary map (<code>.dat</code>) and it decodes the map, generates the host page, and deploys it to GitHub Pages — no hand-written HTML and no in-browser <code>.dat</code> decoding. | |
| − | + | == Requirements == | |
| − | + | * A GitHub account and a repository to hold your map. | |
| − | + | * Your Mudlet map exported as a <code>.dat</code> file. In Mudlet: '''Options → Map → Save map''' (or <code>saveMap()</code> in the command line). | |
| − | + | == Steps == | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | === 1. Add your map to a repository === | |
| − | + | Create a repository (or reuse an existing one) and commit your map file, e.g. <code>maps/map.dat</code>. | |
| − | + | === 2. Add the workflow === | |
| − | https://ire-mudlet-mapping.github.io/AchaeaCrowdmap/ | + | Create the file <code>.github/workflows/pages.yml</code> with the following content, adjusting <code>map-file</code> and <code>title</code> to match your repo: |
| + | |||
| + | <syntaxhighlight lang="yaml"> | ||
| + | name: Map | ||
| + | |||
| + | on: | ||
| + | push: | ||
| + | branches: [main] | ||
| + | workflow_dispatch: | ||
| + | |||
| + | permissions: | ||
| + | contents: read | ||
| + | pages: write | ||
| + | id-token: write | ||
| + | |||
| + | jobs: | ||
| + | pages: | ||
| + | uses: Delwing/mudlet-map-page/.github/workflows/deploy-pages.yml@v1 | ||
| + | with: | ||
| + | map-file: maps/map.dat | ||
| + | title: My MUD Map | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | '''The <code>permissions</code> block is required.''' GitHub's default token is read-only, and <code>id-token: write</code> (needed for the Pages deploy) is never granted automatically, so the workflow fails at startup without it. | ||
| + | |||
| + | === 3. Enable GitHub Pages === | ||
| + | |||
| + | In your repository go to '''Settings → Pages'''. In the '''Build and deployment''' section set '''Source''' to '''GitHub Actions'''. | ||
| + | |||
| + | === 4. Publish === | ||
| + | |||
| + | Push to your <code>main</code> branch (or run the workflow manually from the '''Actions''' tab via '''Run workflow'''). When the run finishes it publishes the site and prints the URL in the run summary. | ||
| + | |||
| + | Your page is served at <code>https://{repositoryOwner}.github.io/{repository}/</code> | ||
| + | |||
| + | == Customising the page == | ||
| + | |||
| + | Pass extra options under <code>with:</code>. Common ones: | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! Input !! Description | ||
| + | |- | ||
| + | | <code>title</code> || Page title shown in the browser tab and header. | ||
| + | |- | ||
| + | | <code>logo</code> || Logo image — a URL, or a file in your repo (copied into the site). | ||
| + | |- | ||
| + | | <code>npc-url</code> || NPC data file to make NPCs searchable (URL or repo file). Opt-in; without it, room-id search still works. | ||
| + | |- | ||
| + | | <code>favicon</code> || Favicon — a URL, or a repo file copied in as <code>/favicon.ico</code>. | ||
| + | |- | ||
| + | | <code>lang</code> || Document language and default UI language (e.g. <code>pl</code>, <code>en</code>). | ||
| + | |- | ||
| + | | <code>credits-author</code> || Author name shown in the help/credits modal. | ||
| + | |} | ||
| + | |||
| + | See the [https://github.com/Delwing/mudlet-map-page#readme project README] for the full list of inputs (version pinning, extra assets, custom translations, etc.). | ||
| + | |||
| + | == Examples == | ||
| + | |||
| + | * https://delwing.github.io/arkadia-mapa/ | ||
| + | * https://ire-mudlet-mapping.github.io/AchaeaCrowdmap/ | ||
| + | |||
| + | == See also == | ||
| + | |||
| + | * [https://forums.mudlet.org/viewtopic.php?t=22983 Mudlet Forums thread] | ||
[[File:Mudlet Map Browser.png|thumb|left|screenshot]] | [[File:Mudlet Map Browser.png|thumb|left|screenshot]] | ||
Revision as of 09:11, 21 June 2026
| Game | non-mud specific |
| By | Delwing |
| Download | Github |
| Dependencies | Mudlet 4.17 |
Publishing a Mudlet map online
This guide uses the mudlet-map-page GitHub Action. You point it at your Mudlet binary map (.dat) and it decodes the map, generates the host page, and deploys it to GitHub Pages — no hand-written HTML and no in-browser .dat decoding.
Requirements
- A GitHub account and a repository to hold your map.
- Your Mudlet map exported as a
.datfile. In Mudlet: Options → Map → Save map (orsaveMap()in the command line).
Steps
1. Add your map to a repository
Create a repository (or reuse an existing one) and commit your map file, e.g. maps/map.dat.
2. Add the workflow
Create the file .github/workflows/pages.yml with the following content, adjusting map-file and title to match your repo:
name: Map
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
pages:
uses: Delwing/mudlet-map-page/.github/workflows/deploy-pages.yml@v1
with:
map-file: maps/map.dat
title: My MUD Map
The permissions block is required. GitHub's default token is read-only, and id-token: write (needed for the Pages deploy) is never granted automatically, so the workflow fails at startup without it.
3. Enable GitHub Pages
In your repository go to Settings → Pages. In the Build and deployment section set Source to GitHub Actions.
4. Publish
Push to your main branch (or run the workflow manually from the Actions tab via Run workflow). When the run finishes it publishes the site and prints the URL in the run summary.
Your page is served at https://{repositoryOwner}.github.io/{repository}/
Customising the page
Pass extra options under with:. Common ones:
| Input | Description |
|---|---|
title |
Page title shown in the browser tab and header. |
logo |
Logo image — a URL, or a file in your repo (copied into the site). |
npc-url |
NPC data file to make NPCs searchable (URL or repo file). Opt-in; without it, room-id search still works. |
favicon |
Favicon — a URL, or a repo file copied in as /favicon.ico.
|
lang |
Document language and default UI language (e.g. pl, en).
|
credits-author |
Author name shown in the help/credits modal. |
See the project README for the full list of inputs (version pinning, extra assets, custom translations, etc.).