Comments (8)
I remember the image behavior being a long standing controversial topic. People have conflicing opinions about what the correct behavior should be, and I think they all have vaild reasons for their specific use cases.
I'll just provide one of my observations here. I think sometimes blog authors care about the gallary feature more than the readers. As a reader, I can simply zoom in if I want to see a picture at a larger form factor. I also rarely find listing all images in a blog post in a row useful, since most images in a blog post are supplementary to the main text. I imagine many other text based content focused websites (like news websites) don't provide a "gallary" feature for a similar reason.
from doit.
Thank you for the fix 🙂
from doit.
Oh... this cause a lot of images broken like ![text](https://exapmle.com/image.png)
, since many markdown documents just use text as caption and not the Figure Description
part, and even some markdown engine doest not support figure description well. So what about just treat raw images without both text and caption like ![](https://example.com/image.png)
as non-figure? There's a lot of user that meets the same issue, for example dillonzq/LoveIt#213 dillonzq/LoveIt#238 dillonzq/LoveIt#490 and dillonzq/LoveIt#522 .
What do you think, @HEIGE-PCloud ?
from doit.
If you ask me, the current (and original LoveIt
behavior) is the most correct one. Standard markdown does not know about figures. Standard markdown just inlines images, like LoveIt/DoIt
as well does now after the fix. The additional figure description text is ignored by most markdown engines (and if the engine complains, this is actually correct as it is not standard markdown 😋).
I don't see a benefit in changing the standard markdown behavior to something non-standard.
When I paste an existing markdown document in a blog, I expect it to look exactly like it is displayed in other markdown engines. Figures are exclusive to this kind of blog so in my opinion they should be enabled explicitly (by adding the figure description to the markdown image).
from doit.
You are right, @flobernd. The standard markdown does not handle the the additional figure description text, thus most of markdown writers does not add it when inserting images to the document.
The question is, while rendering the markdown document, the default behavior of the image rendering shoud be add to gallary, click to enlarge or open the image in new tab. Which is what the most of markdown supported blog system do, even github's image will open in new tab when clicked.
Anyway, this is a preference matter. If someone is using [img](link)
to insert images and want to make it show on gallary, she would need to add additional figure description text in EVERY previous image, which is quite annoying, I think.
from doit.
the default behavior of the image rendering shoud be add to gallary
I disagree here for the above stated reasons. In standard markdown, these images () are inlined and not rendered as a figure. I personally would not like to have them in some kind of gallery. If you look at my original bug report, they create a lot of noise in the gallery.
or open the image in new tab
This would be fine for me, but I still don't see the added benefit here as one could simply add the figure description.
thus most of markdown writers does not add it when inserting images to the document
If someone is using
[img](link)
to insert images and want to make it show on gallary, she would need to add additional figure description text in EVERY previous image, which is quite annoying, I think.
Most markdown writers use images to decorate their texts. They expect that to result in a specific layout (which is inlined images in this case). If we would automatically display them as figures, that would mess with the intended layout.
I see writing a blog article as a dedicated workflow. It's different than writing a regular markdown paper. Maybe I'm missing something here, but does it really happen that often that somebody converts an existing markdown document to a blog article?
from doit.
As a reader, I can simply zoom in if I want to see a picture at a larger form factor
That's what I mean. In DoIt
the only feature to achive this behavior is light gallery
(AFAIK). Currently the default behavior is to make images inline, and readers cannot simply zoom in when click the image.
If you look at my original bug report, they create a lot of noise in the gallery.
I agree, personally I'm not a fan of this gallery feature.
Most markdown writers use images to decorate their texts. They expect that to result in a specific layout (which is inlined images in this case).
Does people use inline image frequently when writing markdown? at least for me, I rarely use inline image
, since images are either too wide or too high to be correctly inlined into text lines. So most of images is put in a single new line. In your use case, I prefer emoji for it: 🔴🟥/🟢🟩
but does it really happen that often that somebody converts an existing markdown document to a blog article?
The scenario is people may migrate from one static blog generator to another, e.x. from Jekyll/Hexo to hugo, or from one theme to another. For example: #693 (PS: this update also break that issue)
As I said, this is just a matter of preference, maybe we need a poll here. Or there's another solution, like making inline image clickable to zoom without gallery.
from doit.
The scenario is people may migrate from one static blog generator to another, e.x. from Jekyll/Hexo to hugo, or from one theme to another.
Interesting! It's indeed annoying that different themes handle standard markdown behavior in different ways.
I still think DoIt is doing a great job here as it follows the standard mardown as close as possible while still allowing extended syntax on top. This minimizes surprises for users that are used to standard markdown while still offering a lot of extra options.
from doit.
Related Issues (20)
- [BUG] WeChat share is gone
- How Can I Fix the Font Awesome Shot Code in Config Files HOT 1
- [FEATURE] Series Display HOT 4
- [FEATURE] Waline v3 migration
- [BUG] 文章发布日期与修改日期一致,文章就不显示了~~~ HOT 6
- [FEATURE] 文章排序 **sort** HOT 3
- [BUG] scroll bar in the default style is blocking the code block in Windows 10 HOT 6
- Refactor assets management
- [Experimental] Use Speculation Rules API to replace instant.page
- [Experimental] View Transition Support HOT 1
- [BUG] The image refactor cause --disableFastRender not working HOT 13
- Q: Customize dark theme CSS HOT 2
- [BUG] Header logo is cut on the sides HOT 6
- [FEATURE] Skill and experience timeline widget add HOT 2
- [BUG] 文件名、目录名或卷标语法不正确。 HOT 4
- [BUG] img height error HOT 1
- [FEATURE] Shortcode for github code HOT 4
- [BUG] Tags with '#' are not displayed correctly HOT 4
- Refactor tags / categories / series rendering HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doit.