Skip to content

Commit

Permalink
fix(search): dont search nameLink, fixed #102
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Feb 24, 2017
1 parent 83ae93c commit 507d9e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/render/tpl.js
Expand Up @@ -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>')
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/search/search.js
Expand Up @@ -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')
Expand Down

0 comments on commit 507d9e8

Please sign in to comment.