Hey There Devs! ๐
Hope you are doing great with your projects.
TOC
Why this post? ๐ค
Procedure ๐งช
Example
Live Example
...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
That's interesting:)
Did a bit of search online and found the official documentation of this feature here and the discussions leading up to this feature in the community
Thats really nice!
Hope we will be getting somethng like that in dev.to post markdowns too
Really not a fan of GitHub's approach here. Markdown is supposed to be a format that's compatible with many platforms, and a valid URL can only have one hash. That means that other platforms either have to implement the URL hash matching logic along with the
gh-*
names, or they have to implement it in an inconsistent way, such as through query params (https://example.com/img.jpg?gitlab-theme=dark&discourse-theme=dark&some-other-platform=dark#gh-dark-mode-only
). Why not just use a single, cross-platform query param (?theme=dark
), add this as a documented part of GitHub-flavored markdown, and be done with it? Other platforms that fully or partially support GFM can then add support in their own time, without using up the single "slot" in the URL's hash or using explicitlygh-*
named parameters.I am totally agree with your points here. And also i didn't like how they restricted to the images that are only hosted via github. Ig they did that to overcome that hash issue in urls. They might have thought that if they won't allow any other urls, there won't be any problems in using hash.
tbh its a very bad and untidy approach to simple thing. In my views either the query paramaters are good or specifying them as options like
![Dark](https://example.com/dark_img.png){theme = dark}
.Seems like its time to open an issue at the their support or in the github repo
In the community the actual guy who requested for the feature actually had suggested somewhat better approach but the GitHub doesn't seem to take his suggestions.
I guess they are owned by Microsoft now so maybe we shouldn't be surprised by this kind of embrace-extend-extinguish bullshit.
Microsoft keep doing unusual things ๐
To be fair github started using "github flavored markdown" (which basically means that if you clone a repository on any other host your readme.md will not display correctly) loooong before Microsoft every thought about buying them.
I'm on board with GFM, especially now it has become a de-facto standard (albeit one among several). Ideally there'd be a proper spec for it, but there isn't one of those even for the original version of Markdown.
The problem with
gh-*
hash params is that it forces other implementers of GFM to implement this explicitly GitHub-centric API that even end users have to know about. I mean maybe that's intentional from a "branding" point of view, but it's incredibly obnoxious from a design point of view.Actually i been looking for this. โจ
Pleased to be helpful โค๏ธ
Hello Arnav Kumar,
thank you for your article.
I enjoyed reading it and testing what you wrote.
I took two images that let the user know what mode he/she is in.
This is interesting because I'm telling the user what mode he/she is in without me knowing what mode the user is really in :D!
What a creative idea lol! โค๏ธ๐
This is so useful -- thanks! Bookmarked!
โค๏ธ
Tanks for the valuable information
โค๏ธ
Hi bro i want to speak withe u .
becuase i want to your mentoring support tanks bro see you
short but enough and super cool. :)
Thanks!โค๏ธ
This is cool..
Thanks for this article ๐
โค๏ธ
Great work brother ๐๐
Thanks! โค๏ธ
Do you have a video for this because I can't understand your text I can't speak english
Created a simple demo, hope you get it now
Thank you very much
This is interesting and much helpful for my projects.
Thanks! โค๏ธ
Thank you
โค๏ธ
Such a cool idea Arnav! Thanks for sharing ๐
Thanks! โค๏ธ
Thanks
โค๏ธ
I already mentioned those in disclaimers thought can paste your images in the markdown editor and it will get uploaded then you can use it the way you want
Just used this and found that when you have the other theme than the one provided, the element is still displayed, and there's an extra (empty) line where the expected image is to be,
to Mitigate this, I just added both images in one line, take a look at this for reference github.com/SscSPs/color/issues/47
I use app to do work for me.
I use (typo) app.
How to disable Markdown rendering ?
Dua For Love Marriage To Agree Parents
Ig currently there's isn't any way to do that now but i wonder why anyone would want to disable markdown rendering in markdowns thats the main core point of the markdowns.
If you don't wanna render it, then just use simple
.txt
files its all you needBtw this link doesn't seem relatable to the context