4 ms·
Show HN: Deadsimple – A static site server serving Markdown as Bootstrap HTML
- fiatjaf 12y agoWouldn't be better to compile the Markdown files before?
- lunarcave 12y agoWell, 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 12y agoRight. 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.
- fiatjaf 12y agohttps://h3rald.com/hastyscribe/ https://h3rald.com/hastyscribe/
- stephenr 12y agoSo 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 12y agoIt 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 12y agoBut 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 12y agoDid 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.
- 12y ago