Skip to content

Thoughts about adapting a WYSIWYG editor to work with Cryogen #266

@simon-brooke

Description

@simon-brooke

Context

I'm setting up a website for an activist group most of whom are not geeks, and I need to make it as simple as possible for them to use.

Issue

Cryogen uses embedded EDN-formatted metadata at the beginning of Markdown files; existing WYSIWYG markdown editors don't recognise this, and Typora, the editor which I have been up to now actively using and recommending, inserts unneeded blank lines which, although they don't actually do harm, annoy my autistic soul and are distracting.

My initial approach to dealing with this problem was to implement metadata inference, which I've done and which has been merged into the current release and which works well for my personal blog, and for any site which has only one author.

However, where there are multiple authors, the author of each article will be shown as the last person to have executed lein run, which, in this case, will usually be a post-push git hook. I need to capture (at least) the actual author identity as metadata. The ability to have a :draft? boolean as metadata is also a very good one, and, actually, once you've accepted the idea that you need metadata you might as well have a full, extensible, suite of metadata.

Sidenote

Zettlr, a GPL licensed Markdown editor, uses embedded JSON metadata in a very similar way to Cryogen's embedded EDN metadata, and handles it well.

Proposed solutions

  1. Just say, "Simon, get over yourself" in an annoyed voice, very loudly. Embedded EDN metadata works, and non-geeks can be taught to edit it -- I can even provide them with a metadata template;
  2. Alter cryogen-core.compiler/using-embedded-metadata so that it recognises and reads either EDN formatted or JSON formatted metadata, and have the users use Zettlr;
  3. Choose an open source WYSIWYG markdown editor, fork it, and add a metadata editing pane to it (this is what I'm currently thinking of doing) -- this would require no change to Cryogen itself.

Relatedly, I am thinking of altering cryogen-core.infer-meta/infer-meta so that, having inferred metadata, it writes that metadata back to the file.

Thoughts, apart from the obvious "Simon, for heaven's sake, just get over yourself"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions