mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
fix(search): dont search nameLink, fixed #102
This commit is contained in:
parent
83ae93cae0
commit
507d9e834c
@ -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…
x
Reference in New Issue
Block a user