juliangruber/me — pull request #3 by rvagg (2013-05-02 05:07:09+00:00)
Title: morkdownify, use brucedown, github styling

Hey! Thanks so much for stating **me**, since they stopped updating [appjs](http://appjs.org/) (I don't know if it's abandonware or not), [morkdown](https://github.com/rvagg/morkdown) has stopped working and I find myself wanting it every single day!

So, I've sort of munged the two together, I've butchered your original though so I'm only offering my changes here and not expecting that they'll all be to your taste.

Summary of major changes:

* `me()` is now `Me`, an object to be instantiated.
* Switch out marked & highlightjs on the client to [brucedown](http://github.com/rvagg/node-brucedown) on the server which uses marked + [pygments](http://pygments.org/) to produce near-exact GitHub HTML (there are a couple of very small differences but they are because marked does a *better* job than Sundown at parsing MD). There's a slight delay in rendering but it's *very* small and improved by the next point:
* Removed express and gone with vanilla HTML, there's a simple router that uses `this.handle_X()` methods for handling the few dynamic calls. Using [st](https://github.com/isaacs/st) for serving the static content. I was kind of surprised at the noticeable speed increase of removing express TBH.
* Rewrite the contents of *index.html* when / is requested so it contains the contents of the requested file and its initial rendered version, so there's no need to separately request it after startup.
* Included basic GitHub'ish CSS styling, including the same colouring rules for pygments HTML.
* Changed layout so the 2 boxes are consistently positioned at different window sizes.

Some screenshots:

![morkme1](https://f.cloud.github.com/assets/495647/452413/a9bf510a-b2e5-11e2-8417-1d8d49b7a6f3.png)

![morkme2](https://f.cloud.github.com/assets/495647/452414/afb7b674-b2e5-11e2-85a5-da9b95f89d7e.png)

No offence caused if you don't want this, or if you just want to cherry pick bits of it. I'm happy to maintain my own version as a replacement for morkdown if need be.

Have some :cake: