http://oscarmorrison.com/md-page/ shows only a blank page on firefox. I even disabled NoScript for the site. Thanks, I'd rather have plain HTML.
Show HN: Markdown page – Create a web page with just markdown
21–30 of 86 posts
Re: Show HN: Markdown page – Create a web page with just markdown
#22Honestly, I prefer writing directly plain html5 with implicit tags. I cannot see any advantage of markdown over html for this particular usage.
It's easier to read? It's easier to write?
Re: Show HN: Markdown page – Create a web page with just markdown
#23Earlier quoted context omitted.
Sometimes I just want to get some information out there on the internet, and rather than sharing a Evernote page or having to create a webpage I can just write markdown. Main use-case is when I want to share a markdown doc in a private GitHub repo, with a public url e.g http://oscarmorrison.com/md-page/oimasdoijasdmadeupurl-01231...
Very cool. Thanks for sharing. Btw, I got an SSL certificate error when I went to check out your site. I know there's a few different ways to account for this when serving up a website from github, but I'd welcome guidance on what the best practice is for fixing this.
Re: Show HN: Markdown page – Create a web page with just markdown
#24Along similar lines, I went back to LibreOffice recently and made a few web pages with it, just to try it out. It worked better than I expected.
After adding a simple PHP controller to the mix, injecting some CSS for responsiveness and other tags as needed, I have been impressed with how easy it makes publishing. If a single-pager is what's needed (or multi-pagers perhaps; I just haven't tried it yet), if what matters most is getting links and information public, it's a useful tool.
Re: Show HN: Markdown page – Create a web page with just markdown
#25Disclaimer: I am the author of it, and it is nowadays unmaintained.
Re: Show HN: Markdown page – Create a web page with just markdown
#26A neat party trick, but what actual use-case is there that isn't better served by server-side Markdown to HTML conversion?
Their documentation was written in markdown and the site was hosted on static hosting, so no server-side conversion.
Although the web page chrome (navigation, etc) was in HTML, they wanted the documentation to be in markdown under the hood after upload. They didn’t want to use any kind of conversion prior to uploading because they needed to make on-the-fly changes to the documentation after upload without writing in HTML.
So we opted to go with client-side markdown to html conversion on pageload. complete with a clickable legend and tabs to switch between language implementations for code examples.
Putting the markdown inside regular page formatting tags wasn’t reliable, as different browsers did different things to the content (for example some browsers converted “&” to “&” and the indentations for code was not respected). So we had to store the markdown in some sort of preformatted tag block.
However
required special escaping of code characters ( , &, etc).So we opted to go with using a little-known tag to store the markdown as search-engine indexable code. Since content inside will be read as plaintext instead of being formatted by the browser, it was also great for being the input of a client-side markdown-to-html converter.
It worked quite well. If you want to see it in action it’s at https://www.genivia.com/dev.html
Re: Show HN: Markdown page – Create a web page with just markdown
#27[1] - http://strapdownjs.com/
Re: Show HN: Markdown page – Create a web page with just markdown
#28gatsbyjs supports md, yaml and external graphql
Re: Show HN: Markdown page – Create a web page with just markdown
#29One way you could accomplish this is by supporting script tags for this, like wrapping the page in:
...
...as an optional way to use the library. Browsers won't (shouldn't?) try to render the contents of the script tag before you get to it, so it would act like a typical SPA.Re: Show HN: Markdown page – Create a web page with just markdown
#30It looks like you wrote a script.js file, which calls showdown.js library (converting markdown to html). A uglified version called `md-page` is made pulling both resources
Basically, the script does following
1) wait for page to load
2) add css-styles via javascript
3) shove all the markdown in a variable "markdown", passing it as one giant string
4) Add settings for showdown.js
5) Rewrite entire markdown on page to HTML via showdown.js
6) Append to body and render
I could fork it and add breakpoints / run debugger but this is what I got from looking at source code