Simpleyyt / jekyll-theme-next

Elegant theme for Jekyll.
795 stars 753 forks source link

菜单栏search不显示 #146

Open ZhipengYang0605 opened 4 years ago

ZhipengYang0605 commented 4 years ago

包下载好后放到自己的仓库,运行后菜单栏不显示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 commented 3 years ago

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.