Metadata headers

Configure how your app is shown in the Tonhub

Tonhub App appearance can be configured using well-known tags. Configurable properties are: title, description, image and theme color. Also, you can provide default extension to install after successful on-site login.

🚧

Metadata is cached FOREVER

Always invalidate cache using instructions below after updating your application.

App Title

Title is shown everywhere (instead of page's current title). The list of attributes for title by priority (from high to low):

<meta name="ton-x-name" content="TonWhales">
<meta property="og:title" content="TonWhales">
<meta name="twitter:title" content="TonWhales">
<meta property="twitter:title" content="TonWhales">
<title>TonWhales</title>

Logo

<meta name="ton-x-image" content="https://tonwhales.com/mstile-310x310.png">
<meta property="og:logo" content="https://tonwhales.com/mstile-310x310.png">
<meta itemprop="og:logo" content="https://tonwhales.com/mstile-310x310.png">
<img itemprop="og:logo" src="https://tonwhales.com/mstile-310x310.png">
<meta name="twitter:title" content="https://tonwhales.com/mstile-310x310.png">
<meta property="twitter:title" content="https://tonwhales.com/mstile-310x310.png">

...and then tries to extract image from favicon

Theme color

Specifies theme color of the application. Used for customizing backsheet, etc.

<meta name="ton-x-theme-color" content="#fff">
<meta name="theme-color" content="#fff">

Description

Description is not used now, but reserved for further functionality.

<meta name="ton-x-description" content="TonWhales description">
<meta property="og:description" content="TonWhales description">
<meta name="twitter:description" content="TonWhales description">
<meta property="twitter:description" content="TonWhales description">
<meta name="description" content="TonWhales description">
<meta itemprop="description" content="TonWhales description">

Extension

To setup default extension for your app, you need to provide ton-x-extension with the extension config in the content. To generate extension config, look at Tonhub Link Generator

<meta name="ton-x-extension" content="te6cckEBAwEAIgACAcgCAQAIVGVzdAAqaHR0cHM6Ly90b253aGFsZXMuY29t7YNv4A">

Custom tags

Also, there are special tags which can be used for overriding metadata especially for Tonhub:

<meta name="ton-x-name" content="TonWhales">
<meta name="ton-x-color" content="#fff">
<meta name="ton-x-image" content="https://tonwhales.com/mstile-310x310.png">
<meta name="ton-x-description" content="All information about wallets, staking and mining on TONCOIN network.">

Caching

Metadata is cached FOREVER for url, stripping query params. For example:
https://tonwhales.com/club?test == https://tonwhales.com/club
https://tonwhales.com/ != https://tonwhales.com/club

Resetting metadata

To reset metadata for your service, request metadata with refetch=1 parameter:

curl -X GET https://connect.tonhubapi.com/apps/metadata\?url\=https://tonwhales.com\&refetch\=1