4 ms·
Show HN: Strapdown.js - Instant and elegant Markdown documents
- mattmanser 14y agoI do like it, one question though, anyone can speculate as to why he says use an xmp tag, but then himself uses a textarea on the page? And will google index it?
- Alexandervn 14y agoAnd if Google can index this, it probably values all text the same; it's just plain text.
- __chrismc 14y agoThe .js seems to allow for either. I would speculate (after no more than a cursory glance) that using the xmp tag is the Google-indexable method of writing your page? Google should see it as plain text on a web page. Textarea support could be to provide interactive/editable pages?
- taylorfausak 14y agoI hadn't heard of the <xmp> tag before now. His reasoning ("so that users don't have to escape special HTML characters") seems to be correct, except that it's a deprecated tag (http://stackoverflow.com/q/4545 http://stackoverflow.com/q/4545). Perhaps he used a <textarea> on this page so he could have the literal "</xmp>" in it?
- arturadib 14y agoThat's correct. Although the tag is deprecated, I've tried it with all modern browsers (IE and mobile Safari included), and it seems to work just fine. I'd think it would take a long time to phase this tag out as it was apparently popular among HTML spec writers, which means there's probably a ton of them still in the wild: https://www.w3.org/Bugs/Public/show_bug.cgi?id=12235 https://www.w3.org/Bugs/Public/show_bug.cgi?id=12235
- RyanMcGreal 14y agoCouldn't you just escape it, i.e. <\/xmp> inside the text?
- taylorfausak 14y agoThere's no provision for escaping things inside an <xmp> tag. From the HTML 2.0 spec: "no markup except the end-tag […] is recognized" http://www.w3.org/MarkUp/html-spec/html-spec_5.html#SEC5.5.2.1 http://www.w3.org/MarkUp/html-spec/html-spec_5.html#SEC5.5.2...
- arturadib 14y agoGood question. I used <textarea> since I have the unusual circumstance of having to write down "</xmp>" in my Markdown, which would close the opening <xmp> if I had one :) Most users won't have to do this. Google does index <xmp>, see e.g. the search result for "devo site:www.the-pope.com". The word "devo" is inside <xmp>.
- fijter 14y agoI like the use of markdown for this kind of purpose but i'd rather just compile from markdown to the generated HTML and put that online for a better user experience (no flash of unstyled markdown content) and possibly better Google indexing.
- arturadib 14y agoThat's fair. I personally wrote Strapdown since I couldn't find a really simple Markdown framework that generated beautiful docs and Just Worked(TM) :)
- fijter 14y agoOh yeah, it generates great output for sure, I might just write a simple wrapper (in PhantomJS or whatever) to automate the compilation step using a markdown document and strapdown, or if I'm lazy I'll just save the generated code from the Chrome inspector :)
- jonpaul 14y agoFunny how there are so many overlapping ideas, I just started work on an OSS MarkDown-based site generator using Bootswatch themes as well. Nice work on Strapdown.
- marban 14y agoDid someone come across any stats about markdown adoption/acceptance among regular users over richtext editors?
- desireco42 14y agoI really love this approach. It simplifies a lot of back and forth that I have to do on a server, even with all the plugins to make things easier, front end is the right place to do this. So, thank you.