HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.2k stars 2.9k forks source link

Search dialogue shows up with "/" even when `search.engine = 0`(disabled) #2053

Closed nobuto-m closed 3 years ago

nobuto-m commented 3 years ago

Describe the bug

Search dialogue shows up with "/" even when site.Params.search.engine = 0(disabled). And the dialogue is unusable since there is no search engine enabled.

Screen Shot 2020-12-27 at 13 25 09

To Reproduce

Steps to reproduce the behavior:

  1. Clone starter-academic git clone https://github.com/wowchemy/starter-academic && cd starter-academic
  2. Change the search.engine configuration as follows

    diff --git a/config/_default/params.toml b/config/_default/params.toml
    index 214e096..004bdf2 100644
    --- a/config/_default/params.toml
    +++ b/config/_default/params.toml
    @@ -226,17 +226,17 @@ plugins_js  = []
    ############################
    ## Search
    ############################
    [search]
    # Search provider:
    #   0: No search engine
    #   1: Academic (built-in)
    #   2: Algolia (https://www.algolia.com)
    -  engine = 1
    +  engine = 0
    
    # Configuration of Algolia search engine.
    # Paste the values from your Algolia dashboard.
    [search.algolia]
     app_id = ""
     api_key = ""
     index_name = ""
     show_logo = false
  3. Run a local server with hugo server
  4. Press "/" in the page

Expected behavior

Nothing happens ("/" will be ignored).

Technical details:

gcushen commented 3 years ago

Fixed by 25e0b0627f0965a221ad9b9e7a9c2ff33c01b657