2.0.0 • Published 4 years ago

hexo-assistants v2.0.0

Weekly downloads
1
License
GPL V3
Repository
github
Last release
4 years ago

hexo-analysis

一个 hexo 内容分析插件

调用

获取结果集

const result = timeStatistics(item.content)

// 返回值
{
    wordscount: 666, 
    similar: '品一杯茶的时间' 
}

渲染结果集

const result = renderTimeStatistics(item.content)

// 返回值
// 全文共666个字,阅读大约需要品一杯茶的时间

在pug中调用

if is_detail
    p=renderTimeStatistics(item.content)

效果图

npm.io