Live data from Hacker News

Show HN: Markdown page – Create a web page with just markdown

github.com

31–40 of 86 posts

Re: Show HN: Markdown page – Create a web page with just markdown

#31

Earlier quoted context omitted.

It's easier to read? It's easier to write?

it is just as easy to read and write as markdown, and it does not require javascript libraries to be rendered

Is there a WYSIWYG simple editor for creating documents in HTML5? Something that's basically wordpad and produces pages that actually look the same on different browsers? Documentation for my projects is currently in raw ASCII because I couldn't find a satisfactory solution.

Re: Show HN: Markdown page – Create a web page with just markdown

#34
post #29

The flicker when loading the page sucks. I guess displaying Markdown in case of failure is not the worst thing, but it would be nice if there was a possible way to allow getting rid of the flicker at the cost of not having a graceful fallback. One 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?) tr…

An option for the best of both worlds would be to wrap the markdown in a tag.

Re: Show HN: Markdown page – Create a web page with just markdown

#35
post #8

[Markdeep]( https://casual-effects.com/markdeep/features.md.html ) has waaay more features than this.

I always chuckle when I see people trying to use Markdown in HN.

Here [1] is the list of "features" HN supports in the comment section.

[1] https://news.ycombinator.com/formatdoc

Re: Show HN: Markdown page – Create a web page with just markdown

#36
post #29

The flicker when loading the page sucks. I guess displaying Markdown in case of failure is not the worst thing, but it would be nice if there was a possible way to allow getting rid of the flicker at the cost of not having a graceful fallback. One 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?) tr…

Yesss, finally a use-case for the ``-hack! This is actually even better than the approach of OP since we're guaranteed to get a plain text representation of the text (instead of the browser parsing it as HTML).

example.html:

    

    # Header
    Welcome to my simplest site

    - A
    - awesome
    - list
mdpage.js:

    document.write("");

    document.addEventListener("DOMContentLoaded", function() {
      var script = document.createElement('script');
      script.src = "https://unpkg.com/showdown";
      document.head.appendChild(script);

      var noframes = document.querySelector('noframes');

      script.onload = function() {
        var converter = new showdown.Converter({
          emoji: true,
          underline: true,
        })
        converter.setFlavor('github')
        main.innerHTML = converter.makeHtml(noframes.textContent)
      };
    });

Re: Show HN: Markdown page – Create a web page with just markdown

#37
post #32
post #8

[Markdeep]( https://casual-effects.com/markdeep/features.md.html ) has waaay more features than this.

So does HTML/CSS+JS. A project aiming at simplicity probably isn't one to criticize for lack of features.

the mechanism for using both the projects is the same -- include a JS file. If the effort to use both is the same, why would I not use the one that has more features?

Re: Show HN: Markdown page – Create a web page with just markdown

#38
post #7

A neat party trick, but what actual use-case is there that isn't better served by server-side Markdown to HTML conversion?

Here are three use-cases:

1. You are editing documents locally on your computer. This lets you double-click to view nice markdown in a web browser with a `file://` url.

2. You are editing a website, but don't have control over the server-side code.

3. You don't want to install a markdown rendering library on the server.

Post reply on HN