Hugo文档

hugo-theme-relearn — Hugo 文档模板

作者 McShelby

Hugo Relearn 是面向文档站点的 Hugo 主题,源自 Learn 主题的增强分支,提供响应式布局、多语言与丰富短代码。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-02查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

Learn 主题的增强分支,针对其长期问题改进并跟进较新的 Hugo 特性

02

内置丰富短代码:徽章、按钮、提示块、卡片、折叠区、标签页、树形列表、Mermaid、OpenAPI 等

03

支持页内、弹窗和独立搜索页三种搜索形式,以及章节与整站打印

04

多语言覆盖广,含简体与繁体中文,支持 RTL 排版和跨语言搜索

05

可离线使用、无外部依赖,也能通过 file:// 从本地文件系统打开

06

MIT 许可,可免费使用、修改、商用和分发该版本代码

模板详细介绍

Hugo Relearn 是一个为 Hugo 设计的文档主题,定位是替代并改进流行的 Learn 主题。它针对原主题的长期问题做了调整,并引入较新的 Hugo 特性,同时尽量保持与前任主题的兼容性。

在内容呈现上,主题支持 CommonMark 及 GitHub Flavored Markdown 等扩展,并兼容 Obsidian callouts;内置短代码库覆盖徽章、按钮、提示块、卡片、折叠区、图标、文件包含、数学公式、Mermaid 图表、OpenAPI 渲染、页面列表、页面资源展示、站点参数展示、标签页和树形列表。链接与图片也提供下载、目标窗口、灯箱、尺寸、阴影、边框和对齐等控制。

站点功能方面,提供章节与整站打印、页内/弹窗/独立搜索页三种搜索形式、可配置顶栏按钮与侧边栏菜单、隐藏页面、分类法、版本管理和社交媒体集成,并可输出 SBOM。外观上支持品牌图配置、随系统切换明暗模式、多套预置配色、用户可选配色变体、内置样式表生成器和可定制的语法高亮。

多语言支持覆盖阿拉伯语、简体与繁体中文、捷克语、丹麦语、荷兰语、英语、芬兰语、法语、德语、印地语、匈牙利语、印尼语、意大利语、日语、韩语、波斯语、波兰语、葡萄牙语(欧洲与巴西)、罗马尼亚语、俄语、西班牙语、斯瓦希里语、土耳其语、乌克兰语和越南语,并支持从右到左排版与跨语言内容搜索。

部署与使用限制方面,主题可离线使用、无外部依赖,也能通过 file:// 协议从本地文件系统直接打开,并可在严格内容安全策略下提供服务;同时可与 VSCode Front Matter CMS 扩展集成。主题采用 MIT 许可,免费范围限于该版本代码,演示图片、字体、图标等第三方素材需单独核对许可,域名、托管等外部服务可能另行收费。

Hugo文档

适合你的项目吗?

适用场景

  • 为软件或产品编写结构化文档站点
  • 需要多语言、含 RTL 语言的文档项目
  • 在无网络或本地文件系统环境下分发离线文档
  • 文档中需要嵌入 Mermaid 图表、数学公式或 OpenAPI 说明
  • 需要版本化文档、隐藏页面或分类法组织的知识库

适合人群

  • 使用 Hugo 构建文档站点的开发者
  • 需要多语言文档与从右到左语言支持的团队
  • 希望离线分发或本地直接打开文档的使用者
  • 需要在文档中大量使用短代码与 Markdown 扩展的写作者

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    主题基于 Hugo,需先具备可用的 Hugo 环境,具体步骤参见官方 Quickstart 文档

  2. 2

    MIT 许可仅覆盖该版本代码,演示图片、字体、图标等第三方素材需按各自许可核对

  3. 3

    域名、托管、数据库、支付或 AI 等外部服务可能另外收费,不包含在免费范围内

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
Hugo Themes
资料与维护参考分
资料较完整 · 91 / 100
技术栈
Hugo
网站类型
文档
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-10-02
截图检查日期
2026-10-02

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Hugo。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: 0fa57e7e95a44607090631cd40359ac56267982462178ae216286222f7ca5c79

2026-10-02T14:12:03.444Z

来源文件 / 仓库
# Hugo Relearn Theme

