ArticleLicensing

view/misc/article_licensing~ ArticleLicensing

A JSX component that renders article licensing block.

Constructor

new ArticleLicensing()

Source:
Example
<ArticleLicensing
    title="article title"
    link="full article URL"
    author="author name"
    authorTitle="Author"
    createdAt={date}
    createdTitle="Posted on"
    updatedAt={date}
    updatedTitle="Updated on"
    licenses={{
        'Creative Commons': {
            url: 'https://creativecommons.org/'
        },
        'Attribution 4.0 International': {
            icon: ['fab fa-creative-commons-by', 'fab fa-creative-commons-nc'],
            url: 'https://creativecommons.org/licenses/by-nc/4.0/'
        },
    }}
    licensedTitle="Licensed under" />

Members

(static) Cacheable

A JSX component that renders article licensing block.

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

Source:
See:
Example
<ArticleLicensing.Cacheable
    config={{
        article: {
            licenses: {
                'Creative Commons': 'https://creativecommons.org/',
                'Attribution 4.0 International': {
                    icon: 'fab fa-creative-commons-by',
                    url: 'https://creativecommons.org/licenses/by/4.0/'
                },
            }
        }
    }}
    page={page}
    helper={{
        __: function() {...},
        url_for: function() {...}
    }} />