fix(search): dont search nameLink, fixed #102
This commit is contained in:
parent
83ae93cae0
commit
507d9e834c
3 changed files with 3 additions and 3 deletions
|
|
@ -21,7 +21,7 @@
|
|||
## Features
|
||||
|
||||
- No statically built html files
|
||||
- Simple and lightweight (~14kB gzipped)
|
||||
- Simple and lightweight (~16kB gzipped)
|
||||
- Smart full-text search plugin
|
||||
- Multiple themes
|
||||
- Useful plugin API
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export function main (config) {
|
|||
'</button>' +
|
||||
'<aside class="sidebar">' +
|
||||
(config.name
|
||||
? `<h1><a href="${config.nameLink}">${config.name}</a></h1>`
|
||||
? `<h1><a data-nosearch href="${config.nameLink}">${config.name}</a></h1>`
|
||||
: '') +
|
||||
'<div class="sidebar-nav"></div>' +
|
||||
'</aside>')
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ function escapeHtml (string) {
|
|||
function getAllPaths () {
|
||||
const paths = []
|
||||
|
||||
helper.dom.findAll('a')
|
||||
helper.dom.findAll('a:not(data-nosearch)')
|
||||
.map(node => {
|
||||
const href = node.href
|
||||
const originHref = node.getAttribute('href')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue