Hugo博客

one-post-a-year — Hugo 博客模板

作者 jarv

面向更新频率极低的个人技术博客的 Hugo 轻量主题,去掉摘要、分页和社交图标,只保留文章链接与正文阅读。

看看你的网站会是什么样

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

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

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

全部页面与视图 3

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

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

值得关注的模板亮点

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

01

主页不显示文章摘要,仅列出文章链接,减少维护负担

02

不提供文章分页,适合文章数量极少的博客

03

文章旁很少显示日期,不强调更新频率

04

使用语义化 HTML 标签,主字体为 Atkinson Hyperlegible

05

提供浅色与深色主题,RSS 输出全文

06

可通过 extend-head.html 与 extend-footer.html 注入自定义代码

模板详细介绍

one-post-a-year 是一个 Hugo 主题,作者将其定位为适合大约一年才更新一次的技术博客。它刻意做减法:主页不显示文章摘要,只列链接;不提供文章分页;文章旁很少出现日期,避免突出更新间隔;不使用社交媒体图标。模板使用语义化 HTML 标签,主字体为 Atkinson Hyperlegible,提供浅色与深色两套配色,RSS 输出全文。设计灵感来自 100 bytes of CSS to look great everywhere。主题还支持通过 layouts/partials/extend-head.html 和 layouts/partials/extend-footer.html 向 <head> 和页脚注入自定义代码,README 称其为面向企业场景的准备。代码高亮需要按文档在 hugo.toml 中配置 goldmark 与 markup.highlight,并启用 noClasses = false,主题内置 github 与 solarized-dark 两种代码样式。使用方式上,作者建议将主题 vendor 到自己的项目中直接修改,而不是作为不可变的依赖。

Hugo博客

适合你的项目吗?

适用场景

  • 个人技术博客,每年只发布少量文章
  • 希望博客界面极简、不展示摘要与分页的写作者
  • 需要一个能直接修改主题源码来定制的 Hugo 项目
  • 为文章页添加自定义脚本或页脚内容的场景

适合人群

  • 更新频率极低、文章数量很少的个人技术博客
  • 偏好语义化 HTML 与轻量样式、不需要社交分享按钮的开发者
  • 愿意 vendor 主题并自行修改源码的 Hugo 用户

上手与定制指南

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

  1. 1

    推荐将主题 vendor 到项目中并自行修改,而不是作为只读依赖使用

  2. 2

    快速开始:hugo new site quickstart,初始化 git,下载主题压缩包解压,在 hugo.toml 中设置 theme = 'one-post-a-year',然后运行 hugo server

  3. 3

    代码高亮需在 hugo.toml 中配置 markup.defaultMarkdownHandler = 'goldmark' 与 markup.highlight.noClasses = false,主题内置 github 与 solarized-dark 样式

  4. 4

    如需注入自定义代码,创建 layouts/partials/extend-head.html 或 layouts/partials/extend-footer.html,它们会分别作为 <head> 和 <footer> 的最后一项被包含

  5. 5

    演示图片、字体、图标等第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

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

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

项目核对记录与介绍依据

模板资料

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

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

这个项目需要核对什么

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

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

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

查看当时使用的来源资料

SHA-256: 3c54a9bf1d8a821df4338a14cd38c7f3f1d126a0cc6bea6228698550ce21fb2e

2026-10-02T21:14:28.408Z

来源文件 / 仓库
# One post a year

The one-post-a-year theme is a lightweight theme for [Hugo](https://gohugo.io), built with simplicity and speed in mind.

**[Demo site](https://jarv.github.io/one-post-a-year/)**

Are you starting a tech blog or already have one that has posts like this?

[<img width="600" alt="image" src="https://user-images.githubusercontent.com/749175/258733617-ba1f0276-45fa-4495-97cc-420257cdc4e5.png">](https://jarv.github.io/one-post-a-year/)

If so, then this might be the perfect theme for you!

You might ask, what makes this theme so special?

- Some themes have summaries on the main page, you probably don't have time to write a long post anyway so there is none of that, just the links.
- Like article summaries, most Hugo themes have pagination for articles. With only one post a year it's pretty unlikely that it will ever be necessary so there is no pagination.
- Limited use of dates next to articles because it's probably not something you want to highlight.
- Only uses semantic html tags, so yeah, it's pretty modern.
- Maybe you like social media icons? Nothing like that here, so if you like that stuff this is probably not the theme for you.
- Uses [Atkinson Hyperlegible](https://en.wikipedia.org/wiki/Atkinson_Hyperlegible) as the main font.
- Light and Dark theme.
- RSS feed shows the full article.
- 🆕 Allows you to customize the `<head>` and add a footer to your articles, so it's now ready for enterprise!

Design inspired by [100-bytes-of-css-to-look-great-everywhere](https://dev.to/swyx/100-bytes-of-css-to-look-great-everywhere-19pd)

## Screenshots

<table>
<tr><td>⬜️ Light</td><td><img width="600" alt="image" src="https://github.com/jarv/one-post-a-year/assets/749175/b6fd30ae-b35a-40fe-8621-1a9c52b2a458"></td></tr>
<tr><td>⬛️ Dark</td><td><img width="600" alt="image" src="https://github.com/jarv/one-post-a-year/assets/749175/9016c2c3-778c-4ee5-85d4-98e65775017c"></td></tr>
<tr><td>📱Mobile</td><td><img width="300" alt="image" src="https://github.com/jarv/one-post-a-year/assets/749175/a8fa82b5-0bb4-4274-ac62-e6b0fecad987"></td></tr>
</table>


## Documentation

### Quick start using Hugo

The best way to use this theme (or themes in general) is to vendor it, and hack on it yourself so it suites your needs.

```bash
hugo new site quickstart
cd quickstart
git init
curl -L -o one-post-a-year.zip https://github.com/jarv/one-post-a-year/archive/refs/heads/main.zip
unzip one-post-a-year.zip
echo "theme = 'one-post-a-year'" >> hugo.toml
hugo server
```

### Code Highlighting

This theme includes a light and dark style for code highlighting.
To use it, add the following configuration to your `hugo.toml`.

```
[markup]
  defaultMarkdownHandler = 'goldmark'
  [markup.highlight]
    noClasses = false
    # https://xyproto.github.io/splash/docs/longer/all.html
    # Classes included in this theme for the 'github' and 'solarized-dark' styles
```

### Head and Footer

Allows for inserting additional code directly into the `<head>` and `<footer>` sections of the template.
These can be useful for providing scripts or other logic that is very likely not configurable as part of this very simple theme.

Create either `layouts/partials/extend-head.html` or `layouts/partials/extend-footer.html` and these will automatically be included in your website build.
Both partials inject as the last items in `<head>` and `<footer>`.

---
Why? I use this for my own site [jarv.org](https://jarv.org) which sometimes occasionally has more than one update in a year.
反馈内容错误

看看同类模板

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