同时提供浅色与深色两种显示模式
labarum — Hugo 博客模板
作者 mandaris
Labarum 是一个基于 HTML 与 schema 标签的 Hugo/Micro.blog 主题,提供明暗两种模式,并支持 Goldmark 基础语法、目录短代码与数学公式等排版能力。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
支持 Goldmark 基础语法,包括引用、列表与任务列表
内置两种目录短代码:居中浮动与右侧浮动
包含数学公式 partials,通过 math 参数切换启用
使用 schema 标签与 HTML 结构组织页面
模板详细介绍
Labarum 是作者为学习 Micro.blog 与 Hugo 而编写的博客主题,代码以 HTML 与 schema 标签为基础。它同时提供浅色与深色模式,并覆盖 Goldmark 的常见 Markdown 语法,包括引用、列表、任务列表等。主题内置两种目录短代码:`{{< toc >}}` 让目录浮动在文章中央,`{{< floating-toc >}}` 则让目录浮动在文章右侧。发布记录显示它持续调整可访问性、schema 标记与 CSS 细节,并加入对数学公式(通过 Hugo 的数学支持与 MathJax 演示页面)的 partials,默认关闭,需切换 `math` 参数启用。
该主题面向 Micro.blog 与 Hugo 站点,仓库采用 MIT 许可,允许免费使用、修改、商用与分发,但演示图片、字体、图标等第三方素材需单独核对许可。README 未提供完整的安装步骤或依赖版本清单,使用前建议先阅读仓库中的配置与示例文件。
适合你的项目吗?
适用场景
- 在 Micro.blog 上搭建个人博客
- 使用 Hugo 构建以文章阅读为主的站点
- 需要明暗模式切换的博客主题
- 希望在文章中使用目录导航与基础 Markdown 排版
适合人群
- 使用 Hugo 或 Micro.blog 的博客作者
- 偏好简洁 HTML 与 schema 标签结构的开发者
- 需要浅色/深色模式与目录功能的站点
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
仓库采用 MIT 许可,分发代码时需保留版权声明与许可声明
- 2
演示图片、字体、图标等第三方素材需按各自许可单独核对
- 3
数学公式支持默认关闭,需切换 math 参数启用
- 4
README 未提供完整安装步骤,建议参考仓库配置与示例文件
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 数学公式支持默认关闭,需在配置中切换 math 参数启用,且依赖 Hugo 的数学功能与 MathJax 外部演示资源。
- 部分可选插件代码来自 Tiny Theme,使用相关插件功能时需注意其来源与相应许可条件。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
This has been defaulted to false until v0.122 is available.
README 原文
https://github.com/mandaris/labarum/blob/main/LICENSEhttps://github.com/mandaris/labarum/blob/main/README.mdCopied code from [Tiny Theme]() to implement optional plugins for micro.blog
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 82 / 100
- 技术栈
- Hugo · HTML
- 网站类型
- 博客
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2024-11-20
- 截图检查日期
- 2026-10-02
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Hugo。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 17a274fccd0990593c1b3c451539ae6e3373038904e6682bbf1ecc8a613e0238
2026-10-02T17:17:33.334Z
来源文件 / 仓库# Labarum
A Hugo/Micro.blog theme based on html and schema tags.

I created this to learn more about Micro.blog and hugo and I'm pretty proud of it. It handles all of the basic Goldmark syntax and has both a light and dark mode.
## Labarum has a light and dark mode.


## Basic syntax

## Block quotes

## Lists

## Task lists

## Table of Contents
The first one is activated by adding <code>{{< toc >}}</code> to your text and will float in the center of the article.

The second one is activated by adding <code>{{< floating-toc >}}</code> to your text and will float in the right of the article.

