Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support an option to ignore pages from search index #39

Merged
merged 4 commits into from
Apr 13, 2022

Conversation

ppwwyyxx
Copy link
Contributor

Hi,

I'd like to ignore "pages" from search index and only search for "posts". This change is working for me.

Please let me know if this feature makes sense, and what else is needed to implement it. Thanks!

@ppoffice
Copy link
Owner

@@ -12,7 +12,7 @@
"scripts": {
"test": "jest lib",
"test-cov": "jest lib --coverage",
"lint": "eslint {src,asset,fixture}/**/*.{js,jsx}",
"lint": "eslint '{src,asset,fixture}/**/*.{js,jsx}'",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is needed so lint can run inside zsh

@ppwwyyxx
Copy link
Contributor Author

Thanks, I fixed the lint and npm run lint; npm run test passed locally.

@ppoffice
Copy link
Owner

Could you please also add unit tests for this new option?
https://github.com/ppoffice/hexo-component-inferno/blob/master/src/hexo/generator/insight.test.js

@ppwwyyxx
Copy link
Contributor Author

Sure. A unittest is added.

@ppoffice ppoffice merged commit b8cbd40 into ppoffice:master Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants