One site in.
One entry per post.
A recipe for the Morse CLI, bash and jq. Point it at a folder of Markdown from Hugo, Astro, Jekyll or Obsidian. Every file becomes one Morse entry, a map file makes it safe to run again, and a CI job publishes on every push.
Two recipes in the Morse cookbooks, not a hosted importer. Your repo stays the source.
- hello-world.mdENTRY0
- second-post.mdENTRY1
- third-post.mdENTRY2
- "hello-world"0
- "second-post"1
- "third-post"2
It does not care what built the site.
- Hugo
- Astro
- Jekyll
- Obsidian
- A plain repocontent/posts/*.md
A folder of Markdown files is all the recipe needs. Each file is published as it is, and its name, without the extension, becomes the entry name.
Morse stores bytes as they are. Front matter goes in untouched, and your renderer keeps working.
The whole importer
fits on one screen.
No package to install beyond the CLI and jq. Read it once and you know everything it will do to your publication. It does three jobs, marked in the margin.
#!/usr/bin/env bash
set -euo pipefail
MAP=morse-map.json
EPOCHS=${EPOCHS:-30}
[ -f "$MAP" ] || echo '{}' > "$MAP"
for f in content/posts/*.md; do
name=$(basename "$f" .md)
if jq -e --arg n "$name" '.[$n]' "$MAP" \
>/dev/null; then
echo "skip $name (already published)"; continue
fi
echo "add $name"
out=$(morse --json -q entry add "$name" \
--file "$f" --epochs "$EPOCHS")
id=$(echo "$out" | jq -r '.entryId')
tmp=$(mktemp)
jq --arg n "$name" --arg id "$id" \
'.[$n] = {entryId: ($id|tonumber), file: $n}' \
"$MAP" > "$tmp" && mv "$tmp" "$MAP"
done
echo "done, $(jq length "$MAP") entries in $MAP"- 01Skip what the map already has.A file whose name is in the map was published on an earlier run, so it is left alone.
- 02One file, one entry.The content goes to Walrus and the record to Sui. Each
entry addsigns two transactions. - 03Write the id back.The entry id returned by the CLI is saved against the filename before the next file starts.
# how many files, and how big $ ls content/posts/*.md | wc -l $ du -ch content/posts/*.md | tail -1 # the publication and collection to fill $ morse use my-blog posts $ morse status $ chmod +x import.sh $ EPOCHS=30 ./import.sh
The script is the recipe's, with long lines wrapped to fit; it behaves the same. morse use, status, entry add and their flags checked against morse-cli 0.14.0 with --help on 19 Nov 2026, and the script run twice on Testnet the same day.
Run it twice.
Nothing doubles.
Entry names are not unique on chain, so a careless second run would publish every post again. The map is what prevents that. If a run stops halfway, run it again and it picks up where it left off.
$ EPOCHS=30 ./import.sh add hello-world add second-post add third-post done, 3 entries in morse-map.json
Three files, three entries. The map is created and filled as it goes.
$ EPOCHS=30 ./import.sh skip hello-world (already published) skip second-post (already published) skip third-post (already published) done, 3 entries in morse-map.json
Nothing is signed and nothing is spent. A new file in the folder would be the only line that says add.
# an edited post is a new revision, not a new entry $ id=$(jq -r '.["second-post"].entryId' \ morse-map.json) $ morse revision publish-direct "$id" \ --file content/posts/second-post.md \ --epochs 30
The script does not notice edits. You push one with this command, and the earlier revision stays on the record.
- hello-worldENTRY ID0
- second-postENTRY ID1
- third-postENTRY ID2
It is the only thing that ties a filename to an entry id. Keep it next to your content. Your site generator or reader app needs it to fetch post bodies from Walrus.
Push to main.
The new post publishes.
A second recipe runs the same script in GitHub Actions. There is no deploy step and no server to keep up: the repo is the source, Sui and Walrus hold what was published, and the map links the two.
- TRIGGERPush to mainOnly when a post or the map changed.
- SET UPInstall the CLICheckout, Node, then the Morse CLI from npm.
- CHECK
morse --yes -q statusThe same context as your machine, with no prompts. - PUBLISH
./import.shFiles that are not in the map become entries. - COMMITSave the mapCommitted back, so the next run knows what exists.
MORSE_PRIVATE_KEYThe CI wallet's key, as a repository secret. Never written to disk.MORSE_NETWORKtestnet, so no profile is needed.MORSE_PUBLICATIONThe publication id, as a repository variable.MORSE_COLLECTIONposts, the collection to fill.
Make a separate wallet for the pipeline, fund it with a little SUI and WAL, and issue it a PublisherCap from your owner wallet. If CI ever leaks the key, you revoke one cap and move on. It is the same key model as Morse Agent Publisher, with a pipeline as the author.
As written, the job publishes new posts. An edited post is pushed with the revision command above, or with a hash check you add to the script.
Four ways it goes wrong, and what to do.
All four come from the recipe. None of them is hidden by the script, so it is better to meet them here.
- Running without the map
- What happens
- Entry names are not unique on chain, so every post is published a second time.
- What to do
- Always keep the map, and commit it.
- Images and other assets
- What happens
- A Markdown file only carries text. Its images are not imported with it.
- What to do
- Publish each asset as its own entry, or keep assets on a plain host for now.
- Big files
- What happens
- Walrus storage cost scales with size and with the number of epochs.
- What to do
- Keep posts as Markdown, and strip embedded base64.
- A Testnet reset
- What happens
- Entries and blobs are gone, and the map points at nothing.
- What to do
- Delete the map and run the script again.
- Time
- About 15 minutes, then about 20 for CI
- Tools
- The Morse CLI, bash and jq
- You bring
- A folder of .md files, and a publication with a collection to fill
- Wallet
- SUI for gas and WAL for storage
- Network
- Written for Testnet. Public content also runs on Walrus Mainnet.
A recipe.
Not a migration service.
Nobody runs this for you, and nothing is taken from your repo: the import adds a record of every post on Morse and leaves your site as it was. Four things are yours to know.
- 01You run it.The recipe is two docs pages and a script. The Morse CLI is before 1.0.
- 02Walrus Mainnet is real money.Public content works there, but there is no faucet and every write spends SUI and WAL. Do the first import on Testnet.
- 03Storage is a paid lease.
EPOCHSsets how long each post is paid for. When a lease ends the content can go offline, while its record on Sui remains. - 04Posts go in public.The script publishes plain entries. Encryption works out of the box on Testnet only; on Walrus Mainnet it needs your own Seal key-server credentials.
Morse Press runs a journal for you with an agent you set up in a form: its sources, its brain and its voice. No folder of Markdown needed.
Morse Uploader puts files on Walrus from the browser and shares them with a link. It is a separate tool with its own kind of record, not a step of this import.
Before you run it.
Is Site Importer a tool I install?
No. It is a short bash script from the Morse docs that calls the Morse CLI and jq. You copy it into your repo, read it, and run it. Nothing is hosted for you.
Which site generators does it work with?
Any that keeps posts as Markdown files: Hugo, Astro, Jekyll, Obsidian or a plain repo. Morse stores the bytes as they are, so front matter goes in untouched and your existing renderer keeps working.
Does it change my existing site?
No. It reads your folder and writes one new file, the map. Your posts, your generator and your hosting stay as they are.
What about images?
They are not imported with the post. A Markdown file only carries text, so publish each asset as its own entry or keep assets on a plain host for now.
What does an import cost?
On Testnet, faucet tokens. On Walrus Mainnet, real SUI for gas and WAL for storage: Walrus charges per blob per epoch, so the total size and the epoch count are what matter. The recipe starts with a dry run that counts both before you spend anything.
How long does an imported post stay readable?
As long as its storage is paid for. The lease is counted in epochs and set by EPOCHS when you run the script. When a lease ends the content can go offline; the record of what was published and when remains on Sui.