Show HN: Markdown as web page/site
51–60 of 60 posts
Re: Show HN: Markdown as web page/site
#52The Grav CMS also internally uses Markdown for the page contents and generates static files: https://getgrav.org/ They do use YAML FrontMatter for attaching metadata so the CMS knows how to process certain pages (e.g. page title, page type etc.), but it isn't too complicated in practice: https://learn.getgrav.org/17/content/content-pages#page-file They also have an admin plugin, which you can use if you prefer a more…
At work I've been trying to solve the question, how can we let the dev team continue to write documentation as Markdown files in Git repos, while not excluding others in the company who need/prefer GUI and rich text editor. I see now that it's possible to have the best of both worlds, with admin UI as a layer on top of the same underlying system, generating Markdown internally.
Still not sure how such an admin interface will integrate with Git though. I suppose "publish" can trigger a Git commit, but I wonder if it's feasible to ensure no Git push conflict when remote is ahead of local, i.e., someone else pushed a change before you did. Otherwise, I imagine the admin UI can get complex if it needs to provide a way to resolve such conflicting changes, with a side-by-side view of diffs.
Re: Show HN: Markdown as web page/site
#53There appears to be many comments here, arguing that authoring web content in markdown is nothing new, and correctly so. But this (along with md-page and mdwiki mentioned in other comments) is actually an interesting small twist on it. Regularly the conversion is done on the server side, and everything is published in html. Here, you both author and publish in markdown. What this library does, if I'm reading it corre…
Don't. GFM should stand for "GitHub Flavored Markup", since that's how people treat it—yet another markup language, which they find more convenient than other markup languages. The "Markdown" as it is used on GitHub and the people who author it abandoned the premise. Markdown was intentionally designed so that the "raw" form of a given Markdown document is supposed to be a valid way for humans to consume it. That's not how Markdown is used on GitHub, however; no one pays any attention to the readability of the raw form. It's just another input for their compile-to-Web pipelines to suck in (or for github.com to render as substitute for a project landing page).
Re: Show HN: Markdown as web page/site
#54I was under the impression that using markdown to create html webpages was a common use case, and had been solved. Was I wrong? (I've used markdown for note taking, not for web pages, hence am asking.)
Curious if we've ever considered adding Markdown as a new MIME type that could be accepted directly by browsers (similar to text/plain). It could be nice to serve markdown without needing to even use a static-site generator (but still have the server reasonably render the doc, similar to a reader view).
Re: Show HN: Markdown as web page/site
#55The idea is that having it server-side allows for the page to be cached by a CDN (e.g. CloudFlare), so you end up serving static HTML, with better performance and SEO than JS-compiled markdown.
Re: Show HN: Markdown as web page/site
#56Another alternative that I would suggest is to just serve the files directly (in Markdown or Gemini or PDF or whatever other format they might be). To allow working in a web browser, one idea is to try to implement my idea of a Interpreter response header in web browser, which would be used if the web browser does not understand the file format (if the user has not disabled the use of the Interpreter header). This way, potentially any file format can be implemented.
There is also question about different variants of Markdown. Well, the way to indicate that is by parameters in the MIME type, I think; you can specify if it is Commonmark or something else. This way you can tell which variant it is.
One problem with MIME is that indicating multiple file formats does not work very well. UTI specifies that it is a specific kind of another file format but it must be specified in another file instead of this one and does not have parameters, and has other problems, so UTI is not good either. That is why I wanted to make the "unordered labels file identification" which you can specify, in the same identification, multiple types/parameters, e.g. "text[367]:plaintext:markdown+commonmark".
Re: Show HN: Markdown as web page/site
#57This requires JavaScript to dynamically serve HTML. So this wastes everybody’s CPU for a deterministic computation that could be served directly. I’m not sure what’s the use case for this, but for static content seems wasteful and a bad idea in general.
The amount of CPU waste would be negligible.
Yes the performance impact of a single "alert()" when i open the page is negligible. The performance impact of parsing Markdown and rendering it as HTML nodes is definitely non-negligible.
I love the idea to support more markdown formats natively for the web (eg. markdown), but i hate client-side scripting shenanigans that don't respect me as a user without the fancy latest iphone. If only some browsers were concerned about emerging protocols/formats & UX instead of increasingly-useless (except for tracking purposes) JS APIs...
Re: Show HN: Markdown as web page/site
#58Re: Show HN: Markdown as web page/site
#59Earlier quoted context omitted.
The amount of CPU waste would be negligible.
As someone who does a fair share of browsing on Tor Browser's Safest mode (JS disabled) i entirely disagree with this point. Most use of JS makes my (old) computer really slow and usually leaks memory in some way. This is true on Firefox, Chromium, and all derivatives. Yes the performance impact of a single "alert()" when i open the page is negligible. The performance impact of parsing Markdown and rendering it as HT…
Re: Show HN: Markdown as web page/site
#60The Grav CMS also internally uses Markdown for the page contents and generates static files: https://getgrav.org/ They do use YAML FrontMatter for attaching metadata so the CMS knows how to process certain pages (e.g. page title, page type etc.), but it isn't too complicated in practice: https://learn.getgrav.org/17/content/content-pages#page-file They also have an admin plugin, which you can use if you prefer a more…
Thank you for mentioning Grav CMS. It was particularly interesting to hear about the concept of "admin panel as a plugin". I like that idea very much, it's perfect for API-first design. At work I've been trying to solve the question, how can we let the dev team continue to write documentation as Markdown files in Git repos, while not excluding others in the company who need/prefer GUI and rich text editor. I see now…