Hugo博客

hugo-theme-plano — Hugo 博客模板

作者 vstrofago

Plano 是一款 Hugo 博客主题,采用暖纸色背景、钴蓝网格与单一强调色,并提供需手动开启的深色变体。

看看你的网站会是什么样

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

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

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

全部页面与视图 3

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

采集于 2026-09-30查看来源

值得关注的模板亮点

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

01

单一钴蓝强调色,链接、活动数字、关键词高亮和标题下划线统一使用同一种颜色

02

暖调米白背景叠加淡网格,浅色为默认且唯一的常规模式

03

深色变体完全隔离在 assets/css/vf-dark.css,只能手动开启并记录在 localStorage

04

无构建步骤,使用原生 HTML、CSS 和 JavaScript,不依赖 Node 或 PostCSS

05

Sanchez 与 IBM Plex Mono 字体自托管,不请求第三方字体服务

06

界面字符串放在 i18n/,自带英语和西班牙语,可自行添加语言

模板详细介绍

Plano 是一款面向 Hugo 的博客主题,视觉上模拟绘图桌的质感:背景为暖调米白并带有淡网格,链接、活动数字、关键词高亮和标题下划线统一使用同一种钴蓝色,除此之外不引入其他颜色。主题遵循一套有明确取舍的设计系统,浅色是默认且唯一的常规模式;深色变体完全隔离在 assets/css/vf-dark.css 中,通过 html[data-theme="dark"] 生效,只能由读者点击页头按钮开启,并记录在该设备的 localStorage 中,主题内没有任何 prefers-color-scheme 规则。

主题不依赖构建步骤,使用原生 HTML、CSS 和 JavaScript,CSS 源码约 48 KB(压缩后 33 KB),JavaScript 约 7 KB(压缩后 3 KB)。字体 Sanchez(衬线)与 IBM Plex Mono(标签、元信息、代码)以 SIL OFL 1.1 许可自托管在 static/fonts/ 下,不请求第三方字体服务。主题要求 Hugo extended 0.146.0 或更高版本,因为用到了 _partials、_markup 目录约定和 pagerSize,不需要 Node 或 PostCSS。

配置方面,主题支持多语言(界面字符串放在 i18n/,自带英语和西班牙语)、基于 Hugo 生成的 JSON 索引的浏览器端搜索、标签与分类分类法、RSS 输出,以及阅读时间、字数、面包屑、文章导航、目录等可开关的显示项。搜索页需要手动添加 content/<lang>/search.md 并设置 layout: "search"。README 说明主题在 Chromium 中做过对比度、资源缺失、JavaScript 错误、390 px 响应式、减少动画偏好和字体实际加载的检查;模板注释使用西班牙语,但用户可见字符串均通过 i18n 管理。示例站点 exampleSite/ 是一个可独立构建的双语站点,其日期为固定值以保证演示稳定。

Hugo博客

适合你的项目吗?

适用场景

  • 搭建以文字为主的个人博客,希望页面呈现纸张与网格的编辑感
  • 需要多语言博客,并希望界面字符串与内容语言分开管理
  • 希望提供深色阅读模式,但要求默认浅色且不自动跟随系统切换
  • 在 Hugo 站点中加入基于 JSON 索引的浏览器端搜索页
  • 不希望引入 Node、打包器或运行时框架的静态站点项目

适合人群

  • 使用 Hugo extended 0.146.0 或更高版本的用户
  • 偏好单一强调色、克制配色方案的博客作者
  • 需要英语和西班牙语界面字符串,或愿意自行补充 i18n 文件的用户
  • 接受手动开启深色模式、并希望该选择按设备记忆的读者
  • 希望主题不依赖 npm、bundler 或运行时框架的开发者

上手与定制指南

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

  1. 1

    需要 Hugo extended 0.146.0 或更高版本,主题使用 _partials、_markup 目录约定和 pagerSize,旧版本无法运行

  2. 2

    可通过 git submodule、Hugo module 或直接复制仓库到 themes/plano/ 安装,然后在配置中声明 theme = 'plano'

  3. 3

    搜索页需要手动创建 content/<lang>/search.md 并设置 layout: "search",同时在 outputs 中为 home 添加 JSON

  4. 4

    markup.highlight 下必须设置 noClasses = false,否则 Chroma 会内联样式导致语法主题失效

  5. 5

    深色变体默认不开启,可通过 disableThemeToggle = true 移除切换按钮并始终使用浅色

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • 使用限制:必须使用 Hugo extended 0.146.0 或更高版本;因主题依赖 _partials、_markup 目录约定与 pagerSize,旧版 Hugo 无法运行。
  • 使用限制:搜索页依赖 home 输出中的 JSON;若未在 outputs 中为 home 添加 JSON,搜索页将没有可读取的索引。
  • 使用限制:必须在 markup.highlight 下设置 noClasses = false,否则 Chroma 会内联样式,语法高亮主题将失效。
  • 使用限制:搜索页需手动创建 content/<lang>/search.md 并设置 layout: "search",主题不会自动生成该页面。
  • 使用限制:主题捆绑的 Sanchez 与 IBM Plex Mono 字体采用 SIL OFL 1.1,与主题的 MIT 许可不同;替换字体时需自行确认新字体的许可。
  • 使用限制:模板注释为西班牙语;用户可见字符串通过 i18n/ 管理,但模板源码注释不提供其他语言版本。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

