Finding a Badge
Last updated
Was this helpful?
Last updated
Was this helpful?
Arguments: [category] [badgeName]
Finding commands involves laying out your command like this:
As an example, if you wanted to find a badge for Discord, you can run the following command:
In the case seen above, social
is the category which Discord is contained in, while discord
is the definition name of the badge.
This will output the following in the terminal:
The badge will show up like this in Markdown:
If you aren't sure that mdbadges-cli has the badge you're looking for, use mdb search
to search for your badge across all categories.
You can also find more than one badge at the same time, as long as they are all within the same category as each other. This also supports the additional options for this command.
For example, to generate 3 badges for Discord, GitHub and YouTube, which are all from the Social category, run:
This will output the following in the terminal:
--style / -s
Function: Toggles the style of the badge.
There are 5 styles available to use with badges. These include the following:
flat
flat-square
plastic
social
for-the-badge
To change the style of the badge, which is by default flat
when no style is specified in the Shields.io URL, add this option after the command:
This will output the following in the terminal:
--link
Function: Toggles whether a badge should link to another site.
Adding this option will ask you to enter a prompt with a link that you want to lead people to when they click on it:
From here, enter the link you want to lead a user to when they click on the badge:
Using this option when finding multiple badges will prompt you to enter seperate links for each specified badge.
--html
Function: Toggles the HTML version of a badge.
Getting the HTML version of a badge is also supported.
Adding this option will output the HTML code as an <img>
tag, and also surrounded by <a>
tags if you use the --link
option together with this option.
To get the HTML version of a badge, use the option after your command:
This will output the following in the terminal:
You can now use this code in your HTML to display it on a webpage.
The badges will show up like this in Markdown:
The badge will show up like this in Markdown: