List of Markdown badges, no not Discourse badges, those little images that look like flags on some sites

3 Likes

Discourse

It seems to be missing the logo on the left. :thinking:

I have to admit, I’m not 100% sure what these are for. :slight_smile: Care to elaborate @EricGT and save me some googling?

7 Likes

I know that badges are used extensively at Repology as demonstrated by the following example using SWI-Prolog: MSYS2 mingw package

Recently, I came across a DOI badge in a GitHub repository for neuro-vector-symbolic architectures: DOI. For those who read a lot of research papers, DOIs are very important and can be located using the DOI site but the Markdown badge saves the lookup step.

I asked ChatGPT to explain this specific DOI badge, as I was interested in learning more. Here’s what ChatGPT had to say:

This markdown creates a badge with a DOI (Digital Object Identifier) link for a specific resource hosted on Zenodo, a research data repository.

The syntax used to create the badge is as follows:

[![DOI](https://zenodo.org/badge/587315616.svg)](https://zenodo.org/badge/latestdoi/587315616)

The badge consists of an image (in this case, an SVG image) with a hyperlink to the latest DOI for the resource. The ![DOI] syntax specifies that the image will be used to represent the DOI, and the https://zenodo.org/badge/587315616.svg link is the URL for the image file itself. The second part of the markdown, https://zenodo.org/badge/latestdoi/587315616, is the hyperlink that the image will take you to when clicked, which is the latest version of the DOI for the specified resource.

Overall, this markdown is useful for indicating the presence of a DOI for a research resource, and can be embedded in documentation, webpages, or other online resources."

This led me to discover the a11y-markdown-badges repository on GitHub, which has even more examples of badges. I also found several online markdown badge generators by Googling for “online markdown badge generator.” Now that I know badges can be more versatile and serve as both a link and a short form of text or icon, I will keep an eye out for others and plan to use them in my Discourse post.


This is what Chrome shows for the page.

and the Markdown badge in Discourse shows

Discourse

An image capture of the Discorse edit preview (right panel) before saving

image

See next section for similar/same problem.


The one major problem I have with badges used on Discourse is that Discourse will cache the image once the page is saved, I think during the cooking phase. The badges from Repology for specific versions get converted such that they no longer stay updated. Learned of this creating this page. My hope was to have all of the badges posted in a Discouse page on the SWI-Prolog forum and the badges change based on the links in the badge changing the genration of the badge. :frowning_face:


EDIT

In doing some more research on my problem

  1. Site settings related to this can be found by searching for download, hotlink, image or local.
  2. For users with admin access Rebuild HTML might be effective. At present don’ plan on creating test data will just wait a few weeks for the badges to change then check.

image

4 Likes

This is useful, I will use them like everywhere :slight_smile:

2 Likes

Last night it occurred to me that these are a lot like Key-Values. If you are a programmer and work with dictionary structures or JSON, then that should jump out at you. Granted they do not look like Key-Values by themselves but if you put enough of them together in a column it is hard to miss.

3 Likes

This is a great example in the “ChatGPT will make things worse” column.

Specifically:

  • “The ![DOI] syntax specifies that the image will be used to represent the DOI” is strictly wrong — that is part of the syntax to specify an image in Markdown — the ! indicates that the following link (using the regular Markdown link syntax) is to an URL for an image file that should be displayed inline. The [DOI] part is simply the alt text for that link.
  • The “second part of the markdown” isn’t really the second part, but actually _wraps around the entire “first part” — including the first [ on a line.
  • If you don’t already understand how markdown works, the last sentence is very misleading — it wouldn’t be useful at all in a web page or documentation that doesn’t have a way to render that markdown into something (like HTML) for display.

In short: ChatGPT is fun to play with, but if you’re using it for learning, you’re probably being mislead. And please do not recycle its output uncritically for helping others — that’s basically “human-washing” the output, making it seem more likely to be legitimate.

5 Likes

I am not using ChatGPT to learn new things but if one gets good at prompt engineering and knows how to verify the output then ChatGPT is quite useful.

This topic starts a series of ChatGPT prompts related to SWI-Prolog, much of the genreated code either does not work or needs to be corrected. Sometimes with very explict prompts it will generate working code the first time.

2 Likes