4 ms·
I crave simplicity in my life right now and am using markdeep: https://casual-effects.com/markdeep/ https://casual-effects.com/markdeep/ I write my documents i
by johnmw 10y ago
I crave simplicity in my life right now and am using markdeep: https://casual-effects.com/markdeep/ https://casual-effects.com/markdeep/
I write my documents in markdown and add this tag at the end of my document <script src="markdeep.min.js">
I "publish it" by copying it to my server and renaming it .html
* note: To get started, here is the suggested starter document: https://casual-effects.com/markdeep/starter.md.html https://casual-effects.com/markdeep/starter.md.html
- thomasahle 10y agoThat's impressive! It even has math support! I do wonder about generating the diagrams at every page load. Seems like markdeep might as well have been a static generator?
- versteegen 10y agoYeah, but you can easily copy-paste the generated html into a file. Just append '?export' to the URL. I definitely would use it in that way.
- bbx 10y agoI'm not sure if this counts as a "static website", since the page is not delivered exactly as stored. It requires JavaScript to actually renders the page, which seems like an overkill.
- Already__Taken 10y agoThat's just client side templating. Which has the same problem they all do of being greeted with a white page until ALL the content is ready. If someone is prepared to accept this it's not that hard to accept generating the html page yourself and uploading that.
- masklinn 10y ago> That's just client side templating. Which has the same problem they all do of being greeted with a white page until ALL the content is ready. Or being greeted with a white page period if you're using a non-JS enabled HTML client (noscript, CLI browser).
- coldtea 10y agoIt's 2016, if you use a non-JS enabled HTML client you better be used to the breakage.
- laurent123456 10y agoIn this particular case, wouldn't they see the plain text markdown? (which in many case is just as good the html)
- masklinn 10y agoKinda, it looks like they add a bit of CSS (basically make everything monospaced & pre) so the Markdown text is visible when JS is disabled (noscript), but in a CSS-less browser (e.g. links) the file is received as HTML, and the Markdown code is directly interpreted as HTML, which makes for an unreadable mess (the whole thing is a single "line" with newlines collapsed to spaces) You're really better off using a static conversion tool, or using markdeep as a static conversion tool (with ?export)
- raimue 10y agoI fully agree. Why render it in every client when you can do it only once on the server? This feels like a waste of CPU resources.
- accordionclown 10y agocompared to all the other things your cpu is doing, and all the time your cpu sits there doing nothing, the "waste" in this case pales to total unimportance. you've got a supercomputer; you might as well use it.
- raimue 10y agoAn idle core will definitely use less power than one constantly processing. That is what drains the battery in your laptop. I'd rather not spend my battery power if it can be done on the server instead.
- versteegen 10y agoThanks. That's a nice idea... but if it's that simple I might as well just use a static markdown to html converter, if I don't need the support for diagram generation (which admittedly looks like a killer feature). For example, pandoc supports that (or latex -> html or pretty much anything else), and the results are similar, e.g. (in this case, specifying a very small amount of additional css): http://pandoc.org/demo/example3.html http://pandoc.org/demo/example3.html I'm currently using couscous (http://couscous.io/ http://couscous.io/) to convert markdown to html but it's far more work to use, and does a whole bunch more than that, such as twig templates, so I'll consider switching to markdeep or pandoc.
- merpnderp 10y agoSince the website is rendered with JS onload, doesn't this make your site a second class citizen in regards to SEO? If you want people to actually read what you write, static content from the server is still superior.
- reitoei 10y ago> doesn't this make your site a second class citizen in regards to SEO Not with any search engine that matters.