emlog全站搜索

网络

emlog全站搜索

2024-11-09/0/ 编辑


默认只搜索标题,如果想搜索全部包括标题和内容,那么
找到这个文件,修改如下:

https://img.cyoy.cn/hexo/emlog/https://img.cyoy.cn/hexo/emlog/

将

$sqlSegment = "and title like '%$keyword%'";

修改改成

$sqlSegment = "and (title like '%$keyword%' or content like '%$keyword%')";