Skip to content
项目

关于

🌱 一个名为 Dream 的 Hugo 主题。

其他项目

这些数字如何统计

实测星标增长

24小时
+1
7天
0
15天
+2
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

🌱 hugo-theme-dream

GitHub Release GitHub License

[!IMPORTANT] This branch contains Dream v3.

If you use v2.x, see the v2 branch and its documentation.

About Dream

Dream is a Hugo theme. I build it for my blog.

Dream displays posts in a masonry layout and has a flippable About page. It supports light and dark mode out of the box.

Dream screenshot

For a single-column layout focused on reading and writing, use Zen mode.

Zen mode screenshot

Get started

Use Hugo Extended. Follow the Quick Start to install Dream in your site and create your first post.

Set theme = "dream" in your site's hugo.toml when you install the theme under themes/dream. Use hugo.example.toml as the configuration reference. The documentation covers About pages, search, comments, customization, and other options.

Dream includes prebuilt CSS and JavaScript. You need Node.js and pnpm only to rebuild theme assets or work on the documentation site.

Examples

Develop locally

Use Node.js 24 and pnpm. The root theme package and the docs/ package have separate dependencies and lockfiles. Reuse your existing shared dependency caches.

Build theme assets

Run these commands from the repository root:

pnpm install --frozen-lockfile
pnpm run build

Edit src/input.css for styles and src/js/ for browser behavior. The build writes tracked output to assets/css/output.css and assets/js/. Include the generated files with source changes. Template changes that affect Tailwind or daisyUI classes also need a CSS rebuild.

To rebuild only one asset type, use pnpm run css or pnpm run js. To rebuild assets as you edit, run:

pnpm run watch

Preview the theme

Use a separate Hugo site with content and configure it to load this checkout as its theme. This repository is not a standalone blog, and the documentation site does not preview Hugo templates. See the Quick Start for site setup.

From the Hugo site directory, run:

hugo server -D

The -D flag includes draft posts. Keep the asset watcher running when you edit theme styles or JavaScript.

Run the documentation site

Use the pnpm version declared in docs/package.json. From the repository root, run:

cd docs
pnpm install --frozen-lockfile
pnpm run dev

Edit user guides in docs/content/. Run pnpm run build from docs/ to build the static documentation site in docs/out/.

Publish your site

See Hosting & Deployment.

License

Hugo Theme Dream is licensed under the MIT License.

Author: g1eny0ung.

探索相关项目

加载中…