Hugo **extended** 0.146.0 or newer (built and verified with 0.166.0). The theme uses `_partials` and `_markup` directory conventions and `pagerSize`, so older Hugo versions will not work.

README 原文

`home = ['HTML', 'RSS', 'JSON']`. Without the JSON output the search page has no index to read.

README 原文

`noClasses = false` under `markup.highlight`. Otherwise Chroma inlines styles and the syntax theme stops applying.

README 原文

For the search page, add `content/<lang>/search.md`

README 原文

Sanchez (serif) and IBM Plex Mono (labels, meta, code), both SIL Open Font License 1.1, both bundled unmodified in `static/fonts/`

README 原文

Comments in the templates are written in Spanish, the author's language.

README 原文
https://github.com/vstrofago/hugo-theme-plano/blob/main/LICENSEhttps://github.com/vstrofago/hugo-theme-plano/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

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

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

这个项目需要核对什么

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

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

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

查看当时使用的来源资料

SHA-256: 167b0c6bcdb941b7fe531a7da31c46a0858eebbed2472f9827b7d1d14d2ba5d5

2026-10-01T13:49:18.391Z

来源文件 / 仓库
# Plano

A Hugo theme with a drawing-table feel: warm paper, a cobalt grid, one single
accent color, and an optional dark variant that never turns itself on.