A theme for [Hugo](https://gohugo.io/) designed for documentation.

[★ What's new in the latest version ★](https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes)

![Image of the Relearn theme in light and dark mode on phone, tablet and desktop](https://mcshelby.github.io/hugo-theme-relearn/images/hero.png)

## Overview

The Relearn theme is an enhanced fork of the popular [Learn theme](https://github.com/matcornic/hugo-theme-learn). It aims to address long-standing issues and incorporate the latest Hugo features while trying to maintain compatibility with its predecessor.

## Key Features

- **Versatile Usage**
  - [Responsive design for mobile devices](https://mcshelby.github.io/hugo-theme-relearn/configuration/sidebar/width)
  - [Looks nice on paper](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/outputformats) - if it has to
  - [Usable offline with no external dependencies](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/deployment#offline-usage)
  - [Usable from your local file system without a web server](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/deployment#file-system) via `file://` protocol
  - [Servable with a strict Content Security Policy](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/csp)
  - [Integration with the VSCode Front Matter CMS extension](https://mcshelby.github.io/hugo-theme-relearn/introduction/tools#front-matter-cms) for on-premise CMS capabilities

- **Customizable Appearance**
  - [Flexible brand image configuration](https://mcshelby.github.io/hugo-theme-relearn/configuration/branding/logo#changing-the-logo)
  - [Automatic light/dark mode switching based on OS settings](https://mcshelby.github.io/hugo-theme-relearn/configuration/branding/colors#adjust-to-os-settings)
  - [Many pre-defined color variants](https://mcshelby.github.io/hugo-theme-relearn/configuration/branding/colors#shipped-variants)
  - [User-selectable variants](https://mcshelby.github.io/hugo-theme-relearn/configuration/branding/colors#multiple-variants)
  - [Built-in stylesheet generator](https://mcshelby.github.io/hugo-theme-relearn/configuration/branding/generator)
  - [Customizable syntax highlighting](https://mcshelby.github.io/hugo-theme-relearn/configuration/branding/modules/#change-syntax-highlighting)

- **Advanced Functionality**
  - [Chapter and site-wide printing capabilities](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/outputformats#print-support)
  - [Versatile search options: in-page, popup, and dedicated search page](https://mcshelby.github.io/hugo-theme-relearn/configuration/sidebar/search)
  - [Customizable topbar buttons](https://mcshelby.github.io/hugo-theme-relearn/configuration/customization/topbar)
  - [Configurable sidebar menus](https://mcshelby.github.io/hugo-theme-relearn/configuration/sidebar/menus)
  - [Support for hidden pages](https://mcshelby.github.io/hugo-theme-relearn/configuration/content/hidden)
  - [Comprehensive taxonomy support](https://mcshelby.github.io/hugo-theme-relearn/configuration/customization/taxonomy)
  - [Versioning support](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/versioning)
  - [Social media integration](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/meta#social-media-images)
  - [SBOM available](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/sbom)

- **Multilingual Support**
  - [Full right-to-left (RTL) language support](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/multilingual)
  - [Extensive list of supported languages](https://mcshelby.github.io/hugo-theme-relearn/configuration/sitemanagement/multilingual): Arabic, Chinese (Simplified and Traditional), Czech, Danish, Dutch, English, Finnish, French, German, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Persian, Polish, Portuguese (European and Brazilian), Romanian, Russian, Spanish, Swahili, Turkish, Ukrainian, Vietnamese
  - [Multilingual content search capabilities](https://mcshelby.github.io/hugo-theme-relearn/configuration/sidebar/search#mixed-language-support)

- **Enhanced Markdown Features**
  - [CommonMark compliant](https://mcshelby.github.io/hugo-theme-relearn/authoring/markdown)
  - [Support for Markdown extensions like GitHub Flavored Markdown](https://mcshelby.github.io/hugo-theme-relearn/authoring/markdown#standard-and-extensions)
  - [Support for Obsidian callouts](https://mcshelby.github.io/hugo-theme-relearn/authoring/markdown#obsidian-callouts)
  - [Advanced link manipulation like download and target](https://mcshelby.github.io/hugo-theme-relearn/configuration/customization/linkeffects)
  - [Advanced image manipulation like lightbox, sizing, shadows, borders and alignment](https://mcshelby.github.io/hugo-theme-relearn/configuration/customization/imageeffects)

- **Rich Shortcode Library**
  - [Marker badges](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/badge)
  - [Flexible buttons](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/button)
  - [Styled callouts](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/callout)
  - [Card-based content organization](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/cards)
  - [Expandable content areas](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/details)
  - [Font Awesome icon integration](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/icon)
  - [File inclusion capabilities](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/include)
  - [Math support for mathematical and chemical formulae](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/math)
  - [Mermaid diagram integration](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/mermaid)
  - [OpenAPI specification rendering](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/openapi)
  - [Page listings in various layouts](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/pages)
  - [Page bundle resource display](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/resources)
  - [Site configuration parameter display](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/siteparam)
  - [Tab-based content organization](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tabs)
  - [Nicely formatted tree lists](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tree)

## Getting Started

For a comprehensive guide on the theme's capabilities, please refer to the [official documentation](https://mcshelby.github.io/hugo-theme-relearn/introduction/quickstart).

## Updates and Changes

Visit the [What's New](https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes) page for feature highlights or the [detailed changelog](https://mcshelby.github.io/hugo-theme-relearn/introduction/changelog) for a complete list of updates.

## Contributing

We welcome contributions for bug fixes and new features. Please see the [contribution guidelines](https://mcshelby.github.io/hugo-theme-relearn/development/contributing) before getting started.

If you want to go further - running the test suite or regenerating the documentation screenshots - the [Development](https://mcshelby.github.io/hugo-theme-relearn/development) section explains the setup.

## Licensing

The Relearn theme is distributed under the [MIT License](https://github.com/McShelby/hugo-theme-relearn/blob/main/LICENSE).

## Credits

This theme is built on the shoulders of [giants](https://mcshelby.github.io/hugo-theme-relearn/more/credits).
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。