hbstack / search Goto Github PK
View Code? Open in Web Editor NEWHB Search Module
Home Page: https://hbstack.dev/
License: MIT License
HB Search Module
Home Page: https://hbstack.dev/
License: MIT License
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are pending. To force PRs open, click the checkbox below.
@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
).github/workflows/lint.yml
actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
actions/setup-node v4
.github/workflows/release-please.yml
google-github-actions/release-please-action v4
go.mod
go 1.19
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000
github.com/hbstack/hb v0.12.3
github.com/hugomods/hugopress v0.5.0
github.com/hugomods/icons v0.6.4
github.com/hugomods/search v0.14.0
github.com/krisk/Fuse v7.0.0+incompatible
github.com/twbs/icons v1.11.3
package.json
stylelint-scss ^6.0.0
@typescript-eslint/eslint-plugin ^7.0.0
@typescript-eslint/parser ^7.0.0
eslint ^9.0.0
prettier ^3.0.0
prettier-plugin-go-template ^0.0.15
stylelint ^16.0.0
stylelint-config-standard-scss ^13.0.0
typescript ^5.0.0
This module uses Fuse.js for its search capability.
But when I tested it in my localhost environment, it doesn't work well with Korean.
Korean words can be consist of postposition or other words. So a word '밥' which means 'meal' can be '밥을' or '밥도' etc. depending on its location or role on phrase.
I think Fuse.js can't handle it properly.
I tried to search '가면 무녀' which is actually in content of post, and content of generated search.json
. Fuse.js couldn't find any result.
Of course, I enabled index_content
to make Fuse.js to search content of my posts.
# param.yml
search:
stall_threshold: 300
min_match_char_length: 2
case_sensitive: false
expand_results_meta: true
index_content: true
# shortcut_search: ["/"]
But company like Google should have capability of handling Korean words properly, or they won't have any market share because of poor search engine efficiency.
So I want to integrate Google Custom Search Engine to search modal, not as separate page like mysite.com/search
.
I think integrating Google Custom Search Engine can be done in two ways:
Instead of using Fuse.js, just let Google to handle search.
There won't be any options under search bar because they aren't needed with Google Custom Search Engine.
(I re-used icon because I'm lazy)
This will put 'Search with Google' button at the right side of search option panel. If user clicks it, it will render Google Custom Search Engine result in below.
How to build and run this mod locally ? trying with npm ci and hugo server doesn't work.
also, how does this search compare to https://github.com/hugomods/search ?
let's say we would like to use one of the search as mod, which one you recommend ?
can you give an simple example where
is display and some simple data for search
Thank you.
See this:
@import "../../../search/scss/index";
It imports non-existing file?
I have this trying to build:
ERROR TOCSS: failed to transform "/hb/modules/search/index.scss" (text/x-scss): "/Users/fefendi/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hbstack/[email protected]/assets/hb/modules/search/index.scss:2:1": File to import not found or unreadable: /Users/fefendi/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugomods/[email protected]/assets/search/scss/index.scss.
Maybe I need command to install "hugomods/search"? So strange, it started to happen after few upgrades
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.