All Projects → thesephist → merlot

thesephist / merlot

Licence: MIT license
Web based Markdown writing app built with isomorphic Ink and Torus

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects
Makefile
30231 projects

Projects that are alternatives of or similar to merlot

Writefreely
A clean, Markdown-based publishing platform made for writers. Write together, and build a community.
Stars: ✭ 2,479 (+1609.66%)
Mutual labels:  writing, blogging
cross-post
Cross Post a blog to multiple websites
Stars: ✭ 66 (-54.48%)
Mutual labels:  writing, blogging
markdown-memo
Compile simple (or not so simple) Markdown memos to html and/or pdf via LaTeX with pandoc.
Stars: ✭ 19 (-86.9%)
Mutual labels:  writing, blogging
Openlivewriter
An open source fork of Windows Live Writer
Stars: ✭ 2,398 (+1553.79%)
Mutual labels:  writing, blogging
maverick
Web IDE and REPL for the Ink programming language, written in pure Ink on a self-hosted compiler toolchain
Stars: ✭ 26 (-82.07%)
Mutual labels:  torus-dom, ink-programming-language
dillinger
The last Markdown editor, ever.
Stars: ✭ 7,533 (+5095.17%)
Mutual labels:  writing, blogging
content-o-tron
A process for helping the Rust community and new comers to share their story of using Rust 🤖
Stars: ✭ 18 (-87.59%)
Mutual labels:  writing, blogging
writefreely
A clean, Markdown-based publishing platform made for writers. Write together and build a community.
Stars: ✭ 2,866 (+1876.55%)
Mutual labels:  writing, blogging
writeas-cli
Command line client for Write.as / WriteFreely
Stars: ✭ 94 (-35.17%)
Mutual labels:  blogging
redd.one
Software engineering blog.
Stars: ✭ 31 (-78.62%)
Mutual labels:  writing
200wordrpg.github.io
Homepage for the 200 Word RPG Challenge
Stars: ✭ 31 (-78.62%)
Mutual labels:  writing
sutanlab.id
☕️ My Personal Homepage & Blog site with NextJS. 🇺🇸 🇮🇩
Stars: ✭ 39 (-73.1%)
Mutual labels:  blogging
Prometheus
🌈 A Clean And Modern Ghost Theme with Progressive Web Apps (PWA)
Stars: ✭ 94 (-35.17%)
Mutual labels:  blogging
iA-Writer-Templates
📎 Templates for iA Writer
Stars: ✭ 29 (-80%)
Mutual labels:  writing
Instagram2Fedi
Python script for crossposting from Instagram to Mastodon or Pixelfed
Stars: ✭ 45 (-68.97%)
Mutual labels:  blogging
components
Components for interactive scientific writing, reactive documents and explorable explanations.
Stars: ✭ 32 (-77.93%)
Mutual labels:  writing
tufte-pandoc-jekyll
A Jekyll theme for using Tufte CSS with Jekyll + Pandoc
Stars: ✭ 56 (-61.38%)
Mutual labels:  writing
vim-colors-pencil
Light (& dark) color scheme inspired by iA Writer
Stars: ✭ 564 (+288.97%)
Mutual labels:  writing
awesome-dev.to
[UNMAINTAINED] A collection of awesome blog series on DEV.to
Stars: ✭ 18 (-87.59%)
Mutual labels:  blogging
essays
Think fast, talk smart, write more.
Stars: ✭ 25 (-82.76%)
Mutual labels:  writing

Merlot 🍷

Build Status

Merlot is a web-based writing app that supports Markdown. It replaces iA Writer for me as my primary blogging and writing app, while filling in some other use cases I had in mind like sharing drafts. In fact, this very README was written in Merlot!

Screenshot of Merlot on desktop and mobile

Merlot is written in pure Ink and depends on Torus for rendering. The September compiler is used to compile UI code written in Ink to a JavaScript bundle for the browser. It uses a Markdown library for Ink that I wrote specifically for this app, which you can find in lib/. I also shared my process of building Merlot on Twitter.

Some design and workflow inspirations for Merlot include Notea, Notion, and iA Writer.

Features

I always try to discover a personal workflow first, before building a tool for myself around it. That means I can design a tool around my workflows rather than the other way around, making sure that the tool works with the grain of my mental models. Before I wrote Merlot, I was a heavy user of iA Writer, a Mac app for writing in Markdown. It was clean and fast and did what it did very well, but missing some features -- the features that Merlot adds.

