Create
This command displays prompts to create your own badge.
To start, run:
then follow the prompts that follow.
In the below guide, we will create a custom GitHub badge which links to the mdbadges-cli repository.
Prompts
Alt Text
This is the text enclosed within the first square brackets.
In our example, this is [![
mdbadges-cli
]
...
Text On Badge
This is the actual text that will be shown on the badge image.
In our example, we enter mdbadges-cli within the prompt, so this becomes https://img.shields.io/badge/
mdbadges-cli
-%...
in the URL.
Hexadecimal value
This is the hex color for the background of the badge.
In our example, this is ...mdbadges-cli-
000000
...
Logo
In our example, this is logo=
github
...
Logo Color
This is the color that will the logo will use on the badge.
In our example, this is logoColor=
white
...
Style
This prompt will determine the style that the created badge will use.
There are 5 styles you can pick from to use in the badge. These include the following:
flat
flat-square
plastic
social
for-the-badge
In our example, this will be style=
for-the-badge
...
Link (Optional)
This is an optional prompt that will let you enter the link that the badge will redirect to when clicked.
In our example, this is
...)](
https://github.com/inttter/mdbadges-cli
)
If you have been following this guide, this is what the prompts should look like:
With those steps completed, you should have a badge that you can now use in either your Markdown or your HTML webpage. You can run this command again to create another new badge!
Aliases
This command has 1 alias, which is as follows:
generate
Last updated
Was this helpful?