Giter Club home page Giter Club logo

Comments (8)

HEIGE-PCloud avatar HEIGE-PCloud commented on August 23, 2024 2

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.

flobernd avatar flobernd commented on August 23, 2024

Thank you for the fix 🙂

from doit.

evilpan avatar evilpan commented on August 23, 2024

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.

flobernd avatar flobernd commented on August 23, 2024

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.

evilpan avatar evilpan commented on August 23, 2024

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.

flobernd avatar flobernd commented on August 23, 2024

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 (red) 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.

evilpan avatar evilpan commented on August 23, 2024

@HEIGE-PCloud

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.

@flobernd

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.

flobernd avatar flobernd commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.