Features like:

  • Extensive keyboard shortcuts. I designed Merlot so I could perform 99% of day-to-day operations in the editor without my hands leaving the keyboard.
  • Sharing drafts right from the editor. I often want to write short documents or notes to share with a few people quickly, and Google Docs and Notion feel too heavy. iA Writer itself has no sharing functionality, so I integrated the ability to share a preview of a file right into Merlot through the "Share" button, which opens a public preview.
  • UX on non-Apple platforms. iA Writer has apps available on Android and Windows, but the experiences there are subpar. I wanted a good quality writing experience everywhere, which meant building for the web.
  • Explicit HTML syntax. One of my main qualms with writing Markdown content for my blogs is that my current engine (Hugo) doesn't give me a way to explicitly designate certain sections as safe HTML content -- the engine tries to infer this, which is often unsafe. Merlot's flavor of Markdown provides a !html syntax to explicitly denote HTML snippets to embed into my Markdown files.
  • Storage that I can own. As with all of my other tools, Merlot saves its data in an open, compatible format (simple Markdown files) in a storage location I control on my own servers.

Beyond these key features, Merlot also supports live preview as you're writing, as well as a nice dark mode.

Markdown syntax

Merlot's Markdown implementation attempts to be broadly compatible with GitHub and CommonMark specifications, and is designed for longform writing use cases, because that's what I needed it for (a writing app and a blogging engine).

The Markdown parser and compiler interoperate, but are modular against a well-tested specification for a Markdown AST representation based on HTML. The parser can be used independently of the compiler to render HTML through another renderer (for example, a reactive virtual DOM implementation like Torus), as well as fed into the compiler to generate HTML text.

Merlot's Markdown parser adds a few exceptions to the common Markdown syntax that adds features I personally find useful:

  • Explicit inline HTML declaration with !html. Every line following and including the !html line is parsed as inline HTML, until an empty line.
  • Class syntax for inline images. This is an upcoming feature.

Architecture

The Merlot project has three components: the Markdown engine, the editor, and the server.

Merlot's Markdown engine is custom to this project. It tries to be reasonably compatible with GitHub flavored Markdown and CommonMark, but takes liberties where I thought I preferred a deviation from the norm (like inline HTML).

The Markdown engine is written in pure Ink, and reused across both the native backend and the web editor. In the server, it's used to render a public preview (the "Share" link) on the server side. In the client, it's used to generate previews for the document being edited without a round-trip to the server.

The editor is built on top of a simple text area, and the rest of the app is written in Ink on top of the Torus UI library. The server is kept simple, with a minimal REST API to save and retrieve documents as well as generate public previews.

Deployment modes

Merlot can be built in two different modes: a "dynamic" mode, where data is saved to a database on the server, and a "static" mode, where the app becomes a static site and saves everything to the browser's local storage. Both share much of the codebase, and which one is built depends on build-time imported configuration variables.

I personally use the dynamically deployed version for personal use, which also gives me the "Share" preview feature that isn't available on the static builds, and lets me carry data across devices. There is also a public static version deployed on Vercel.

Development

Merlot uses a Makefile for development tasks. To develop Merlot, you'll need to install Ink and the September compiler. inkfmt is optional, and used for code formatting.

  • make run starts the web server in the same way as the production environment. This is not necessary for the static deployment mode.
  • make build builds the frontend JavaScript bundles for all modes.
  • make watch runs make build every time a relevant Ink source file changes.
  • make check or make t runs Merlot's Markdown library test suite, which lives in test/.
  • make fmt runs the inkfmt code formatter over all Ink source code in the project.

Deploy Merlot

To deploy Merlot, the steps required depend on the kind of build you want to use (see "Deployment modes" above).

You can find the static build of Merlot available at merlot.vercel.app. To deploy this version, simply deploy the static/ directory as a static site.

There is not a public deployment of the dynamic build. To deploy this version, you'll need Ink installed. After that, run ink src/main.ink from the root directory of the project to run the dynamic deployment. The app will be available on port 7650 by default.

Roadmap

There are a few features that I'd like to include in Merlot and the Markdown library that aren't there yet.

  • Support for bulleted lists starting with * instead of -
  • Support for multiple paragraphs and rich blocks inside list items
  • Syntax highlighting on code blocks with language tags
  • Class syntax for inline images
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].