mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
fix: 修復上次更新導致部分用户本地搜索文章鏈接跳轉錯誤的bugs close #375
This commit is contained in:
parent
a2551d2d29
commit
d5670e25e4
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hexo-theme-butterfly",
|
||||
"version": "3.2.0-b6",
|
||||
"version": "3.2.0-b7",
|
||||
"description": "A Simple and Card UI Design theme for Hexo",
|
||||
"main": "package.json",
|
||||
"scripts": {
|
||||
|
||||
@ -62,7 +62,7 @@ $(function () {
|
||||
return {
|
||||
title: $('title', this).text(),
|
||||
content: $('content', this).text(),
|
||||
url: GLOBAL_CONFIG.root + $('url', this).text()
|
||||
url: $('url', this).text()
|
||||
}
|
||||
}).get()
|
||||
|
||||
@ -85,7 +85,7 @@ $(function () {
|
||||
}
|
||||
let dataTitle = data.title.trim().toLowerCase()
|
||||
const dataContent = data.content.trim().replace(/<[^>]+>/g, '').toLowerCase()
|
||||
const dataUrl = data.url
|
||||
const dataUrl = data.url.startsWith('/') ? data.url : GLOBAL_CONFIG.root + data.url
|
||||
let indexTitle = -1
|
||||
let indexContent = -1
|
||||
let firstOccur = -1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user