Coder Social home page Coder Social logo

search's Introduction

HB Search Module

Documentation Used By Hugo Requirements License Version Lint

search's People

Contributors

github-actions[bot] avatar razonyang avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

search's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • chore(deps): update dependency eslint to v9.5.0
  • chore(deps): update dependency prettier to v3.3.2
  • chore(deps): update dependency stylelint to v16.6.1
  • chore(deps): update typescript-eslint monorepo to v7.13.1 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update dependency stylelint-scss to v6.3.2

Detected dependencies

github-actions
.github/workflows/lint.yml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-node v4
.github/workflows/release-please.yml
  • google-github-actions/release-please-action v4
gomod
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
npm
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

  • Check this box to trigger a request for Renovate to run again on this repository

[Feature Request] Add Google Custom Search Engine as fallback

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.

Gramatical example of Korean words

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:

Just use Google Custom Search Engine

Instead of using Fuse.js, just let Google to handle search.

1

There won't be any options under search bar because they aren't needed with Google Custom Search Engine.

Add button for enabling Google Custom Search Engine

2

(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 ?

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
image
is display and some simple data for search

Thank you.

File to import not found or unreadable: ../../../search/scss/index

See this:

@import "../../../search/scss/index";

@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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.