├── .gitignore
├── icons.js
├── vercel.json
├── .github
└── dependabot.yml
├── package.json
├── public
└── index.css
├── utils.js
├── README.md
├── LICENSE
├── home.js
├── main.js
└── api
└── index.ts
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .vercel
3 | public/index.html
4 |
--------------------------------------------------------------------------------
/icons.js:
--------------------------------------------------------------------------------
1 | const simpleIcons = require('simple-icons')
2 | const { titleToFilename } = require('./utils.js')
3 |
4 | // format title to filename
5 | module.exports = Object.keys(simpleIcons).reduce((accu, curr) => {
6 | accu[titleToFilename(curr)] = simpleIcons[curr]
7 | return accu
8 | }, {})
9 |
--------------------------------------------------------------------------------
/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://openapi.vercel.sh/vercel.json",
3 | "rewrites": [
4 | { "source": "/", "destination": "api/index.ts" }
5 | ],
6 | "redirects": [
7 | { "source": "/:name/:color", "destination": "https://cdn.simpleicons.org/:name/:color" }
8 | ],
9 | "functions": {
10 | "api/*.ts": {
11 | "memory": 128
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: npm
4 | directory: "/"
5 | schedule:
6 | interval: daily
7 | open-pull-requests-limit: 10
8 | ignore:
9 | - dependency-name: simple-icons
10 | versions:
11 | - 4.10.0
12 | - 4.11.0
13 | - 4.13.0
14 | - 4.14.0
15 | - 4.15.0
16 | - 4.17.0
17 | - 4.20.0
18 | - 4.9.0
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "build": "node build.mjs",
5 | "start": "micro main.js"
6 | },
7 | "dependencies": {
8 | "micro": "^10.0.1",
9 | "micro-fork": "^3.0",
10 | "my-way": "^2.0.0",
11 | "serve-marked": "^5.0.0",
12 | "simple-icons": "^15.14.0"
13 | },
14 | "engines": {
15 | "node": "22.x"
16 | },
17 | "devDependencies": {
18 | "@types/node": "^24.6.2",
19 | "hyper-marked": "^1.1.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/public/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | max-width: 960px;
3 | }
4 |
5 | .markdown-content h1 + p {
6 | text-align: center;
7 | margin: -43px 0 4rem 0;
8 | line-height: 20px;
9 | height: 20px;
10 | z-index: 1;
11 | }
12 |
13 | #icons { margin: -4rem 2rem 2rem 2rem }
14 | #icons a { width: 80px; height: 120px; margin-right: 1rem; vertical-align: top; display: inline-block; word-wrap: break-word }
15 | #icons a { text-align: center; color: #777; font-size: 12px; font-family: consolas, monospace }
16 | #icons img { width: 32px; height: 32px; display: block; margin: 1em auto }
17 |
--------------------------------------------------------------------------------
/utils.js:
--------------------------------------------------------------------------------
1 | // https://github.com/simple-icons/simple-icons/blob/master/scripts/utils.js
2 |
3 | module.exports = {
4 | /**
5 | * Converts a brand title into a filename (not a full path)
6 | * @param {String} title The title to convert
7 | */
8 | titleToFilename: title => (
9 | title.toLowerCase()
10 | .replace(/^si/, "")
11 | .replace(/\+/g, "plus")
12 | .replace(/^\./, "dot-")
13 | .replace(/\.$/, "-dot")
14 | .replace(/\./g, "-dot-")
15 | .replace(/^&/, "and-")
16 | .replace(/&$/, "-and")
17 | .replace(/&/g, "-and-")
18 | .replace(/[ !’]/g, "")
19 | .replace(/à|á|â|ã|ä/, "a")
20 | .replace(/ç/, "c")
21 | .replace(/è|é|ê|ë/, "e")
22 | .replace(/ì|í|î|ï/, "i")
23 | .replace(/ñ/, "n")
24 | .replace(/ò|ó|ô|õ|ö/, "o")
25 | .replace(/ù|ú|û|ü/, "u")
26 | .replace(/ý|ÿ/, "y")
27 | )
28 | }
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # simpleicons.vercel.app
2 |
3 | [![license-src]][license-href] [![github-src]][github-href]
4 |
5 | Serve colorful [simpleicons](https://simpleicons.org/) on Vercel CDN.
6 |
7 |
8 | > NOTE:
9 | > simple-icons have an official [CDN service](https://github.com/simple-icons/simple-icons?tab=readme-ov-file#cdn-with-colors) now.
10 | > this (simpleicons.vercel.app) is no longer needed, cheers!
11 |
12 |
13 | ## Scheme
14 |
15 | ```
16 | https://simpleicons.vercel.app/:name/:color
17 | ```
18 |
19 | or even shorter
20 |
21 | ```
22 | https://ico.vercel.app/:name/:color
23 | ```
24 |
25 | ## Example
26 |
27 | - [`https://simpleicons.vercel.app/github/aaa`](https://simpleicons.vercel.app/github/aaa)
28 | - [`https://ico.vercel.app/apple/black`](https://ico.vercel.app/apple/black)
29 |
30 | [license-src]: https://badgen.net/badge/license/MIT/blue
31 | [license-href]: https://github.com/simpleicons/simpleicons.vercel.app/blob/master/LICENSE
32 | [github-src]: https://badgen.net/badge/github/amio%2Fsimpleicons.vercel.app?icon&label
33 | [github-href]: https://github.com/simpleicons/simpleicons.vercel.app
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018