• Resolved Paul Schacht

    (@whatthedickens)


    First, thank you for this plugin. It’s great. I’m using it right now to help my students learn to use Markdown. They have to post to our class blog using Markdown; in the most recent assignment, they were required to include an image.

    What I’m seeing is that an image uploaded to the media library and included using Markdown syntax does not show up on the site home page, which aggregates all posts. It does show up on the dedicated post page, however. Moreover, it shows up for me on the home page when I’m logged in as admin. I haven’t yet checked to see if it shows up on the home page for other logged-in users.

    What shows up on the home page for a not-logged-in-user is the Markdown code. If the image is inserted using the WYSIWYG editor, the first part — ![image description] — gets followed by WordPress image-alignment code and is wrapped in additional square brackets, thus: [![image description]{alignnone}]. The URL in the parentheses that follow is a relative one. That doesn’t prevent the image from being properly included in the dedicated post page. Some students have removed the additional brackets to clean up the code, leaving it correctly as ![image description](url). But again, the image doesn’t show up for me on the site home page unless I’m logged in. This is true whether the URL is left as relative or made absolute.

    For now, I’ll be asking students to include images with HTML. But it would be great to see this fixed.

    Thanks again for a great plugin!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pierre-Henri Lavigne

    (@peter202202)

    Wowohua @whatthedickens what an honor ??
    That’s really awesome, wasn’t expected such use. ???

    Damned, I could confirm the bug, yeah on the front / home template markdown filters were not active. ??I never had the case to output the full content on the front page. Don’t worry I’ve just patched it and in a few minutes the version 3.3.8 should be available. Please update when you can and give it a new try, that should work. ??

    About the images on your blog, I gave a quick look and everything seems fine. About the “weird” syntax, I guess you mean about the markdown extra variant:
    https://michelf.ca/projects/php-markdown/extra/
    There are several alternatives of writing markdown (extended, kramdown, etc…) to perform more advanced syntax, I selected this typical historic one, to support existing features of WordPress when possible.

    Basically text between “{” “}” are there to handle extra html attributes. In case of WordPress for example the {.aligncenter} would add a classname so the image can be centered if your theme supports it.

    To be honnest I modified a bit the output, it’s not pure plain markdown out as HTML, the images are wrapped within a figure tag and figcaption if available as well for accessibility / layout. The doc is here :
    https://www.markup-markdown.com/wordpress-tutorials/images/
    (Fresh I started yesterday it’s a work in progress. ??)

    Hope this can help and that you can keep going on with the work for your students. Modifying media manually should not be necessary, it’s gonna be a pain. Thank you again for your kind words and feel free to reach me again if need be.

    Kind regards,

    Thread Starter Paul Schacht

    (@whatthedickens)

    Merci mille fois for fixing this right away, and for the helpful explanation! The images are all showing up as expected now.

    I really appreciate the link to the documentation as well!

    Plugin Author Pierre-Henri Lavigne

    (@peter202202)

    @whatthedickens Pas de soucis, I’m glad to hear that images are showed properly ??

    The following site is nice as well as a learning resource :
    https://www.markdownguide.org/basic-syntax/
    https://www.markdownguide.org/extended-syntax/

    Please note that not all the syntax are supported with the plugin…

    I’m gonna mark the ticket as resolved for now, and wish you a good markdown trip ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image inclusion fails on blog home page’ is closed to new replies.