I was looking for a more comfortable editing experience for using markdown, something offering an interactive preview alongside the editor input, and found marktext which has implemented an elegant solution by making the current input point be markdown input (pure text) and the rest of the document be preview.
But the Ghost admin api is all about mobiledoc, which, sadly, is a subset of markdown. It especially lacks tables, which I cannot live without).
Fortunately, a clever pioneer discovered that Ghost implements a markdown card (section?), so you can embed a whole markdown page into one section of a mobiledoc document. Maybe there is a way to use this editor with Ghost after all!
So here's my plan:
- verify my markdown-only posts can be fetched from Ghost Admin API, trivially edited and updated in place.
- Define a standardized YAML format of front matter to manage the editing process; must allow me to specify slug for new post but also edit existing post (via id), so I need an editable and a read-only sense. I'm willing to limit myself to a few well-known tags, so I don't have to synchronize the whole taxonomy between site and editor.
- Implement an editing workflow that integrates marktext with my Ghost admin site.
- Define a bunch of post templates with predefined front matter to make it easy to post a comment about a reddit or other post I find.
Let's see how this goes!