4 ms·
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
by lunarcave 12y ago
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 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.
- stephenr 12y agoI 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