Some days ago during a sealcoding session we had a small offline discussion about what Sealpress can be and what’s the best way to implement it. The goal is to create a CMS that:
-
has structured, metadata-rich content;
-
can render to both html+http (with streaming support), as well as Gemini and any other protocols, thanks to the fact that content is NOT declared as HTML;
-
is easy to use while not hiding the markup from end-users;
-
supports good typography practices out of the box;
- hyphenation of words in order to have neat justified text
- paragraphs have reasonable max-width
- language metadata for proper hyphenation and screen reader support
- prevents short words from appearing at the end of the line by strategically injecting non-breaking spaces (important for Polish texts)
-
supports RSS (possibly with full-featured filtering);
-
uses no third-party assets on the front-end by:
- using only native fonts, while providing a good selection of those
- rendering as much as possible server-side
-
has a neat markup editing GUI with previews (split screen) that works with minimal amount of JS or event without any JS
-
supports operational transformation or Conflict-free Replicated Data Type in order to properly handle cases when two users work on the same article at the same time
-
supports code blocks syntax highlighting
-
automatically generate Table of Contents, with non-volatile heading IDs
-
enables programmers to create Layouts (including navbars, footers, sidebars) that wrap around Pages (the content itself)
That’s… a lot of requirements! I think pulling this off is entirely within our reach. We just need to divide the work into self-sufficient modules as much as possible, and use much of what we already have.
So. What needs to be built?
-
Abstract markup language for rich article content.
During the meeting we agreed that a cool way to go would be to have every article consist of some metadata and a list of components, represented as just an array of json objects. Each json object could represent a heading, a block of text, a codeblock, an image with a caption, etc. So we need:
-
a specification for that language
-
renderer for that language - something that takes the list of components and spits out html (via tempstream)
-
GUI for editing markup in this language. I don’t think we should expect the users to author json files by hand I imagine the interface as a column of text inputs, grouped into chunks, where each chunk represents one component added to the article. The user can add a new component anywhere between existing components or add a new one at the end. When they add a new component, a dropdown appears asking about the type of the component (is it a block of text? an image? a heading?) appears. When the type of the component is chosen, new inputs appear, that help the user enter all the information that a given component needs (if it’s an image - ask about alt text, style of the image (should it float to the right? or maybe be full-width?), etc).
To the right of that column is a live HTML preview, kind of how it works on Discourse.
It’s important to keep the list of the components open, so any end-user with some programming savvy can register their own components in the app and use it across all documents created in their instance.
-
-
Admin Panel and Integration of the markup tooling with Sealgen.
I imagine every Content Type in a Sealpress app would just be a Sealious collection that includes various fields. One of the fields could be the Rich Content field that would use markup designed in point 1. We then need to automatically create GUI forms for every content type that they have defined, with option to overwrite it with a custom UI if they so desire.
We’d also need to create a set of sane CSS defaults and embed them in the app.
If we combine those things into a neat package, we could make it so you can just run
npm init sealpress
and get a working simple CMS that’s just waiting to be customized and deployed
I’m eager to hear your thoughts! I assume there are still many gaps to fill in - don’t hesitate to ask here, so we can have a shared vision of what Sealpress can become. Also, if there’s a specific part of the system that you’re eager to start working on, now is the time to call dibs!