![Build example site](https://github.com/vstrofago/hugo-theme-plano/actions/workflows/build.yaml/badge.svg)

[Live demo](https://vstrofago.github.io/blog/) · [Example site](exampleSite/) ·
[MIT](LICENSE) theme, SIL OFL fonts

![Home page, light](screenshots/01-home-light.png)

## Why this theme is shaped like this

Plano comes from a small design system with opinions, and it keeps them:

- **One accent color.** Links, active numbers, keyword highlights, the rule
  under a heading: all the same cobalt. Nothing else gets to be colored.
- **Paper, not white.** The background is a warm off-white with a faint grid.
  The grid carries structure and never competes with the text.
- **Light is canonical.** The design system declares a single light mode. The
  dark variant exists because readers ask for it, is fully isolated, and is
  opt-in only.
- **No build step.** Plain HTML, CSS and JavaScript. No npm, no bundler, no
  framework at runtime. The CSS is ~48 KB in source (33 KB minified) and the
  JavaScript ~7 KB (3 KB minified).
- **Fonts are self-hosted.** No requests to third-party font services.

## Requirements

Hugo **extended** 0.146.0 or newer (built and verified with 0.166.0). The theme
uses `_partials` and `_markup` directory conventions and `pagerSize`, so older
Hugo versions will not work. Nothing else is needed: no Node, no PostCSS.

## Install

As a submodule:

```bash
git submodule add https://github.com/vstrofago/hugo-theme-plano themes/plano
```

As a Hugo module (in `hugo.toml`):

```toml
[[module.imports]]
  path = 'github.com/vstrofago/hugo-theme-plano'
```

Or just copy the repository into `themes/plano/`.

Then declare it:

```toml
theme = 'plano'
```

## Configure

The [example site](exampleSite/) is the reference configuration; the pieces the
theme actually reads are these.

```toml
baseURL = 'https://example.org/'
title = 'Your site'
theme = 'plano'
defaultContentLanguage = 'en'
defaultContentLanguageInSubdir = false

[pagination]
  pagerSize = 10

[languages]
  [languages.en]
    label = 'English'
    locale = 'en-US'
    contentDir = 'content/en'
    weight = 1
    [languages.en.params]
      description = 'Shown in the footer and in the meta description.'
      DateFormat = 'January 2, 2006'
      [languages.en.params.homeInfoParams]
        Title = 'Hero title'
        Content = 'Hero lead, written in **markdown**.'
    [[languages.en.menu.main]]
      name = 'Posts'
      url = 'posts/'
      weight = 10

[params]
  author = 'Your name'
  mainSections = ['posts']
  homeLimit = 5
  ShowReadingTime = true
  ShowWordCount = true
  ShowLastMod = false
  ShowBreadCrumbs = true
  ShowPostNavLinks = true
  ShowRssButtonInSectionTermList = true
  ShowToc = true
  TocOpen = false
  disableThemeToggle = false
  tagline = ''                     # optional: small label next to the wordmark
  socialIcons = [{ name = 'GitHub', url = 'https://github.com/you' }]

[markup]
  [markup.highlight]
    noClasses = false              # required: the syntax theme is class-based
  [markup.tableOfContents]
    startLevel = 2
    endLevel = 3

[taxonomies]
  tag = 'tags'
  category = 'categories'

[outputs]
  home = ['HTML', 'RSS', 'JSON']   # JSON feeds the search index
```

Two things are easy to miss and both are required:

1. `home = ['HTML', 'RSS', 'JSON']`. Without the JSON output the search page has
   no index to read.
2. `noClasses = false` under `markup.highlight`. Otherwise Chroma inlines styles
   and the syntax theme stops applying.

For the search page, add `content/<lang>/search.md`:

```yaml
---
title: "Search"
layout: "search"
translationKey: "search"
---
```

## The dark variant

Rules, in order of importance:

- **It never turns itself on.** There is no `prefers-color-scheme` anywhere in
  the theme. Without JavaScript, or without a previous explicit choice, the site
  is light.
- **It cannot leak into the light theme.** Every dark rule lives in
  `assets/css/vf-dark.css` behind `html[data-theme="dark"]`. It redefines surface
  colors and a handful of component fills; the light theme and its tokens are
  untouched.
- **Your choice is remembered** in `localStorage` on that device, and pressing the
  toggle again returns you to light.

Set `disableThemeToggle = true` to remove the button and stay light forever.

Both modes are audited for contrast on every route (see below), so the dark
variant is not an afterthought that only looks right in a screenshot.

## Fonts

Sanchez (serif) and IBM Plex Mono (labels, meta, code), both SIL Open Font
License 1.1, both bundled unmodified in `static/fonts/` with the license text in
[`static/fonts/OFL.txt`](static/fonts/OFL.txt). To use your own, replace the files
and update `assets/css/tokens/fonts.css`; the only other place fonts are named is
the token file for typography.

## Example site and local development

`exampleSite/` is a complete bilingual site that builds on its own. The theme is
this repository, so a build needs the repo visible as `themes/plano`. The CI does
exactly this, and you can reproduce it locally:

```bash
site=$(mktemp -d)/site
mkdir -p "${site}/themes"
rsync -a --exclude .git --exclude exampleSite ./ "${site}/themes/plano/"
rsync -a ./exampleSite/ "${site}/"
hugo --source "${site}" --gc --minify --panicOnWarning --baseURL http://localhost:1314/
```

To look at it in a browser, serve the built site:

```bash
python3 -m http.server 1314 --directory "${site}/public"
```

## What was verified, and how

The theme is checked in a real browser (Chromium), not by eye:

- **Contrast**, measured on every route in both modes: each text element is
  compared against its effective background, with the threshold set by its size
  (4.5:1 normal, 3:1 large). Zero failures. This is what caught the code plate's
  punctuation at 2.88:1 and the breadcrumb's current page at 3.43:1.
- **No missing resources and no JavaScript errors** across the routes.
- **Responsive** down to 390 px with no horizontal overflow and nothing hidden.
- **Reduced motion**: with `prefers-reduced-motion: reduce` nothing is armed and
  every element sits in its final state.
- **Fonts actually load**: verified by measuring rendered text width, not by
  trusting the `@font-face` declaration.

The screenshots in this README come from the example site.

## Notes and deliberate deviations

- Comments in the templates are written in Spanish, the author's language. The
  theme itself is language-neutral: all user-facing strings live in `i18n/`
  (`en.toml`, `es.toml`, add your own).
- The source design system imported fonts from Google Fonts; this theme
  self-hosts them instead.
- The `exampleSite/` dates are fixed so the demo is stable; they are not real
  entries.

## License

Theme: [MIT](LICENSE). Fonts: SIL OFL 1.1 (see
[`static/fonts/OFL.txt`](static/fonts/OFL.txt)).

---

## En español

**Plano** es un tema de Hugo con aire de mesa de dibujo: papel cálido, rejilla
cobalto, un único color de acento y una variante oscura opcional que nunca se
enciende sola.

- **Requisitos**: Hugo *extended* 0.146.0 o superior. Sin Node, sin build step.
- **Instalación**: como submódulo (`themes/plano`), como módulo de Hugo, o
  copiando el repositorio; después, `theme = 'plano'`.
- **Claro y oscuro**: el claro es el estado canónico. El oscuro vive aislado en
  `assets/css/vf-dark.css` detrás de `html[data-theme="dark"]`, se activa con el
  botón de la cabecera y se recuerda en el dispositivo. No hay
  `prefers-color-scheme` en ninguna parte.
- **Bilingüe**: los idiomas se declaran en `hugo.toml`; las cadenas de la interfaz
  están en `i18n/` y el tema trae inglés y español.
- **Búsqueda**: en el navegador, sobre un índice JSON que genera Hugo. Necesita
  `home = ['HTML', 'RSS', 'JSON']` en `outputs`.
- **Configuración de referencia**: el [`exampleSite/`](exampleSite/) completo.
- **Licencias**: MIT para el tema; las fuentes (Sanchez e IBM Plex Mono) son SIL
  OFL 1.1 y se distribuyen sin modificar con su licencia en
  [`static/fonts/OFL.txt`](static/fonts/OFL.txt).
反馈内容错误

看看同类模板

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