20 ms·
MDN converted to Markdown
- otikik 4y agoThis was an interesting read. That Unified framework looks very interesting
- javajosh 4y agoOh man a markdown local copy of MDN would be fantastic!
- hsbauauvhabzb 4y ago+1. Just to be able to regex search!
- est 4y agohttps://devdocs.io/offline https://devdocs.io/offline works great!
- sicp-enjoyer 4y agoI was hoping for files on a disk I can search, not an application specific browser database.
- Terry2006 4y agoI dream to be able to use the mdn/content repo directly on GitHub. Unfortunately the Markdown links are the "production" site ones and don't work in GitHub. It would be nice to have links that work there and their toolchain (called Yari if I understand well) should translate it when generating the MDN site. It would allow for easier reuse of the content.
- wbamberg 4y agoThis came up the other day, actually! https://github.com/orgs/mdn/discussions/256#discussioncomment-3831545 https://github.com/orgs/mdn/discussions/256#discussioncommen... :)
- asddubs 4y agoinstall zeal for offline docs including mdn https://zealdocs.org/ https://zealdocs.org/
- maxloh 4y agoIt is already there. https://github.com/mdn/content https://github.com/mdn/content
- TheRealPomax 4y agoclone and build, done.
- nerdponx 4y agoIt's too bad that AsciiDoc still hasn't really caught on like Markdown. It's a whole lot nicer for more-complicated documents. I understand their reasons for not using it here, but it still seems like a perfect fit for this task. Eclipse still seems to be working on a formal spec, but hopefully that will help implementations to grow and adoption to increase. In any case, avoiding raw HTML is a huge improvement. I like this document. It's well written, and it provides a clear explanation for every major technical decision made on the way.
- swyx 4y agoMarkdown is "worse is better". AsciiDoc is more powerful, but has a steeper learning curve, therefore it lost. tale as old as tech. EDIT: i'm compiling a list of "Worse is Better" technology battles: - Mixed paradigm languages vs Functional languages - Typescript vs Flow - React+Redux beat Angular and Elm - VHS beat Betamax - AC beat DC - what else? please share more here https://hashnode.com/preview/636602dec7fec996b85c7165 https://hashnode.com/preview/636602dec7fec996b85c7165 (draft!)
- nerdponx 4y ago> has a steeper learning curve Does it? I think Markdown "won" for a variety of reasons (Github? Slack? Pandoc?). I don't think AsciiDoc is so much more complicated than Markdown that people can't learn it quickly. The reason Markdown is now standard is that people like standardized things. They want to use the same syntax in their chatroom, forum, ad-hoc readme filed, and doc comments in code. And if they're already using one markup language, why learn another? Why not use the same one everywhere? It's not that AsciiDoc is complicated in general, it's that it's ever so slightly too rigid for "ad-hoc" markup in places like Discord and Hacker News. Thus people end up learning Markdown because it really is the best fit for those platforms, and then people don't want to learn another markup language, and so you get a snowball effect of implementation support and popularity. And thus we are stuck with Markdown everywhere. This isn't necessarily a bad outcome. But that's how I see it. I still want AsciiDoc to gain more traction in technical writing!
- 4y ago
- TedDoesntTalk 4y ago> We might have gone on for another year or two with HTML-format documentation, and it would just have been a drag on our productivity. But we knew that this wasn't a sustainable foundation in the long term Really? It was HTML for 17 years with over 11,000 pages. But I guess that’s not long-term sustainability? I applaud the conversion, but don’t misrepresent the facts and what you inherited, Wil.
- wbamberg 4y agoSorry, I didn't intend to misrepresent, but yes, there is a fuller story here of course. Before 2020, MDN was in a Wiki and editors could use a WYSIWYG interface, which was OK for relatively simple edits although for more involved stuff we often had to resort to the raw HTML source (and even for simple edits, the editor would often not generate the markup you might have expected). Being in a Wiki meant there was no pre-publication review process, and it was very hard to make systematic improvements to the content. You couldn't, for instance, create a single pull request updating dozens of files and review them all together. Whether that was sustainable, or whether overall quality just gradually declined - well, it was certainly really hard to maintain. At the end of 2020 MDN content moved into GitHub, I think that's enabled us to make large-scale improvements to the content that wouldn't have been practical before, as well as to have a review process to ratchet up overall quality. But this move also meant the WYSIWYG editor went away, and everyone was faced with editing the raw HTML source, all the time, and I really don't think that was a sustainable situation. We could I suppose have revived something like the WYSIWYG editor, but I think switching to a simpler source format was a better option.
- liamwire 4y agoI think this is a fantastic reply, and written with the good grace that the GP didn’t show you. Thanks for the insight, Will.
- photoGrant 4y agoTwo L's in his name. You've carefully crafted a slight and it looks worse on you, especially considering your post is about correcting facts.
- beebeepka 4y agoRecently I overheard that our company intends to use markdown for configuration purposes - replacing yaml and stuff. I am not against the idea but it did surprise me because while I am happy with writing documents in MD, it never occurred to me that it could be used for configs. Not sure what the upsides and downsides are.
- nneonneo 4y agoMy gut reaction is that it sounds like a terrible idea. Markdown is designed at the outset as a markup language, meant to imbue formatting and structure to human-readable text. But it lacks a formal grammar or a strictly defined mapping from syntax to parse tree, so different tools may interpret the same document differently (i.e. there are many Markdown “dialects”). Markdown has no inherent support for any kind of data types other than text; it has lists, but nothing that would obviously be “map” or key-value data structures. Indeed, if you’re going to make use of Markdown to store structured data like a config file, I wager the result will start looking a lot like YAML. At which point - why not just use YAML directly?
- kubanczyk 4y agoExactly. For most systems that use heavy YAML configuration, their problem is not YAML. YAML is a decent solution to their problem which is: they: have: - so - many - nested - levels: of: configuration: without: any: - abstractions &that-arent-ugly Markdown can only make it worse.
- xcambar 4y agoSounds like literate programming. I've used it once or twice for training material and as "fancy" slides at an internal presentation. Worked quite well as one-offs but I'm not sure that scales wrt its usability and maintenance.
- likium 4y agoWhat were the issues you saw on usability and maintenance? Things like jupyter notebooks and observablehq.com seem to be bringing in a breath of fresh air to literate programming.
- Sugimot0 4y agoI played with mdn-cli which was a neat cli that queries duckduckgo for the first mdn result and parses it to markdown. I then passed that through a parser to make it pretty, and then integrated it with my editor for getting fast documentation without too much context switching. My biggest gripe was the lag to request ddg and then mdn and then parse it and pipe it. I wanted something simpler like `man` for mdn. Now i imagine having the documentation already in md and keeping it local, i'm a step closer and it'll be more powerful with tools like fzf, ripgrep, and mdcat. Gotta check if there's already a search tool for MD that weighs heading levels, or code blocks, bold text, etc
- chrisandchris 4y agoIf there just would be some format and rendering engine that would us allow to display text nice. Let me think, something like HTML and a browser? Jokes aside, it's interesting to see at what lengths people go just to get it "in a format I prefer" rather than using the given format (and the other side not having any kind of structured format as it looks).
- AdrianB1 4y agoWhile this is a good idea and we did something similar in my company, the only concern is the slippery slope of extending markdown. It is just a matter of time reaching this: https://xkcd.com/927/ https://xkcd.com/927/ .
- barbariangrunge 4y agoI’ve been using a writing app lately that uses markdown, and that has an export feature to produce documents that interpret your markup in various ways. It’s rather nice to use but is missing a few things: I wish there was a markdown tag to indicate “title” or “author byline” so that # and ## weren’t inconsistently reserved by certain formatting styles. Altogether, it is a great system though Off topic: recommend a nodejs tool (or something client side?) to convert markdown to html to make article writing easier for custom sites?
- pacaro 4y agoHave you tried pandoc got client side conversion?
- barbariangrunge 4y agoI’ll try it!
- laacz 4y agoNot a nodejs tool, but pandoc is an industry standard for converting between many text file formats.
- earth2mars 4y agoObsidian is my go-to note taking. I understand the flexibility of asciidoc, I don't see I'm going to adopt anything other than markdown, as a simply want one document formatting. Simple is better.
- solarkraft 4y ago> HTML cruft, like <span id="486uw3y3"> crept into the source, often from authors pasting HTML from another rich editing environment into the MDN WYSIWYG editor That's a problem with a bad WYSIWYG editor, not HTML in general. > authors were faced with the result of 15 years of people pasting rich content into the WYSIWYG editor, resulting in [a ton of garbled HTML markup] ... But you could have cleaned up the HTML. > The beauty of Markdown, to you as a writer, is that it lets you concentrate on expressing concepts and hardly thinking about syntax at all. I entirely disagree because there are few WYSIWYG editors for it and almost certainly not for "that one non-standard extension" everyone adds to their flavor. I'll give them that HTML particularly sucks for code examples, which is a very good reason to switch, but the comparison in the article is not a very fair one - it's bungled HTML vs Markdown.
- steve1977 4y agoConsidering what MDN is about, I find this kind of ironic.