Alex's World
hexo一些插件的使用说明 hexo一些插件的使用说明
hexo-pdf 描述: hexo中插入PD 安装npm install --save hexo-pdf 本地PDF引用方式1 : 把相应pdf文件存到source文件夹下,引用格式为: {% pdf /引用文档名字.pdf
2022-12-04
dex_content = data_content.indexOf(keyword); if (index_title < 0 && index_content < 0) { isMatch = false; } else { if (index_content < 0) { index_content = 0; } if (i === 0) { first_occur = index_content; } } }); } // show search results if (isMatch) { str += "
  • " + data_title + ""; var content = data.content.trim().replace(/<[^>]+>/g, ""); if (first_occur >= 0) { // cut out 100 characters var start = first_occur - 20; var end = first_occur + 80; if (start < 0) { start = 0; } if (start === 0) { end = 100; } if (end > content.length) { end = content.length; } var match_content = content.substr(start, end); // highlight all keywords keywords.forEach(function (keyword) { var regS = new RegExp(keyword, "gi"); match_content = match_content.replace(regS, "" + keyword + ""); }); str += "

    " + match_content + "...

    " } str += "
  • "; } }); str += ""; $resultContent.innerHTML = str; }); } }); }; searchFunc('/search.xml', 'searchInput', 'searchResult'); });