Hexo 博客下 Next 主题的侧边栏无法显示

按照 next 文档上设置侧边栏,在本地环境下运行后不管在主页还是文章下都无法显示侧边栏(就是文章目录和站点概览那两栏),即使点击了侧边栏按钮。
下面是我在 next 主题下的 _config.yml 文件内容:

# ---------------------------------------------------------------
# Sidebar Settings
# ---------------------------------------------------------------

# Social Links.
# Usage: `Key: permalink || icon`
# Key is the link label showing to end users.
# Value before `||` delimeter is the target permalink.
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, globe icon will be loaded.
social:
  #GitHub: https://github.com/yourname || github
  #E-Mail: mailto:yourname@gmail.com || envelope
  #Google: https://plus.google.com/yourname || google
  #Twitter: https://twitter.com/yourname || twitter
  #FB Page: https://www.facebook.com/yourname || facebook
  #VK Group: https://vk.com/yourname || vk
  #StackOverflow: https://stackoverflow.com/yourname || stack-overflow
  #YouTube: https://youtube.com/yourname || youtube
  #Instagram: https://instagram.com/yourname || instagram
  #Skype: skype:yourname?call|chat || skype

social_icons:
  enable: true
  icons_only: false
  transition: false
  #Icon Mappings
  #Twitter: twitter

# Blog rolls
#links_title: Links
#links_layout: block
#links_layout: inline
#links:
  #Title: http://example.com/
  

# Sidebar Avatar
# in theme directory(source/images): /images/avatar.gif
# in site  directory(source/uploads): /uploads/avatar.gif
avatar: /images/avatar.jpg

# Table Of Contents in the Sidebar
toc:
  enable: true

  # Automatically add list number to toc.
  number: true

  # If true, all words will placed on next lines if header width longer then sidebar width.
  wrap: false

# Creative Commons 4.0 International License.
# http://creativecommons.org/
# Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero
#creative_commons: by-nc-sa
#creative_commons:

sidebar:
  # Sidebar Position, available value: left | right
  position: left
  #position: right

  # Sidebar Display, available value:
  #  - post    expand on posts automatically. Default.
  #  - always  expand for all pages automatically
  #  - hide    expand only when click on the sidebar toggle icon.
  #  - remove  Totally remove sidebar including sidebar toggle.
  display: post
  #display: always
  #display: hide
  #display: remove

  # Sidebar offset from top menubar in pixels.
  offset: 12
  offset_float: 12

  # Back to top in sidebar
  b2t: false

  # Scroll percent label in b2t button
  scrollpercent: false
  
  # Enable sidebar on narrow view
  onmobile: false

Next 主题版本是 5.1.2, Hexo版本 3.3.9, 浏览器是 chrome。

阅读 9k
4 个回答

把 next 主题文件夹更新了一下就可以显示了....

去看一下Next主题的官方文档,里面有答案。

新手上路,请多包涵

遇到了同样的问题,解决了没?

新手上路,请多包涵

遇到了类似的问题(position: left 不生效),使用 hexo clean 后就可以了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进