.lit

Open Source npm (scoped) Deploy

.lit is a plain text document format, really it's just Markdown. But with Sections, Cells, interactive & executable code blocks and meta programming over its own AST.

searchhidemeta

About

mdwarn

⚠️ .lit is still a Work in progress.

This iteration is a from-scratch rewrite of an [initial prototype], with many features yet to be re-implemented.

.lit is the culmination of a few seemingly disperate ideas: Literate Programming, Interactive Notebooks, Digital Gardens and Wiki.

Meant to enable Guided Learning — where the author shows the reader by tactile example; and exploration or Rapid Prototyping while trying not to be a separate system from which a student or project graduates but which is itself an acceptable development evironment.

imginfluences.svgUpdated 24.4w ago

☑️ To Do or in progress

🐜 Bugs

  • Next/sibling sections are getting nested
  • Empty document fails to render unusable testing/Empty document
  • Document with No sections fails testing/No Sections
  • Inline html in Markdown source not surviving to final rendered output.
  • ast2md helper breaks links and keeps transcluded code. Not usable yet
  • transcluded code gets persisted inline on edit

Getting Started

Starter template repo

While .lit is still under active development and not quite ready for prime time, you can fork this GitHub template repository to deploy your own "instance" hosted on GitHub Pages.

From the command line

To use .lit from the command line, see usage and documentation.

Documentation

Currently my Scratch ⚠️ Pad 🔬 is the closest thing to documentation, start there for now.

  1. A gentle introduction to Markdown
  2. Divergence from Markdown
  3. Sections & Cells
  4. Code Cells
    1. Execute Code Cells
    2. Viewers
    3. Transformers

Implementation

Parser

Built atop the unified ecosystem, specifically remark, which takes .lit Markdown source and outputs .lit AST (Abstract Syntax Tree). Read More

Renderer

The default render output is html which includes client-side javascript which hydrates a React application. Read More

Client

The static html generated by .lit does not require JavaScript to function for the reader. But by default includes a client bundle which re-hydrates the page to become fully interactive, enabling editing of the original document in place. Read more

Plugins

.lit has a flexible Plugin system, primarily to allow the author to create custom Viewers and REPLs but also includes other types.

Filesystem

Implemented on top of LightningFS on the client side with pass through reads and writes to a remote backend — currently GitHub API. Read more

Utils

Collection of utilities used throughout .lit which should probably be extracted and published as individual packages. Read more

cssviewer=stylestylingtweaks