Live data from Hacker News

Strapdown.js – Instant and elegant Markdown documents

strapdownjs.com

21–30 of 41 posts

Re: Strapdown.js – Instant and elegant Markdown documents

#21
xmp tag? Never heard of it. MDN to the rescue!

Obsolete

This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

* It has been deprecated since HTML3.2 and was not implemented in a consistent way. It was completely removed from the language in HTML5.

* Use the

 element or, if semantically adequate, the  element instead. Note that you will need to escape the '* A monospaced font can also be obtained on any element, by applying an adequate CSS style using monospace as the generic-font value for the font-family property.

Re: Strapdown.js – Instant and elegant Markdown documents

#22

xmp tag? Never heard of it. MDN to the rescue! Obsolete This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. * It has been deprecated since HTML3.2 and was not implemented in a consistent way. It was completely removed from the language in HTML5. * Use the element or, if semantically adequate, the element instead. N…

Ah thank you for this. I'm not a web guy, so I just assumed the xmp was a made-up tag just for this script to use.

Re: Strapdown.js – Instant and elegant Markdown documents

#24

xmp tag? Never heard of it. MDN to the rescue! Obsolete This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. * It has been deprecated since HTML3.2 and was not implemented in a consistent way. It was completely removed from the language in HTML5. * Use the element or, if semantically adequate, the element instead. N…

I may be totally off track here, but I am thinking that the tag is only used for the parser to identify which theme the author wants to use? I am assuming that the end HTML just strips out the xmp tag and inserts the relevant bootstrap CSS/JS links in there to match the theme, so the actual xmp tag is never passed across to the browser?

Re: Strapdown.js – Instant and elegant Markdown documents

#25

xmp tag? Never heard of it. MDN to the rescue! Obsolete This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. * It has been deprecated since HTML3.2 and was not implemented in a consistent way. It was completely removed from the language in HTML5. * Use the element or, if semantically adequate, the element instead. N…

I may be totally off track here, but I am thinking that the tag is only used for the parser to identify which theme the author wants to use? I am assuming that the end HTML just strips out the xmp tag and inserts the relevant bootstrap CSS/JS links in there to match the theme, so the actual xmp tag is never passed across to the browser?

Presumably it was chosen because it also allows the author to include HTML tags inside Markdown (somewhat common in Markdown usage) with the browser (mostly) ignoring them. It's part of why many other options using , though at least in SCRIPT's case it hasn't been deprecated since HTML 3.2.

Re: Strapdown.js – Instant and elegant Markdown documents

#26
post #19

How is this remotely elegant? You're including a script to render simple formatted text, something that can be accomplished by statically compiling from markdown to HTML before serving. If you can serve static HTML, why not just do that?

It could be useful if you just want to edit a file in notepad and drop it on a CDN or fileshare without any tooling. I don't run a blog but it could be nice. I'd definitely call it elegant, though not exactly minimal. I helped run a fraternity website for a bit. If I could say, hey just download the source from chrome, tweak the bulletin in notepad, and upload it back to the ftp page that would have been great. It al…

> If you browse without JS it still works!

Also true of html

Re: Strapdown.js – Instant and elegant Markdown documents

#27
post #10

Please don't make websites require JavaScript to display simple text.

I wish browsers would include a basic Markdown renderer.

But not everyone likes Markdown, it would possibly be bloated!

Maybe we should add a scripting language so that sites can use any source format they want? Oh wait.

Re: Strapdown.js – Instant and elegant Markdown documents

#28
This is nice for iterating, but for an actual deployment it's not so nice for three reasons:

    (1) Prevents outside navigation into named anchors.
    (2) Makes the content slow to load.
    (3) Suffers from a flash of unstyled content.
You can use chrome to bake out the HTML with a one-liner:

    chrome mydoc_md.html --headless --dump-dom --virtual-time-budget=1000 > mydoc.html
The resulting HTML is fast to load and just as beautiful.

Re: Strapdown.js – Instant and elegant Markdown documents

#29

This is nice for iterating, but for an actual deployment it's not so nice for three reasons: (1) Prevents outside navigation into named anchors. (2) Makes the content slow to load. (3) Suffers from a flash of unstyled content. You can use chrome to bake out the HTML with a one-liner: chrome mydoc_md.html --headless --dump-dom --virtual-time-budget=1000 > mydoc.html The resulting HTML is fast to load and just as beaut…

This is awesome, I had no idea you could use Chrome to run a webpage with JavaScript and dump its contents. Thanks for sharing!
Post reply on HN