Adële's smolweb site

Integrating diverse text formats into modern browsers

2024-08-04 12:05

As an advocate for the SmolWeb movement, I've been pondering ways to simplify web publishing while adhering to these principles. One promising idea is to enhance modern web browsers with the ability to render a broader range of text formats. Imagine if Firefox, Chrome, and their derivatives could render Markdown, AsciiDoc, reStructuredText, LaTeX, EPUB, and Gemtext as seamlessly as they handle PDFs. This could revolutionize the way we publish lightweight websites, making it as simple as dropping a textual file into a directory.

Traditional HTML, CSS, and JavaScript offer a rich and powerful web experience, but they also come with a considerable overhead. The SmolWeb movement champions a return to simpler, more efficient web practices, emphasizing speed and accessibility over bells and whistles. By integrating support for diverse text formats directly into web browsers, we can extend these principles further.

Markdown, reStructuredText and AsciiDoc are lightweight markup languages designed for simplicity and readability. They allow writers to focus on content without getting bogged down by complex syntax. LaTeX, while more complex, offers unparalleled typesetting capabilities, especially for academic and scientific documents. EPUB is the standard format for eBooks, providing a structured way to publish long-form content. Finally, Gemtext, the format used by the Gemini protocol, strips web content down to its bare essentials, promoting a minimalist approach.

The benefits of native support are:

  1. Simplicity: users can write in their preferred format without needing to convert their work to HTML. This reduces the barrier to entry for new web creators and encourages content over presentation.
  2. Efficiency: these text formats are inherently lightweight, reducing load times and server strain. This aligns perfectly with the goals of LowTech and SmolWeb initiatives.
  3. Accessibility: plain text and lightweight markup languages are more accessible to users with disabilities, as they rely less on complex layouts and scripts that can interfere with screen readers and other assistive technologies.
  4. Versatility: supporting a variety of formats allows creators to choose the best tool for their content. Whether it's a blog post, academic paper, or eBook, the right format can enhance both the writing and reading experience.

All things promoted by the SmolWeb concept.

While there are browser extensions like Markdown Viewer that enable rendering of Markdown files, these solutions come with limitations. The primary drawback is that readers must install the extension themselves. This dependency on extensions means authors cannot confidently publish Markdown files, as they cannot be sure their readers have the necessary tools installed to view the content correctly.

How it could work?

Modern browsers already have robust rendering engines capable of displaying a wide range of content types. Extending this functionality to include additional text formats would involve:

  1. Rendering engines: Integrating libraries and tools that can parse and render Markdown, AsciiDoc, LaTeX, EPUB, and Gemtext.
  2. File handling: Allowing browsers to recognize these file formats (depending on their mime types) and render them appropriately when accessed via HTTP or from the local file system.
  3. User interface: Providing simple controls for users to navigate and interact with these documents, similar to how PDF viewers work in browsers today.

Integrating support for diverse text formats into web browsers aligns with the principles of the SmolWeb, and LowTech movements. It simplifies content creation, enhances efficiency, improves accessibility, and offers versatility. By following this approach, we can foster a web that values substance over style, encouraging a return to the web's roots as a space for sharing information freely and simply.

Let's advocate for this change and push for a web that's lightweight, accessible, and truly open to all.

Join the conversation on the fediverse or comment this post