## Release notes
### v1.3.31
* Add `margin-right` and `margin-left` for `bluesky-embed` css class
### v1.3.30
* Change `font-style` for `<address>`
### v1.3.29
* Add `interpolate-size: allow-keywords` to root of css
* Adjust `line-height`
### v1.3.28
* Attempt to fix broken css
### v1.3.27
* Fixed typo in `aria-label` for `plugin-container`
* Changed author information from `<aside>` to `<address>`
* Add `<nav>` to `<header>` to prepare for grid layout
* Add `overflow-y: auto` to `<blockquote>` to allow for expansion of element when floating images are larger than expected
* Add value for `accent-color` in css
* Remove `--max-width-value` from css as not used
### v1.3.26
* Move table of contents from `<section>` to `<nav>` because I was thinking it through
* Adjust the colors for `<figure>`, `[popover]`, `.style-box-alt`, and `.aside-info`
* Adjust colors and size for `audio`
* Adjust spacing in `rsvp.html`
* Add more text to `aria-label` for table of contents
### v1.3.25
* Move author image from containing `<div>`
* Move hidden author information from `<div>` to `<address>` tag (unseen by users.)
* Move table of contents from `<aside>` to `<section>`
* Add `aria-label` to table of contents
* Adjust padding and margin to `blockquote`
* Add `border-radius` to `.microblog_reply_textarea > textarea`
* Change behavior of `a:hover` to no longer have a background come up but change the color of the link itself
### v1.3.24
* Change the `--accent-opposite-alt` to improve contrast
* Add `text-wrap: balance` to `h#` tags
* Remove margin between first paragraph and top of the `article div`
* Adjust margins and paddings for `TableOfContents`
* Adjust sizes for `FloatRight` and `FloatLeft`
* Modify padding for code examples
* Add `@view-transition` and `text-wrap`. This only shows up in blink based browsers
### v1.3.23
* Make some space adjustments for `<details>`
* Minor changes to `[popover]`
### v1.3.22
* Invert background colors for dark mode
* Increase `margin-top` for table of contents header
### v1.3.21
* Add stylying for responding textbox on blogs. See [this post by Manton](https://www.manton.org/2024/05/18/i-took-the.html) for more information.
* Add very basic styling for popovers so that they match the style for the rest of the theme.
* Make adjustments to color contrast for dark mode
* Move text styling within `<figure>` to `<figcation>`
### v1.3.20
* Add css class `no-box-shadow` for instances where it's not needed
* Make `::selection` have the same color as `mark`
### v1.3.19
* Change the `!important` to only be on `lite-youtube` class in css
### v1.3.18
* Created `category.terms.html` and `categories-with-count.html` to better handle navigation of the archive and autogenerated category pages
* Style changes to `list.html` and removed text
* Added information to `theme.toml` to include some of the capability that the theme is able to do
### v1.3.17
* Minor changes to aria-labels for footers
* Change certain `<div>` to `<aside>` and `<footer>` to denote respective roles
### v1.3.16
* Add id to plugin-container
* Change `line-height` for `h#` tags
### v1.3.15
* Change `overflow-x` on `<detail>` element
* Make `<section>` use the same padding as article
* Make `<a>` tags in the custom footer inline-block to that they flow easier in design
* Add id to custom footer
* Move the catagory paragraphs in the archive page into a `<div>`
* Correct date format on archive page
### v1.3.14
* Fix styling issues with archive page
### v1.3.13
* Create archive page to use `<section>` and classes
* Change class of link in article footer to use `u-uid`
* Remove `article-hidden` for links that have `role="presentation"`
* Rearrange classes applied to `<article>`
* Add `u-url` to `article` title anchor
### v1.3.12
* Remove duplicate description from `site-head.html`
* Change `keywords` to use `tags` instead of categories. The reason I did this is that although Micro.blog does not support `tags`, it could in the future and `categories` are already denoted for the `article:section`
* Added `twitter:domain` for those who are still using the tag to parse things
* Remove styling for `p-name`, this class is for meta-data
* Adjusted `max-width` for `img, video, iframe,lite-youtube`. The plugin that I use is loaded later and causes the `lite-youtube` object to not render expectedly
### v1.3.11
* Add `headline` to notes that contain a generic title
### v1.3.10
* Changes to `samp`. This is catch the edge case where `samp` is being used as a block element
* Format `code` in list item. Might have to refactor if there are other edge cases
### v1.3.09
* Typo on `dt-published`
### v1.3.08
* Adjust fonts
* Make the `a.no-decoration` more accessible by changing contrast
* Add `FloatLeft` css class
* Add `::selection` background color to match up with theme
* Add scrolling for debug output
* Change the `title` and `aria-label` for microposts to include the date and time. In the local copy of Hugo, an empty string `title` is automatically added.
* Add styling to the top of the `list.html` to make it stand out.
* Change the date format for the `time` used for published times.
* Rearrange reply order options to be Micro.blog, Mastodon, and then email
* Add `articleSection` to list of classes for category tags on a post
### v1.3.07
* Add partials for [upcoming mathematics support in Hugo](https://gohugo.io/content-management/mathematics/ "Mathematics in Markdown"). This can be seen when you toggle the `math` parameter. This has been defaulted to false until v0.122 is available. Demos can be seen on the [MathJax demo page](https://www.mathjax.org/#demo).
* Use [Modern Font Stacks](https://modernfontstacks.com). [Matt Langford](https://www.mattlangford.com/) discussed this on the [Tiny Theme page on fonts](https://tiny.micro.blog/2024/03/01/changing-fonts.html). I really liked his implementation and you should check it out!
### v1.3.06
* Change the `li` marker color to `--text-alt` in order to match header color
* Change padding of `body` to utilize more space on smaller screens
* add `text-shadow` to `a.no-decoration`
* Change logic for the debug flags
* Create stub for theme `example` folder
* Temporarily add the `rsvp` shortcode to theme to remove extra whitespace when post is cross posted to mastodon
### v1.3.05
* Improve `h*` tags by changing color to `--text-alt`
* Make changes to `text-decoration` inspired by [12 Modern CSS One-Line Upgrades](https://moderncss.dev/12-modern-css-one-line-upgrades/#text-underline-offset) to various elements
* Turn on debugging by default temporarily
* Modify cursor on `<abbr>`
* Adjust `line-height` to make `sub`, `sup`, and `ruby` elements less obtrusive to the flow of the document
* Add `accent-color` to `root` of CSS
### v1.3.04
* Move the 404 page to proper location according to [documentation](https://help.micro.blog/t/custom-404-page/73)
### v1.3.03
* Use `article.html` in `list.html`
### v1.3.02
* Add masonry to `photos-grid-container`
### v1.3.01
* Add style to `<abbr>`
* Remove some whitespace around optional components
### v1.3.00
* Add styling to .archive_category class from baseline
* Adjust `text-decoration-color` and `text-decoration-thickness` on `ins`, `del`, and `s` elements
* Add `a.no-decoration` to style and pagination
* Hide empty optional and custom `<div>`s if they are empty
* Toggle the generation of debug output based on a parameter
### v1.2.20
* Shrink and float avatars
* Make white space in css more consistent
* Fix for warning about isset
### v1.2.19
* Center contents of custom footer
* Add padding to top and bottom of optional boxes
### v1.2.18
* Revert change of mastodon logic
### v1.2.17
* Copied code from [Tiny Theme]() to implement optional plugins for micro.blog
* Changed tabs to spaces in project
* Added additional schema tags to headers and urls
* Added styling for custom footer
### v1.2.16
* Update link to mastodon account
### v1.2.15
* Move link to outside of headers
* Add `u-url` class and `rel="me"` to link found in author footer
* Make changes for mastodon account conditional of username
* Make categories conditional
### v1.2.14
* Revert to use `{{ .Site.Author.avatar }}` for OpenGraph images
### v1.2.13
* Adjust margin on avatar images
* Add mastodon username and server to head
### v1.2.12
* Adjust margins on for smaller viewports
* Adjust lines and colors for `<del>`, `<ins>`, and `<s>`
* Remove normalize.css
* Move styling from elements to classes
* Configure Goldmark parser to not wrap `<img>` in `<p>` tags
* Part one of CSS rewrite
### v1.2.11
* Add styling to comments
### v1.2.10
* Add css for `<hr>`
* Change default image for `og:image` and `itemprop="image"`
* Move meta `wordCount` to article
* Become displeased with how version numbers work
### v1.2.9
* Remove bottom border in photos page
* Adjust spacing in books page
* Make author information more responsive
* Remove border radius on blockquote
### v1.2.8
* Accessibility improvements using [WAVE](https://wave.webaim.org "WAVE Web Accessibility Evaluation Tools") to test
* Validation improvements to schema tags. Using https://validator.w3.org/nu/ as the tool to validate
### v1.2.7
* Enable [Mermaid.js](https://mermaid.js.org/)
* Set the version in the `config.json` file
* Reformat README.md
* Remove `role="contentinfo"` from author `<aside>`
* Minor accessibility and validation changes
### v1.2.5
* Adjustments to the README
* Turn on Profile information at the bottom of the site
### v1.2.0
* Rewritten Code blocks
* Wrote about the change on [my blog](https://mandarismoore.com/2023/09/22/labarum-code-blocks.html). Incorporated a significant amount of work to understand the Hugo system
* Table of Contents short codes
* Moved to Micro.blog standard head
### v1.1.4
* Create parameters `showDebugInfo` & `showAuthorInfo`
* Defaults to `false`
* The information is rendered into the page but is hidden using `display:none` in inline style.
* Can be toggled on or off in plugin settings.
* Adjustments in different aspect of the theme to prepare to moving to [CUBE CSS](https://cube.fyi)
* Modifications to tables
* Using `min-width` and `margin: auto` for centering the table to the container and making use of the space that is available.
* Modifications to code blocks
* An update in rendering added more styling.
* Removed increased padding on links as part of a:hover
* Added styling for `<s>`
* This was previously overlooked as it was thought to be the same as `<del>`
* Update the README.md
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

hugo-PaperMod
PaperMod 是 Hugo 生态里知名度较高的主题之一,定位很明确:给博客和轻量作品集站点提供一套干净、响应式的阅读界面。
Hugo · 作品集

LoveIt
❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
Hugo · 博客

hugo-coder
A minimalist blog theme for hugo.
Hugo · 博客

blowfish
Personal Website & Blog Theme for Hugo
Hugo · 博客

hugo-paper
🪺 A simple, clean, customizable Hugo theme
Hugo · 博客

hextra
Hextra 是一个 Hugo 主题,定位在文档站与博客之间:既提供侧边栏导航、目录、面包屑、分页这类文档站结构,也能承载博客内容。
Hugo · 文档
