Hugo Narrow 页首设置支持粘性导航设置、logo 设置、主题切换、暗色模式切换、语言切换。

  1. logo 放置在 ~/static 目录下,留空则使用站点标题首字母,并根据主题配色显示不同颜色。
  2. 语言切换按钮支持点击直接切换或点击显示语言菜单。
params.yaml
 1header:
 2  sticky: true
 3  logo:
 4    image: "/images/logo.svg" # Logo path relative to static folder, leave empty to use site title first letter
 5    link: "/" # Click to home page
 6  # UI Components Control (header controls)
 7  showThemeSwitch: true # Set to false to hide theme style switcher (palette icon)
 8  showDarkModeSwitch: true # Set to false to hide dark mode switcher (sun/moon icon)
 9  showLanguageSwitch: true # Set to false to hide language switcher
10  languageSwitchMode: "dropdown" # Language switch mode: "dropdown" (show panel) or "cycle" (direct cycle)

License

Author: Hugo Narrow

Link: https://hugo-narrow-docs.vercel.app/zh-cn/docs/%E9%A1%B5%E9%A6%96/

License: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

Start searching

↑↓
ESC
⌘K Shortcut