4 ms·
TIL: You can somehow collapse things in GitHub README files. Seriously why do I feel like a Markdown n00b all of a sudden. For those who don't know what I mean,
by giancarlostoro 8y ago
TIL: You can somehow collapse things in GitHub README files. Seriously why do I feel like a Markdown n00b all of a sudden. For those who don't know what I mean, click on any of the OS' listed under the 'How to install' section. I wish more README files on GitHub would sorta do this to some extent, some README's are just so bloated with too much noise, let's say it's nice for a FAQ section.
Anyway, back on topic: this is interesting, has anyone used GLFW for Go? What if I don't have a C or C++ compiler, how does Go handle C / C++ dependencies? Do you need everything required to build those too? I usually try to stick to things Go can compile in native Go as much as possible so I'm not familiar with this.
- detaro 8y agoYou can use HTML in markdown, which is what was done here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details https://developer.mozilla.org/en-US/docs/Web/HTML/Element/de...
- tilpner 8y agoThis also works for comments: https://github.com/dear-github/dear-github/issues/166#issuecomment-252282315 https://github.com/dear-github/dear-github/issues/166#issuec...
- christophilus 8y agoIt's done via embedded HTML, which GitHub flavored markdown supports. I didn't know about the HTML details element, though. Pretty handy! <details> <summary>Click to expand</summary> <div>Hidden until expanded, no JS or CSS required!</div> </details>
- masklinn 8y agoIt also works in issue/PR descriptions and comments. As far as I'm concerned that's where it's most convenient as it lets you e.g. post big screenshots or graphical rendering of profiles (flamegraphs) without taking up screenfuls of space and bothering everybody.
- Hixie 8y agoIf it makes you feel better, I _invented_ `<details>` and didn't realize you could do that in markdown...
- laumars 8y agoThe markdown in there looks like some horrible HTML / markdown hybrid. Yeah collapsing elements are cool if you’re viewing in a web browser but the point of markdown is that it’s supposed to look good in a plain text editor / terminal as it does when rendered and the raw version of that markdown file definitely isn’t. Ultimately though I’m not going to complain that an open source developer has documented their free code in a way that differs from my own personal preferences. But before jumping on the bandwagon it’s worth thinking about whether you want your README to be readable as plain text as well.