Build your own pack
A pack is a single JSON file. Write it, put it online, paste the address into Motleo.
1. Start from this file
Copy it, or download starter-pack.json. Change the details and add as many tidbits as you like.
{
"id": "my-first-pack",
"name": "My first pack",
"tidbits": [
{
"category": "Animals",
"title": "Octopuses have three hearts",
"text": "Two pump blood through the gills and one pumps it around the rest of the body.",
"src": "https://en.wikipedia.org/wiki/Octopus",
"srcLabel": "Wikipedia"
},
{
"category": "Words",
"title": "Petrichor",
"text": "The earthy smell that rises when rain falls on dry ground."
}
]
}
2. What goes in it
| Field | Required | Notes |
|---|---|---|
id | yes | 1 to 64 characters of a-z 0-9 . _ -. Must be unique across all the packs you load. |
name | yes | Up to 80 characters. Shown next to the category above each tidbit. |
tidbits[].title | yes | Up to 200 characters. |
tidbits[].text | yes | Up to 2000 characters. Plain text only, no HTML or Markdown. |
tidbits[].category | no | Up to 60 characters. A small label above the title. |
tidbits[].src | no | A link to the source. Must start with https; other links are dropped. |
tidbits[].srcLabel | no | Up to 80 characters. The link text. Without it, Motleo makes one from the link. |
A pack can hold up to 5000 tidbits and 1,000,000 characters in total. Tidbits without a title or text, and duplicate titles within a pack, are skipped.
3. Put it online
To share a pack, or to have Motleo refresh it for you, host it at an https address anywhere that serves the raw JSON:
- GitHub Pages, or any static web host.
- Your own server, or a company intranet. Motleo sends your cookies for that site, so a pack behind a login works.
- For testing,
http://localhostandhttp://127.0.0.1are also accepted.
Open the address in a browser first. You should see the JSON itself, not a page around it.
4. Add it to Motleo
From a file: you don't have to host anything to try a pack. On Motleo's options page, click Add from file… or drop your .json file onto the page. The file is read in your browser and never uploaded.
From a web address:
- Open a new tab and click Manage content packs.
- Paste the address of your file and add it.
- Your browser asks to let Motleo reach that site. Allow it. Motleo only downloads the pack when you add or refresh it, never in the background.
If something is wrong with the file, Motleo says what, for example that the id is not allowed or that no tidbit has both a title and text.
5. Keep it up to date
Edit the file. For a pack from a web address, use Refresh. For a pack loaded from a file, use Replace file and pick the file again, since the browser doesn't let Motleo re-read it on its own.
Ratings and view counts are tied to the pack id and each tidbit's title. Reordering or fixing a typo in the text keeps them. Changing a title or the pack id starts that tidbit, or the whole pack, from zero.
Tips for good tidbits
- Keep each one short enough to read in a few seconds. A new tab is a glance, not an article.
- Make the title a hook and the text the payoff.
- Add a source link when you can. It makes a surprising claim easy to check.
- Mix categories. Variety is the point.
Ready? Back to Motleo.