Skip to content

Commit 5fc9ff2

Browse files
aslilacmatifali
andauthored
docs: mention /icons in the template documentation (#10230)
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
1 parent 88605b9 commit 5fc9ff2

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

docs/images/icons-gallery.png

2.83 MB
Loading

docs/manifest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@
207207
"description": "Audit commands in workspaces with exectrace",
208208
"path": "./templates/process-logging.md",
209209
"state": "enterprise"
210+
},
211+
{
212+
"title": "Icons",
213+
"description": "Coder includes icons for popular cloud providers and programming languages for you to use",
214+
"path": "./templates/icons.md"
210215
}
211216
]
212217
},

docs/templates/icons.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Icons
2+
3+
---
4+
5+
Coder uses icons in several places, including ones that can be configured
6+
throughout the app, or specified in your Terraform. They're specified by a URL,
7+
which can be to an image hosted on a CDN of your own, or one of the icons that
8+
come bundled with your Coder deployment.
9+
10+
- **Template Icons**:
11+
12+
- Make templates and workspaces visually recognizable with a relevant or
13+
memorable icon
14+
15+
- [**Terraform**](https://registry.terraform.io/providers/coder/coder/latest/docs):
16+
17+
- [`coder_app`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app#icon)
18+
- [`coder_parameter`](https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/parameter#icon)
19+
and
20+
[`option`](https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/parameter#nested-schema-for-option)
21+
blocks
22+
- [`coder_script`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script#icon)
23+
24+
These can all be configured to use an icon by setting the `icon` field.
25+
26+
```terraform
27+
data "coder_parameter" "my_parameter" {
28+
icon = "/icon/coder.svg"
29+
30+
option {
31+
icon = "/emojis/1f3f3-fe0f-200d-26a7-fe0f.png"
32+
}
33+
}
34+
```
35+
36+
- [**Authentication Providers**](https://coder.com/docs/v2/latest/admin/external-auth):
37+
38+
- Use icons for external authentication providers to make them recognizable
39+
40+
## Bundled icons
41+
42+
Coder is distributed with a bundle of icons for popular cloud providers and
43+
programming languages. You can see all of the icons (or suggest new ones) in our
44+
repository on
45+
[GitHub](https://github.com/coder/coder/tree/main/site/static/icon).
46+
47+
You can also view the entire list, with search and previews, by navigating to
48+
/icons on your Coder deployment. E.g. [https://coder.example.com/icons](#). This
49+
can be particularly useful in airgapped deployments.
50+
51+
![The icon gallery](../images/icons-gallery.png)
52+
53+
## External icons
54+
55+
You can use any image served over HTTPS as an icon, by specifying the full URL
56+
of the image. We recommend that you use a CDN that you control, but it can be
57+
served from any source that you trust.
58+
59+
You can also embed an image by using data: URLs.
60+
61+
- Only the https: and data: protocols are supported in icon URLs (not http:)
62+
63+
- Be careful when using images hosted by someone else; they might disappear or
64+
change!
65+
66+
- Be careful when using data: URLs. They can get rather large, and can
67+
negatively impact loading times for pages and queries they appear in. Only use
68+
them for very small icons that compress well.

0 commit comments

Comments
 (0)