Skip to content

Commit

Permalink
docs: add page for badges
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Mar 4, 2024
1 parent e548be3 commit 69f38f2
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
63 changes: 63 additions & 0 deletions frontend/docs/badges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
description: JSR provides a badges for each package that can be used to showcase the package version or JSR score for a package.
---

For every package, JSR provides an SVG badge that can be included in READMEs,
documentation, or other places to showcase the package version or JSR score for
a package.

## Version Badge

The version badge is a simple way to show the version of a package. It is
available at the following URL:

```
https://jsr.io/badges/@<scope>/<package>
```

It looks like this:

[![JSR](https://jsr.io/badges/@luca/flag)](https://jsr.io/@luca/flag)

To include it in a markdown document, copy the following code and replace
`<scope>` and `<package>` with the scope and package name of the package.

```markdown
[![](https://jsr.io/badges/@<scope>/<package>)](https://jsr.io/@<scope>/<package>)
```

In a HTML document, use the following code:

```html
<a href="https://jsr.io/@<scope>/<package>">
<img src="https://jsr.io/badges/@<scope>/<package>" alt="">
</a>
```

## JSR Score Badge

The JSR score badge is a way to show the JSR score of a package. It is available
at the following URL:

```
https://jsr.io/badges/@<scope>/<package>/score
```

It looks like this:

[![JSR Score](https://jsr.io/badges/@luca/flag/score)](https://jsr.io/@luca/flag)

To include it in a markdown document, copy the following code and replace
`<scope>` and `<package>` with the scope and package name of the package.

```markdown
[![](https://jsr.io/badges/@<scope>/<package>/score)](https://jsr.io/@<scope>/<package>)
```

In a HTML document, use the following code:

```html
<a href="https://jsr.io/@<scope>/<package>">
<img src="https://jsr.io/badges/@<scope>/<package>/score" alt="">
</a>
```
6 changes: 6 additions & 0 deletions frontend/docs/toc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,17 @@ export default [
id: "scoring",
group: "Reference",
},

{
title: "Provenance and trust",
id: "trust",
group: "Reference",
},
{
title: "Badges",
id: "badges",
group: "Reference",
},
{
title: "Immutability",
id: "immutability",
Expand Down

0 comments on commit 69f38f2

Please sign in to comment.