Branding
Set the site name, logo, sign-in text and footer links by editing one public file, without rebuilding Chat.
3 min readUpdated for Chat 0.5.2Edit on GitHub
Chat reads its branding from site.config.js, which it serves next to the web app at /site.config.js. Every visitor can read the file, so never put a secret in it.
Change the branding
- 1
Copy the file
Start from the file the image ships, so you keep every setting and its comment:
mkdir -p branding/assets docker run --rm --entrypoint cat <chat-image> /app/web/site.config.js > branding/site.config.js - 2
Edit it
Change the name, text, logo and links. Put your images in
branding/assetsand refer to them as./assets/custom/<file>. - 3
Mount it over the default
Mount the file at
/app/web/site.config.jsand the images at/app/web/assets/custom, as shown below. Later edits need only a page reload.
kubectl -n obleth-chat create configmap chat-branding \
--from-file=site.config.js=branding/site.config.js \
--from-file=branding/assets/
# In the Deployment's pod spec
volumes:
- name: branding
configMap: { name: chat-branding }
containers:
- name: chat
volumeMounts:
- { name: branding, mountPath: /app/web/site.config.js, subPath: site.config.js, readOnly: true }
- { name: branding, mountPath: /app/web/assets/custom, readOnly: true }
A subPath mount doesn't pick up ConfigMap changes, so restart the Deployment after updating it.
What you can set
| Setting | Default | What it changes |
|---|---|---|
siteName | Obleth Chat | The name beside the logo, the browser title and the sign-in footer. A \n stacks a long name beside the logo, such as 'Research\nComputing'; elsewhere it reads as one line (v0.4.1 and later) |
siteSubtitle | empty | A small line under the name |
assistantName | Assistant | The name on the model's replies |
description | A sentence about Chat | The page's meta description |
logo.light, logo.dark, logo.alt | The Obleth mark | The logo on light and dark themes. One path covers both; two empty paths give a text-only brand |
favicon.light, favicon.dark | The Obleth mark | The browser tab icon. Empty paths use a neutral chat icon |
icons.greeting, icons.assistant, icons.loading | chat | Built-in icons by name, such as book or bolt. '' hides one |
login.* | A plain heading and a help line | The sign-in page: title (blank reads "Sign in to" and the site name), description (a line under the heading), ssoLabel and ssoHint (the single sign-on button and a line under it, shown only when OIDC is set up), help and helpLink (the line under the form, and an optional { label, url } link at its end). Releases up to v0.5.1 used eyebrow, footer, welcomeTitle and welcomeDescription; later releases ignore them |
links | Documentation and Obleth | Links in the sign-in page footer, as { label, url }. [] for none |
home.* | Short prompt text | The new-chat page: eyebrow, title, description, footer |
appearance.defaultTheme | system | system, light or dark. A person's own choice in the header or Settings wins |
Text is plain text: \n makes a line break, and '' hides an optional line.
window.OblethChatConfig = {
siteName: 'Research Computing Chat',
logo: { light: './assets/custom/logo-dark-ink.svg', dark: './assets/custom/logo-white.svg', alt: '' },
login: {
title: 'Sign in to Chat',
help: 'No account yet?',
helpLink: { label: 'Request one', url: 'https://rc.example.edu/accounts' },
},
links: [
{ label: 'Help', url: 'https://rc.example.edu/help' },
{ label: 'Acceptable use', url: 'https://rc.example.edu/aup' },
],
};
Settings you leave out keep their defaults.
Rules for images and links
- Images must be served by Chat itself, such as
./assets/custom/logo.svg. The site's Content Security Policy blocks images from other hosts, so absolute URLs are ignored. - Footer links may point anywhere over
https,httpormailto:, or to a path on the same site. Links to other sites open in a new tab. Chat shows at most 8. - A logo is drawn up to 32 pixels high and 72 wide. An SVG with a transparent background suits both themes; for one image on both, choose a mark that reads on dark and light.
- The logo also stands in for the assistant's icon beside each reply and on the loading screen, fitted into a 24-pixel square. A wide wordmark is tiny there; a square or nearly square mark reads best. With no logo, Chat uses
icons.assistantandicons.loadinginstead.
