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)
点击展开查看更多

版权声明

作者: Hugo Narrow

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

许可证: 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.

开始搜索

输入关键词搜索文章内容

↑↓
ESC
⌘K 快捷键