

Show HN: Deadsimple – A static site server serving Markdown as Bootstrap HTML - lunarcave
https://github.com/ncthis/deadsimple

======
stephenr
So just to be clear, this "server"

* doesn't actually convert the markdown to HTML, it relies on client side rendering.

* doesn't serve anything but markdown files (no css, no js)

The reasoning given is "simple and elegant".. I didn't realise a complete lack
of functionality was "elegant". If so, this ceramic tile right here, is
actually a very elegant computer.

~~~
lunarcave
It does one thing and one thing good. Which is getting a markdown file in some
place in the server, and "serving" it in a way it could be rendered in
bootstrap based html.

    
    
      I didn't realise a complete lack of functionality was "elegant"
    

I wouldn't say it's a complete lack of functionality because it does the one
function that it advertises to do. It serves the purpose it was built for,
which is serving markdown in a manner that could be rendered to html.

A static server by definition doesn't necessarily have to serve css or js. You
could just build a server that serves text file, and call it a static server
you know.

    
    
      this ceramic tile right here, is actually a very elegant computer
    

A computer on the other hand, by definition needs to process an input to a
designated output, which I'm pretty sure your ceramic tile cannot do.

So, all in all, congratulations on completely missing the point of this, in
favor of an incredibly inaccurate metaphor.

~~~
stephenr
But that's just it. The "server" simply prepends and appends two html fragment
files.

All the work to render it as bootstrap HTML is done client side.

Prepending and Appending two template snippets to a requested file is such a
menial task it's a built-in config option in languages like PHP and could be
emulated in a one-line call to almost any scripting language that has built in
file IO. Hell, it could probably be done with some creative SSI and
mod_redirect.

~~~
lunarcave
Did you forget the part where the the template snippets become bootstrap html?
Granted, it's not something I wrote. I just saw a potential use of a great
library that could be achieved by building a simple server over it. Anyone
could do it, but I was the one who did it this time, at this place, for a
genuine need I had.

If you're going to call a Show HN menial because it doesn't live up to your
standards of how complex a show HN would be, your opinion is duly noted.

But from "complete lack of functionality" to "menial", that's quite a stretch.

~~~
stephenr
I apologise for my tone in earlier comments. Let me try again:

My point is that the goals of this project seem to introduce more problems
than it solves.

It re-creates the same HTML header/footer for every request, but then doesn't
do the actual markdown conversion, and it doesn't even serve the associated
JS, CSS, etc files that are required to make it work.

A simple Markdown to styled page(s) tool is a great idea, I wrote one myself a
few years ago, before moving onto things like Gollum. Having a read-only tool
like this is a great alternative to the extra weight of something like Gollum,
but this just doesn't really solve the problem very well right now, IMO.

Given that it runs on Node, you could quite easily add a few features to make
it a more complete solution:

* Serve all assets - in this way, this can be used standalone, behind a caching proxy like varnish, or as an origin server for a CDN service like Akamai or similar. The specific JS and CSS that it requires could be bundled outside the document root and handled as a special case in the url router.

* Handle markdown conversion in the server. The client-side code can probably run with little if any modification in Node, and would reduce the number of resources and processing time required on the client device

------
fiatjaf
[https://h3rald.com/hastyscribe/](https://h3rald.com/hastyscribe/)

------
fiatjaf
Wouldn't be better to compile the Markdown files before?

~~~
lunarcave
Well, that's exactly what most static site generators would do. I wanted to
avoid exactly that. Because, then you will write your markdown and compile it
to html. The moment that you do that, there are two representation of the same
data. And if you want to host it on github or somewhere, you will be checking
the html files too.

What if you could just do the whole site without compiling to HTML? What if
you could just check in the md file, and it would just work?

That's where I was coming from when I hacked this together.

I'm certainly not saying it's a better way of doing this, I'm just saying I
love the simplicity that something like this would bring in when I want to
host a simple static site.

~~~
fiatjaf
Right. I understand it. I thought the main goal was to get rid of templates
and configuration, just place the markdown and get HTML -- and that could be
done with compiling.

