SVG by default (#3717)
Make cleaner badge URLs by omitting the `.svg` extension. Closes #2674
This commit is contained in:
@@ -183,13 +183,13 @@ export default function Usage({ baseUrl }) {
|
||||
|
||||
<p>Using dash "-" separator</p>
|
||||
<p>
|
||||
<Snippet snippet={`${baseUrl}/badge/<LABEL>-<MESSAGE>-<COLOR>.svg`} />
|
||||
<Snippet snippet={`${baseUrl}/badge/<LABEL>-<MESSAGE>-<COLOR>`} />
|
||||
</p>
|
||||
<StaticBadgeEscapingRules />
|
||||
<p>Using query string parameters</p>
|
||||
<p>
|
||||
<Snippet
|
||||
snippet={`${baseUrl}/static/v1.svg?label=<LABEL>&message=<MESSAGE>&color=<COLOR>`}
|
||||
snippet={`${baseUrl}/static/v1?label=<LABEL>&message=<MESSAGE>&color=<COLOR>`}
|
||||
/>
|
||||
</p>
|
||||
|
||||
@@ -229,7 +229,7 @@ export default function Usage({ baseUrl }) {
|
||||
<H3>Endpoint</H3>
|
||||
|
||||
<p>
|
||||
<Snippet snippet={`${baseUrl}/endpoint.svg?url=<URL>&style<STYLE>`} />
|
||||
<Snippet snippet={`${baseUrl}/endpoint?url=<URL>&style<STYLE>`} />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -243,7 +243,7 @@ export default function Usage({ baseUrl }) {
|
||||
<p>
|
||||
<StyledCode>
|
||||
{baseUrl}
|
||||
/badge/dynamic/json.svg?url=<URL>&label=<LABEL>&query=<
|
||||
/badge/dynamic/json?url=<URL>&label=<LABEL>&query=<
|
||||
<a
|
||||
href="https://jsonpath.com"
|
||||
target="_BLANK"
|
||||
@@ -257,7 +257,7 @@ export default function Usage({ baseUrl }) {
|
||||
<p>
|
||||
<StyledCode>
|
||||
{baseUrl}
|
||||
/badge/dynamic/xml.svg?url=<URL>&label=<LABEL>&query=<
|
||||
/badge/dynamic/xml?url=<URL>&label=<LABEL>&query=<
|
||||
<a href="http://xpather.com" target="_BLANK" title="XPath syntax">
|
||||
//data/subdata
|
||||
</a>
|
||||
@@ -267,7 +267,7 @@ export default function Usage({ baseUrl }) {
|
||||
<p>
|
||||
<StyledCode>
|
||||
{baseUrl}
|
||||
/badge/dynamic/yaml.svg?url=<URL>&label=<LABEL>&query=<
|
||||
/badge/dynamic/yaml?url=<URL>&label=<LABEL>&query=<
|
||||
<a
|
||||
href="https://jsonpath.com"
|
||||
target="_BLANK"
|
||||
@@ -394,8 +394,19 @@ export default function Usage({ baseUrl }) {
|
||||
</QueryParamTable>
|
||||
|
||||
<p>
|
||||
We support <code>.svg</code>, <code>.json</code>, <code>.png</code> and
|
||||
a few others, but use them responsibly.
|
||||
We support <code>.svg</code> and <code>.json</code>. The default is
|
||||
<code>.svg</code>, which can be omitted from the URL.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
While we highly recommend using SVG, we also support <code>.png</code>
|
||||
for use cases where SVG will not work. These requests should be made to
|
||||
our raster server <code>https://raster.shields.io</code>. For example,
|
||||
the raster equivalent of
|
||||
<code>https://img.shields.io/v/npm/express</code> is
|
||||
<code>https://raster.shields.io/v/npm/express</code>. For backward
|
||||
compatibility, the badge server will redirect <code>.png</code> badges
|
||||
to the raster server.
|
||||
</p>
|
||||
</section>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user