OBLETHdocs

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

Editsite.config.js
Takes effectOn the next page load
DefaultObleth Chat, with the Obleth mark

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. 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. 2

    Edit it

    Change the name, text, logo and links. Put your images in branding/assets and refer to them as ./assets/custom/<file>.

  3. 3

    Mount it over the default

    Mount the file at /app/web/site.config.js and 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

SettingDefaultWhat it changes
siteNameObleth ChatThe 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)
siteSubtitleemptyA small line under the name
assistantNameAssistantThe name on the model's replies
descriptionA sentence about ChatThe page's meta description
logo.light, logo.dark, logo.altThe Obleth markThe logo on light and dark themes. One path covers both; two empty paths give a text-only brand
favicon.light, favicon.darkThe Obleth markThe browser tab icon. Empty paths use a neutral chat icon
icons.greeting, icons.assistant, icons.loadingchatBuilt-in icons by name, such as book or bolt. '' hides one
login.*A plain heading and a help lineThe 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
linksDocumentation and OblethLinks in the sign-in page footer, as { label, url }. [] for none
home.*Short prompt textThe new-chat page: eyebrow, title, description, footer
appearance.defaultThemesystemsystem, 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, http or mailto:, 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.assistant and icons.loading instead.