Skip to content

Instantly share code, notes, and snippets.

@fishchev
Last active April 19, 2024 22:15
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fishchev/ed2ca15d5ffd9594d41498a4bf9ba12e to your computer and use it in GitHub Desktop.
Save fishchev/ed2ca15d5ffd9594d41498a4bf9ba12e to your computer and use it in GitHub Desktop.
Minimal page structure/sample to trigger Telegram's IV template for https://teletype.in.
<!DOCTYPE html>
<head>
<title>$title</title>
<meta property="og:site_name" content="$site_name">
<meta property="og:description" content="$description">
<meta property="article:author" content="$author">
<!-- $image_url / link preview image is set using og:image property -->
<!-- <meta property="og:image" content="http://example.com/img.jpeg"> -->
<meta property="telegram:channel" content="@cor_bee">
<!-- site_verification property must be present, but @content could be empty (no IVBot-side verification for now?) -->
<meta property="tg:site_verification" content="g7j8/rPFXfhyrq5q0QQV7EsYWv4=">
<!-- published_time property must be present, but you could leave @content empty if $published_date isn't needed -->
<meta property="article:published_time" content="2020-02-03T23:10:04.654Z">
</head>
<body>
<div class="article">
<article class="article__content">
<!-- your "IV-compliant" article body goes here -->
<!-- for general idea of what "IV-compliant" HTML is refer to IV documentation:
https://instantview.telegram.org/docs#supported-types (HTML counterpart and allowed children columns) -->
<!-- if first element in article is figure it's going to be set/used as article $cover-->
<!-- <figure>
<img src="http://example.com/img.jpeg" />
<figcaption>figcaption</figcaption>
</figure> -->
<p>Hello world</p>
</article>
</div>
</body>
</html>
@fishchev
Copy link
Author

fishchev commented Apr 3, 2020

Using this you could have complete control of IV generation, except for $subtitle, $kicker, $author_url and $document_url properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment