Hi everyone, today I was trying to migrate content from an old blog to my Leaflet publication, and failed.
I tried a couple of tools, sequoia and marmite. Both published `site.standard.document` objects to my PDS containing a seemingly well-formed `textContent` field.
What I found surprising is that the Leaflet editor could see those posts were there, but I couldn’t edit them from the UI, and trying to open them would give me HTTP 404.
There’s probably a combination of things here, because both tools insisted in setting canonical URLs that didn’t make sense for Leaflet. I deliberately deleted the records so I have no receipts to point at.
Aside from that though, I took a step back and found that probably I had some misconceptions about what standard.site is or tries to be. Initially, I thought creating a well-formed `site.standard.document` was enough for me to import it to Leaflet. But then I saw that the Leaflet documents have a `content` property made of blocks, which is what the editor expects.
Is my current understanding of standard.site correct? And has anyone successfully imported content from other blogs to Leaflet or other standard.site-compatible apps?
2 Likes
Hello, welcome!
The tools you used take your existing blog and publish metadata about your blog to standard site, but don’t import it to the atmosphere. Text content is there for indexing.
To import to leaflet, you’d need to write a script to turn each post into the leaflet lexicon and then create a lexicon. Which is totally possible!
I wrote a script to go from a Ghost blog to Offprint’s format bmann.ca/ghostoff at main · Tangled
You could look at that for inspiration and otherwise use the Leaflet lexicon.
Here’s a link to leaflet lexicon
4 Likes
Thanks @bmann.ca ! I’ll definitely have a look at that script.
There must be something about how Leaflet specifically works that I’m missing. Initially I also thought I needed some extra data, but I noticed that, after Leaflet announced the migration to standard.site, no more `pub.leaflet.document` objects have been created in my PDS PDSls, despite having published quite a few Leaflet posts that do exist as `site.standard.document`.
If you look, the standard site docs have pub.leaflet.content inside it. So leaflet has switched to standard site directly.
Here’s my electric catamaran post https://pdsls.dev/at://did:plc:2cxgdrgtsmrbqnjkwyplmp43/site.standard.document/3mtjgnwfaos2v#record
On the other hand, Offprint makes wrapper posts that are offprint document article - with a strong ref to a standard site doc https://pdsls.dev/at://did:plc:lehcqqkwzcwvjvw66uthu5oq/app.offprint.document.article/3msi24wnuv42j
Which then have content of Type app.offprint.content inside it.
So: standard site document as standard wrapper, which inside can either be more “native” lexicon types like leaflet or offprint - as well as a pointer to where it lives, like an off protocol blog.
I think even when you get the pub.leaflet.content right leaflet still won’t let you edit the post in the leaflet UI at the moment. @awarm.space has a PR to fix that soon though: @awarm.space on Bluesky
1 Like
Thanks for the pointer @disnetdev.com . I think this was indeed the combination of 2 separate problems then: some faulty data generated by sequoia and marmite, and the lack of edit support on Leaflet for externally authored posts. I’ll watch this space, hopefully my next batch of migrated posts will be mostly automatic 
1 Like
You might want to look at https://standard.horse which can help with authoring and editing posts in multiple standard site formats.
2 Likes