mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-02-20 07:55:47 +03:00
Update CDN URLs in the README (#2930)
* Update CDN URLs in the README The new URLs link to the latest within the v2 major release, whereas the old URLs would always link to the @latest release. As a result, someone using those URLs might end up with a broken website when a major version is released and icons are removed. * Update Unpkg URL to link to the simple-icons page * Add note regarding @latest
This commit is contained in:
parent
706e2586fd
commit
87b7fb4d5d
12
README.md
12
README.md
@ -15,20 +15,22 @@ Icons can be downloaded as SVGs directly from [our website](https://simpleicons.
|
||||
|
||||
### CDN Usage
|
||||
|
||||
Icons can be served from a CDN such as [JSDelivr](https://www.jsdelivr.com/package/npm/simple-icons) or [Unpkg](https://unpkg.com). Simply use the `simple-icons` npm package and specify a version in the URL like the following:
|
||||
Icons can be served from a CDN such as [JSDelivr](https://www.jsdelivr.com/package/npm/simple-icons) or [Unpkg](https://unpkg.com/browse/simple-icons/). Simply use the `simple-icons` npm package and specify a version in the URL like the following:
|
||||
|
||||
```html
|
||||
<img height="32" width="32" src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/[ICON NAME].svg" />
|
||||
<img height="32" width="32" src="https://unpkg.com/simple-icons@latest/icons/[ICON NAME].svg" />
|
||||
<img height="32" width="32" src="https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/[ICON NAME].svg" />
|
||||
<img height="32" width="32" src="https://unpkg.com/simple-icons@v2/icons/[ICON NAME].svg" />
|
||||
```
|
||||
|
||||
Where `[ICON NAME]` is replaced by the icon name, for example:
|
||||
|
||||
```html
|
||||
<img height="32" width="32" src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/simpleicons.svg" />
|
||||
<img height="32" width="32" src="https://unpkg.com/simple-icons@latest/icons/simpleicons.svg" />
|
||||
<img height="32" width="32" src="https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/simpleicons.svg" />
|
||||
<img height="32" width="32" src="https://unpkg.com/simple-icons@v2/icons/simpleicons.svg" />
|
||||
```
|
||||
|
||||
These examples use the latest major version. This means you won't receive any updates following the next major release. You can use `@latest` instead to receive updates indefinitely. However, this will result in a `404` error if the icon is removed.
|
||||
|
||||
### Node Usage
|
||||
|
||||
The icons are also available through our npm package. To install, simply run:
|
||||
|
Loading…
Reference in New Issue
Block a user