Update readme.md

added description to yandex:related
This commit is contained in:
Ivan Pilyugin (aka Archer)
2018-05-29 10:03:41 +03:00
committed by GitHub
parent 365abd5592
commit c47a6d3d0f

View File

@@ -44,7 +44,8 @@ feed.item(itemOptions);
* `author` _optional_ **string** Автор статьи, размещенной на странице. * `author` _optional_ **string** Автор статьи, размещенной на странице.
* `date` **string** Время публикации контента на сайте источника. * `date` **string** Время публикации контента на сайте источника.
* `content` **string** Содержимое страницы * `content` **string** Содержимое страницы
* `related` _optional_ **object** Содержимое страницы
*Будет добавлено в новых версиях turbo:source, turbo:topic, yandex:related, menu, pubDate как алиас date* *Будет добавлено в новых версиях turbo:source, turbo:topic, yandex:related, menu, pubDate как алиас date*
##### Получение XML ##### Получение XML
@@ -73,7 +74,16 @@ feed.item({
url: 'http://example.com/article4?this&that', url: 'http://example.com/article4?this&that',
author: 'LightAir', author: 'LightAir',
date: 'May 27, 2012', date: 'May 27, 2012',
content: '<p>hello</p>' content: '<p>hello</p>',
related: [{
link: 'http://example.com/related/post1',
image_url: 'http://example.com/i/img1.jpg',
text: 'related link text 1'
}, {
link: 'http://example.com/related/post2',
image_url: 'http://example.com/i/img2.jpg',
text: 'related link text 2'
}]
}); });
// cache the xml to send to clients // cache the xml to send to clients