WalinePageview

view/plugin/waline_pageview~ WalinePageview

Waline page view counter plugin JSX component.

It counts a view of the current page, and shows the page views in the elements with the waline-pageview-count class, of the page in their data-path attribute, or of the current page without it. It counts and shows them again after switching pages with PJAX.

Constructor

new WalinePageview()

Source:
See:
Example
<WalinePageview
    serverURL="https://path/to/waline/server"
    jsUrl="/path/to/pageview.js" />

Members

(static) Cacheable

Cacheable Waline page view counter plugin JSX component.

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

Source:
See:
Example
<WalinePageview.Cacheable
    head={false}
    plugin={{ server_url: 'https://path/to/waline/server' }}
    config={{ comment: { type: 'waline', server_url: 'https://path/to/waline/server' } }}
    helper={{ cdn: function() {...} }} />