# Automate your badges on markdown files with all-shields-cli


[![Badge generator of shields.io from .all-shieldsrc dotfile: Tool to help automate your badges of shields.io from a dotfile for your markdown files. Inspired by all-contributors-cli](https://raw.githubusercontent.com/ptkdev/all-shields-cli/nightly/.github/assets/ptkdev-all-shields-cli-logo.png)](https://www.npmjs.com/package/@ptkdev/all-shields-cli)

# 🦌 Badges generator from dotfiles for any markdown

Tool to help automate your badges of shields.io, badgen.net, fury.io and snyk.io from `.all-shieldsrc` dotfile for your markdown files. You can use Liquid variables like `{{name}}` or `{{version}}` which refer to your `package.json`. 

Inspired by [all-contributors-cli](https://www.npmjs.com/package/all-contributors-cli) 

Resources: [[all-shields-cli on npm](https://www.npmjs.com/package/@ptkdev/all-shields-cli)] [[all-shields-cli on github](https://github.com/ptkdev/all-shields-cli)]

## 💡 Features
* [✔️] Easy to use
* [✔️] MIT License
* [✔️] Support: shields.io
* [✔️] Support: fury.io
* [✔️] Support: snyk.io
* [✔️] Support: badgen.net
* [✔️] Full customizations!
* [✔️] Liquid Variables
* [✔️] Tool to help automate your badges on markdown.
* [✔️] Badges generator from dotfiles for any markdown

## 👔 Screenshot
[![Badges generator from dotfiles for any markdown](https://raw.githubusercontent.com/ptkdev/all-shields-cli/nightly/.github/assets/screenshot/ptkdev-all-shields-cli-screen1.png)](https://raw.githubusercontent.com/ptkdev/all-shields-cli/nightly/.github/assets/screenshot/ptkdev-all-shields-cli-screen1.png)

## 🚀 Installation
1. In your node project run: `npm install @ptkdev/all-shields-cli --save-dev`
2. In your `package.json` add script:
```javascript
	...
	"scripts": {
		"all-shields-cli": "all-shields-generate"
	}
	...
```
3. Create `.all-shieldsrc` and paste sample:
```javascript
{
	"files": [
		"README.md"
	],
	"shields": [
		{
			"id": "my-badges",
			"badges": [
				{
					"url": "https://www.npmjs.com/package/@ptkdev/all-shields-cli",
					"color": "lightgray",
					"label": "package name",
					"title": "package name",
					"message": "all-shields-cli",
					"style": "flat",
					"logo": "",
					"platform": "shields"
				}
			]
		}
	]
}
```
4. Add in your `README.md` the html comment (`my-badges` is `id` from the previous step):
```html
<!-- all-shields/my-badges:START -->
<!-- all-shields/my-badges:END -->
```

5. Run `npm run all-shields-cli`

See folder `examples`, run with `node example.js`. Below is available a description of `options` values.


## 🔑 Liquid variables
In your `.all-shieldsrc` dotfile you can use liquid variables like `{{name}}` or `{{version}}` which refer to your `package.json`. Key of `package.json` is name of liquid variable `{{key_from_package.json}}`

## 💫 License
* Code and Contributions have **MIT License**
* Images and logos have **CC BY-NC 4.0 License** ([Freepik](https://it.freepik.com/) Premium License)
* Documentations and Translations have **CC BY 4.0 License**


# ❤️ Thanks! Leave a feedback!
