During developing my app (= badge-for-git) I realized that I can use these badges (= SVG files) on my stack-overflow profile
So here is a guide for you that you can use it as well.
- an account on github.com (for storing the SVG files)
- create a repository (short name is preferable, mine is s)
- use badge-for-git and create what you want
- follow the instructions I putted there (= on badge-for-git, step 1 through 6)
- then follow the below steps
It consists of:
https://
raw.
github
,user
,content
and.com
. altogether:githubusercontent.com
- your user-name, mine is
k-five
- your repository name, mine is
s
- branch, mine is
master
- directory name, mine is
a
- name of the SVG file, mine is
bpy-bfg.svg
- suffix:
?sanitize=true
- press Enter
- if want to see a clean source-code, right-click add see: "view-source-page" (optional)
- copy the URL
go on your stack-overflow account on anywhere you like use an img
HTML tag or use stack-overflow shortcut: ![file-name](file-URL)
for me: <img src="https://raw.githubusercontent.com/k-five/s/master/a/pby-bfg.svg?sanitize=true" />
for me: ![powered-by-badge-for-git](https://raw.githubusercontent.com/k-five/s/master/a/pby-bfg.svg?sanitize=true)
by default if you add with an <img>
tag or even ![]()
shortcut you cannot click on and the SVG file refers to nowhere
So if you want to add a link to it:
for me:
<a href="https://github.com/k-five/badge-for-git">
<img src="https://raw.githubusercontent.com/k-five/s/master/a/pby-bfg.svg?sanitize=true" />
</a>
with shortcut:
[![](https://raw.githubusercontent.com/k-five/s/master/a/pby-bfg.svg?sanitize=true)]
(https://github.com/k-five/badge-for-git)
- you have any questions, ideas, problems, etc raise an issue on badge-for-git
- you are curious about what sanitize does see w3schools.com
- if you did not get the correct result, make user the URL is valid and correct, the
?sanitize=true
is vital! - if you changed a file (= SVG) or wanted to replace it, it is better to clean you cache otherwise may do do not get the result