mirror of
https://github.com/badges/shields.git
synced 2025-04-18 19:44:04 +03:00
move some docs to the website (#9347)
* move some docs to the website * update expected test value * link to new documentation locations
This commit is contained in:
parent
436f3a1a3f
commit
d882433fd9
4
.github/ISSUE_TEMPLATE/3_Badge_request.yml
vendored
4
.github/ISSUE_TEMPLATE/3_Badge_request.yml
vendored
@ -12,7 +12,7 @@ body:
|
||||
**fetch and display data from an upstream service**.
|
||||
If your suggestion is for a static badge
|
||||
(which shows the same information every time it is requested), it is
|
||||
[already possible to make these](https://github.com/badges/shields/blob/master/doc/static-badges.md).
|
||||
[already possible to make these](https://shields.io/docs/static-badges).
|
||||
We don't add specific routes for badges which only show static information.
|
||||
|
||||
- type: textarea
|
||||
@ -25,7 +25,7 @@ body:
|
||||
- Which service is this badge for e.g: GitHub, Travis CI
|
||||
- What sort of information should this badge show?
|
||||
Provide an example in plain text e.g: "version | v1.01" or as a static badge
|
||||
(static badge generator can be found at https://shields.io/#your-badge )
|
||||
(static badge generator can be found at https://shields.io/badges/static-badge )
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
@ -70,7 +70,7 @@ This repo hosts:
|
||||
[Make your own badges!][custom badges]
|
||||
(Quick example: `https://img.shields.io/badge/left-right-f39f37`)
|
||||
|
||||
[custom badges]: https://shields.io/#your-badge
|
||||
[custom badges]: http://localhost:3000/badges/static-badge
|
||||
|
||||
### Quickstart
|
||||
|
||||
|
@ -247,7 +247,7 @@ function category2openapi(category, services) {
|
||||
in: 'query',
|
||||
required: false,
|
||||
description:
|
||||
'One of the named logos (bitcoin, dependabot, gitlab, npm, paypal, serverfault, stackexchange, superuser, telegram, travis) or simple-icons. All simple-icons are referenced using icon slugs. You can click the icon title on <a href="https://simpleicons.org/" rel="noopener noreferrer" target="_blank">simple-icons</a> to copy the slug or they can be found in the <a href="https://github.com/simple-icons/simple-icons/blob/master/slugs.md">slugs.md file</a> in the simple-icons repository.',
|
||||
'One of the named logos (bitcoin, dependabot, gitlab, npm, paypal, serverfault, stackexchange, superuser, telegram, travis) or simple-icons. All simple-icons are referenced using icon slugs. You can click the icon title on <a href="https://simpleicons.org/" rel="noopener noreferrer" target="_blank">simple-icons</a> to copy the slug or they can be found in the <a href="https://github.com/simple-icons/simple-icons/blob/master/slugs.md">slugs.md file</a> in the simple-icons repository. <a href="/docs/logos">Further info</a>.',
|
||||
schema: {
|
||||
type: 'string',
|
||||
},
|
||||
|
@ -92,7 +92,7 @@ const expected = {
|
||||
in: 'query',
|
||||
required: false,
|
||||
description:
|
||||
'One of the named logos (bitcoin, dependabot, gitlab, npm, paypal, serverfault, stackexchange, superuser, telegram, travis) or simple-icons. All simple-icons are referenced using icon slugs. You can click the icon title on <a href="https://simpleicons.org/" rel="noopener noreferrer" target="_blank">simple-icons</a> to copy the slug or they can be found in the <a href="https://github.com/simple-icons/simple-icons/blob/master/slugs.md">slugs.md file</a> in the simple-icons repository.',
|
||||
'One of the named logos (bitcoin, dependabot, gitlab, npm, paypal, serverfault, stackexchange, superuser, telegram, travis) or simple-icons. All simple-icons are referenced using icon slugs. You can click the icon title on <a href="https://simpleicons.org/" rel="noopener noreferrer" target="_blank">simple-icons</a> to copy the slug or they can be found in the <a href="https://github.com/simple-icons/simple-icons/blob/master/slugs.md">slugs.md file</a> in the simple-icons repository. <a href="/docs/logos">Further info</a>.',
|
||||
schema: { type: 'string' },
|
||||
example: 'appveyor',
|
||||
},
|
||||
|
35
doc/logos.md
35
doc/logos.md
@ -1,38 +1,6 @@
|
||||
# Logos
|
||||
|
||||
## Using Logos
|
||||
|
||||
### SimpleIcons
|
||||
|
||||
We support a wide range of logos via [SimpleIcons][]. They should be referenced by the logo slug e.g:
|
||||
|
||||
 - https://img.shields.io/npm/v/npm.svg?logo=nodedotjs
|
||||
|
||||
The set of Simple Icon slugs can be found in the [slugs.md](https://github.com/simple-icons/simple-icons/blob/develop/slugs.md) file in the Simple Icons repository. NB - the Simple Icons site and that slugs.md page may at times contain new icons that haven't yet been pulled into the Shields.io runtime. More information on how and when we incorporate icon updates can be found [here](https://github.com/badges/shields/discussions/5369).
|
||||
|
||||
### Shields logos
|
||||
|
||||
We also maintain a small number of custom logos for some services: https://github.com/badges/shields/tree/master/logo They can also be referenced by name and take preference to SimpleIcons e.g:
|
||||
|
||||
 - https://img.shields.io/npm/v/npm.svg?logo=npm
|
||||
|
||||
### Custom Logos
|
||||
|
||||
Any custom logo can be passed in a URL parameter by base64 encoding it. e.g:
|
||||
|
||||
 - https://img.shields.io/badge/play-station-blue.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48cGF0aCBkPSJNMTI5IDExMWMtNTUgNC05MyA2Ni05MyA3OEwwIDM5OGMtMiA3MCAzNiA5MiA2OSA5MWgxYzc5IDAgODctNTcgMTMwLTEyOGgyMDFjNDMgNzEgNTAgMTI4IDEyOSAxMjhoMWMzMyAxIDcxLTIxIDY5LTkxbC0zNi0yMDljMC0xMi00MC03OC05OC03OGgtMTBjLTYzIDAtOTIgMzUtOTIgNDJIMjM2YzAtNy0yOS00Mi05Mi00MmgtMTV6IiBmaWxsPSIjZmZmIi8+PC9zdmc+
|
||||
|
||||
### logoColor parameter
|
||||
|
||||
The `logoColor` param can be used to set the color of the logo. Hex, rgb, rgba, hsl, hsla and css named colors can all be used. For SimpleIcons named logos (which are monochrome), the color will be applied to the SimpleIcons logo.
|
||||
|
||||
-  - https://img.shields.io/badge/logo-javascript-blue?logo=javascript
|
||||
-  - https://img.shields.io/badge/logo-javascript-blue?logo=javascript&logoColor=f5f5f5
|
||||
|
||||
In the case where Shields hosts a custom multi-colored logo, if the `logoColor` param is passed, the corresponding SimpleIcons logo will be substituted and colored.
|
||||
|
||||
-  - https://img.shields.io/badge/logo-gitlab-blue?logo=gitlab
|
||||
-  - https://img.shields.io/badge/logo-gitlab-blue?logo=gitlab&logoColor=white
|
||||
For documentation on using logos, see https://shields.io/docs/logos
|
||||
|
||||
## Contributing Logos
|
||||
|
||||
@ -69,7 +37,6 @@ If you are submitting a pull request for a custom logo, please:
|
||||
|
||||
We try to ensure our logos are compliant with brand guidelines. If one of our custom logos does not conform to the necessary brand guidelines, please open an issue on the [shields.io tracker](https://github.com/badges/shields/issues) and we'll work with you to resolve it. If a logo from the simple-icons set does not conform to the relevant brand guidelines, please open an issue on the [simple-icons tracker](https://github.com/simple-icons/simple-icons/issues) first.
|
||||
|
||||
[simpleicons]: https://simpleicons.org/
|
||||
[simple-icons github]: https://github.com/simple-icons/simple-icons
|
||||
[svgo]: https://github.com/svg/svgo
|
||||
[svgomg]: https://jakearchibald.github.io/svgomg/
|
||||
|
@ -1,12 +1 @@
|
||||
# Static Badges
|
||||
|
||||
It is possible to use shields.io to make a wide variety of badges displaying static text and/or logos. For example:
|
||||
|
||||
-  - https://img.shields.io/badge/any%20text-you%20like-blue
|
||||
-  - https://img.shields.io/badge/just%20the%20message-8A2BE2
|
||||
-  - https://img.shields.io/badge/%27for%20the%20badge%27%20style-20B2AA?style=for-the-badge
|
||||
-  - https://img.shields.io/badge/with%20a%20logo-grey?style=for-the-badge&logo=javascript
|
||||
|
||||
Full documentation of styles and parameters: https://shields.io/#styles
|
||||
|
||||
More documentation on logos: https://github.com/badges/shields/blob/master/doc/logos.md
|
||||
This documentation has moved to https://shields.io/docs/static-badges
|
||||
|
21
frontend/blog/2023-07-03-new-frontend.md
Normal file
21
frontend/blog/2023-07-03-new-frontend.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
slug: new-frontend
|
||||
title: We launched a new frontend
|
||||
authors:
|
||||
name: chris48s
|
||||
title: Shields.io Core Team
|
||||
url: https://github.com/chris48s
|
||||
image_url: https://avatars.githubusercontent.com/u/6025893
|
||||
tags: []
|
||||
---
|
||||
|
||||
Alongside the general visual refresh and improvements to look and feel, our new frontend has allowed us to address a number of long-standing feature requests and enhancements:
|
||||
|
||||
- Clearer and more discoverable documentation for our [static](https://shields.io/badges/static-badge), dynamic [json](https://shields.io/badges/dynamic-json-badge)/[xml](https://shields.io/badges/dynamic-xml-badge)/[yaml](https://shields.io/badges/dynamic-yaml-badge) and [endpoint](https://shields.io/badges/endpoint-badge) badges
|
||||
- Improved badge builder interface, with all optional query parameters included in the builder for each badge
|
||||
- Each badge now has its own documentation page, which we can link to. e.g: [https://shields.io/badges/discord](https://shields.io/badges/discord)
|
||||
- Light/dark mode themes
|
||||
- Improved search
|
||||
- Documentation for individual path and query parameters
|
||||
|
||||
The new site also comes with big maintenance benefits for the core team. We rely heavily on [docusaurus](https://docusaurus.io/), [docusaurus-openapi](https://github.com/cloud-annotations/docusaurus-openapi), and [docusaurus-search-local](https://github.com/easyops-cn/docusaurus-search-local). This moves us to a mostly declarative setup, massively reducing the amount of custom frontend code we maintain ourselves.
|
13
frontend/docs/index.md
Normal file
13
frontend/docs/index.md
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Intro
|
||||
|
||||
Shields.io is a service for concise, consistent, and legible badges, which can easily be included in GitHub readmes or any other web page. The service supports dozens of continuous integration services, package registries, distributions, app stores, social networks, code coverage services, and code analysis services. It is used by some of the world's most popular open-source projects.
|
||||
|
||||
Browse a [complete list of badges](/badges) and locate a particular badge by using the search bar or by browsing the categories.
|
||||
|
||||
Use the builder to fill in required path parameters for that badge type (like your username or repo) and optionally customize (label, colors etc.). And it's ready for use! Copy your badge url or code snippet, which can then be added to places like your GitHub readme files or other web pages.
|
||||
|
||||

|
@ -1,5 +0,0 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# TODO
|
37
frontend/docs/logos.md
Normal file
37
frontend/docs/logos.md
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Logos
|
||||
|
||||
## SimpleIcons
|
||||
|
||||
We support a wide range of logos via [SimpleIcons](https://simpleicons.org/). All simple-icons are referenced using icon slugs. e.g:
|
||||
|
||||
 - https://img.shields.io/npm/v/npm.svg?logo=nodedotjs
|
||||
|
||||
You can click the icon title on <a href="https://simpleicons.org/" rel="noopener noreferrer" target="_blank">simple-icons</a> to copy the slug or they can be found in the <a href="https://github.com/simple-icons/simple-icons/blob/master/slugs.md">slugs.md file</a> in the simple-icons repository. NB - the Simple Icons site and slugs.md page may at times contain new icons that haven't yet been pulled into Shields.io yet. More information on how and when we incorporate icon updates can be found [here](https://github.com/badges/shields/discussions/5369).
|
||||
|
||||
## Shields logos
|
||||
|
||||
We also maintain a small number of custom logos for a handful of services: https://github.com/badges/shields/tree/master/logo They can also be referenced by name and take preference to SimpleIcons e.g:
|
||||
|
||||
 - https://img.shields.io/npm/v/npm.svg?logo=npm
|
||||
|
||||
## Custom Logos
|
||||
|
||||
Any custom logo can be passed in a URL parameter by base64 encoding it. e.g:
|
||||
|
||||
 - https://img.shields.io/badge/play-station-blue.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48cGF0aCBkPSJNMTI5IDExMWMtNTUgNC05MyA2Ni05MyA3OEwwIDM5OGMtMiA3MCAzNiA5MiA2OSA5MWgxYzc5IDAgODctNTcgMTMwLTEyOGgyMDFjNDMgNzEgNTAgMTI4IDEyOSAxMjhoMWMzMyAxIDcxLTIxIDY5LTkxbC0zNi0yMDljMC0xMi00MC03OC05OC03OGgtMTBjLTYzIDAtOTIgMzUtOTIgNDJIMjM2YzAtNy0yOS00Mi05Mi00MmgtMTV6IiBmaWxsPSIjZmZmIi8+PC9zdmc+
|
||||
|
||||
## logoColor parameter
|
||||
|
||||
The `logoColor` param can be used to set the color of the logo. Hex, rgb, rgba, hsl, hsla and css named colors can all be used. For SimpleIcons named logos (which are monochrome), the color will be applied to the SimpleIcons logo.
|
||||
|
||||
-  - https://img.shields.io/badge/logo-javascript-blue?logo=javascript
|
||||
-  - https://img.shields.io/badge/logo-javascript-blue?logo=javascript&logoColor=f5f5f5
|
||||
|
||||
In the case where Shields hosts a custom multi-colored logo, if the `logoColor` param is passed, the corresponding SimpleIcons logo will be substituted and colored.
|
||||
|
||||
-  - https://img.shields.io/badge/logo-gitlab-blue?logo=gitlab
|
||||
-  - https://img.shields.io/badge/logo-gitlab-blue?logo=gitlab&logoColor=white
|
13
frontend/docs/static-badges.md
Normal file
13
frontend/docs/static-badges.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Static Badges
|
||||
|
||||
It is possible to use shields.io to make a wide variety of badges displaying static text and/or logos. For example:
|
||||
|
||||
-  - https://img.shields.io/badge/any%20text-you%20like-blue
|
||||
-  - https://img.shields.io/badge/just%20the%20message-8A2BE2
|
||||
-  - https://img.shields.io/badge/%27for%20the%20badge%27%20style-20B2AA?style=for-the-badge
|
||||
-  - https://img.shields.io/badge/with%20a%20logo-grey?style=for-the-badge&logo=javascript
|
||||
|
||||
For more info, see:
|
||||
|
||||
- [Static badge builder](/badges/static-badge), including full documentation of styles and parameters
|
||||
- [Logos](/docs/logos)
|
@ -31,11 +31,11 @@ const config = {
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.cjs'),
|
||||
editUrl: 'https://github.com/badges/shields/',
|
||||
editUrl: 'https://github.com/badges/shields/tree/master/frontend',
|
||||
},
|
||||
blog: {
|
||||
showReadingTime: true,
|
||||
editUrl: 'https://github.com/badges/shields/',
|
||||
editUrl: 'https://github.com/badges/shields/tree/master/frontend',
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
@ -60,7 +60,13 @@ const config = {
|
||||
},
|
||||
items: [
|
||||
{ to: '/badges', label: 'Badges', position: 'left' },
|
||||
{
|
||||
to: '/docs',
|
||||
label: 'Documentation',
|
||||
position: 'left',
|
||||
},
|
||||
{ to: '/community', label: 'Community', position: 'left' },
|
||||
{ to: '/blog', label: 'Blog', position: 'left' },
|
||||
{
|
||||
href: 'https://github.com/badges/shields',
|
||||
label: 'GitHub',
|
||||
|
BIN
frontend/static/img/builder.png
Normal file
BIN
frontend/static/img/builder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Loading…
x
Reference in New Issue
Block a user