Skip to content

Instantly share code, notes, and snippets.

@nlopin
Created May 28, 2017 11:10
Show Gist options
  • Save nlopin/27c1a1a9ad9d50bcf5fe0d0e53b7f99c to your computer and use it in GitHub Desktop.
Save nlopin/27c1a1a9ad9d50bcf5fe0d0e53b7f99c to your computer and use it in GitHub Desktop.
Эгея Instant View для Telegram
?path: /all/.+
title: //h1[@class="e2-note-title"]
body: //article
author: //span[@id="e2-blog-author"]
author_url: <ссылка на сайт>
published_date: //div[@class="e2-note-date"]
channel: <ссылка на канал если есть>
cover: //article//img[1]
@nlopin
Copy link
Author

nlopin commented May 28, 2017

Что это?

Код для красивого отображения публикаций в Телеграме из блога на базе Эгеи (http://blogengine.ru/)

Как опубликовать

С публикацией пока все сложно.

  1. Нужно зайти в систему
  2. Зайти в My templates
  3. Добавить свой сайт в шаблоны
  4. Вставить и заполнить этот gist
  5. Теперь можно шарить шаблон своим читателям

Выдержка из текста (https://instantview.telegram.org/#publishing-templates):

Note that if you send the resulting t.me/iv?url=...&rhash=... link to other Telegram users, they will see an Instant View page built using your template (the rhash parameter in the link determines which template is used to create the page). This means that, as a website owner, you can create a template for your page and publish t.me/iv?url=... links with the corresponding rhash to your Telegram channel — and your subscribers will be able to view your articles in the Instant View format right away.

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