About
This is the demo of 11ty-mdweb, an Eleventy starter for a site that is written in Markdown and published as Markdown as well as HTML. If you are reading this in a web browser, read this page in mdbrowse or BonBon to see the Markdown version.
The source is on GitHub at geekitycom/11ty-mdweb. Clone it to start a site of your own.
A site for the web of Markdown
Dave Winer's charter for BonBon describes a browser for a web made of Markdown files. A page is a Markdown file fetched by URL. It has no CSS and no JavaScript of its own, and the reader decides how it looks. This site is built so that a browser like that has something to read:
- Every page has a Markdown version. It lives at the page's address plus
index.md, and the HTML names it in its head with<link rel="alternate" type="text/markdown">. A Markdown browser that is handed the HTML page follows that link. - The Markdown is what was written. Each post is published as its author
wrote it. The build adds front matter (the title,
home,previous,nextand the site'sfeeds) and a short header and footer. - Links stay in Markdown. In the Markdown versions, links to other pages on this site point at their Markdown versions, so you can follow them without falling back to HTML.
- It says what it is. The host serves every
.mdfile astext/markdown, which is how a Markdown browser knows it has a page. - The feed carries Markdown. Each item in the RSS feed holds the post's
Markdown in
<source:markdown>, from the source namespace, so a feed reader can show the post as it was written. - It describes itself.
/llms.txtlists every page and post, each linked to its Markdown version.
One part of the charter a static site can't do on its own. The browser sends
Accept: text/markdown so that a server can answer the same URL with Markdown
for it and HTML for everyone else. A static host sends the same file whatever
the browser asks for, so this site relies on the rel="alternate" link
instead.
Also on the IndieWeb
The HTML carries microformats and JSON-LD, so other sites can read who wrote a post and what it replies to, likes or bookmarks. After each deploy, the site sends webmentions to the pages its new posts link to, and tells an rssCloud and WebSub server which feeds changed, so subscribers hear about new posts without waiting for their next poll.
A static site has no server to receive webmentions, so it can't take replies on its own. A site built from the starter can use a hosted receiver such as webmention.io, and the next build shows what it received under each post. This demo has no receiver set up. The like and the reply under the first post are sample data.
Who writes this
Ada Example is a placeholder for the person a site built from this starter belongs to. The latest posts are on the home page, and every post is on the archive page.