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

菜单栏search不显示 #146

Open
ZhipengYang0605 opened this issue Jul 12, 2020 · 1 comment
Open

菜单栏search不显示 #146

ZhipengYang0605 opened this issue Jul 12, 2020 · 1 comment

Comments

@ZhipengYang0605
Copy link

包下载好后放到自己的仓库,运行后菜单栏不显示serach,后更改_config.yml文件也无效,请问如何修改才可以在菜单栏显示search功能,以下是我尝试修改_config.yml文件的内容(以下注释的虚线部分是我手动添加的),PS:language选的是中文简体。经过以下两处修改后可以正常显示search图标,但是当点击search图标时,跳转到了404界面,请问该如何处理???

menu:
  home: /
  #categories: /categories/
  #about: /about/
  archives: /archives/
  tags: /tags/
  # --------------默认这里是没有search的,我自己添加了search---------------------------------
  search: /search.xml
  #sitemap: /sitemap.xml
  #commonweal: /404.html

menu_icons:
  enable: true
  #KeyMapsToMenuItemKey: NameOfTheIconFromFontAwesome
  home: home
  about: user
  categories: th
  schedule: calendar
  tags: tags
  archives: archive
  sitemap: sitemap
  commonweal: heartbeat
  # ------------------------------------添加显示search的图标--------------------------------------------
  search: search
@fdoliv
Copy link

fdoliv commented Mar 3, 2021

Hi @ZhipengYang0605 !

To enable the search function, you should (considering the original _config.yml file):

  1. Enable local search:
    Change
# Local search
local_search:
  enable: false

to

# Local search
local_search:
  enable: true

No one additional configuration is required.

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

No branches or pull requests

2 participants