RecentPosts

view/widget/recent_posts~ RecentPosts

Recent posts widget JSX component.

Constructor

new RecentPosts()

Source:
Example
<RecentPosts
    title="Widget title"
    posts={[
        {
            url: '/url/to/post',
            title: 'Post title',
            date: '******',
            dateXml: '******',
            thumbnail: '/path/to/thumbnail',
            categories: [{ name: 'Category name', url: '/path/to/category' }]
        }
    ]} />

Members

(static) Cacheable

Cacheable recent posts widget JSX component.

This class is supposed to be used in combination with the locals hexo filter (module:hexo/filter/locals).

Source:
See:
Example
<RecentPosts.Cacheable
    site={{ posts: {...} }}
    helper={{
        url_for: function() {...},
        __: function() {...},
        date_xml: function() {...},
        date: function() {...}
    }}
    limit={5} />