{"id":13610418,"url":"https://github.com/nodejh/hugo-theme-mini","last_synced_at":"2025-05-16T00:06:56.631Z","repository":{"id":37026415,"uuid":"79039278","full_name":"nodejh/hugo-theme-mini","owner":"nodejh","description":"A fast, minimalist and responsive hugo theme for bloggers.","archived":false,"fork":false,"pushed_at":"2024-08-09T20:56:59.000Z","size":2892,"stargazers_count":767,"open_issues_count":52,"forks_count":346,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-08T11:09:05.280Z","etag":null,"topics":["hugo-theme"],"latest_commit_sha":null,"homepage":"http://nodejh.github.io/hugo-theme-mini","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodejh.png","metadata":{"files":{"readme":"README-zh_CN.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-15T14:56:47.000Z","updated_at":"2025-04-03T22:19:44.000Z","dependencies_parsed_at":"2023-02-16T16:46:12.641Z","dependency_job_id":"3a4de603-5a8d-4e73-8e1b-1be419511de9","html_url":"https://github.com/nodejh/hugo-theme-mini","commit_stats":{"total_commits":190,"total_committers":45,"mean_commits":4.222222222222222,"dds":"0.38421052631578945","last_synced_commit":"34417888405cbf54c0d837853813a3049e9de156"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejh%2Fhugo-theme-mini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejh%2Fhugo-theme-mini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejh%2Fhugo-theme-mini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejh%2Fhugo-theme-mini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodejh","download_url":"https://codeload.github.com/nodejh/hugo-theme-mini/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442854,"owners_count":22071878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hugo-theme"],"created_at":"2024-08-01T19:01:44.522Z","updated_at":"2025-05-16T00:06:51.603Z","avatar_url":"https://github.com/nodejh.png","language":"HTML","readme":"# Hugo Theme Mini\n\n[English](https://github.com/nodejh/hugo-theme-mini/tree/master/README.md) | 简体中文\n\n一个简约的响应式 Hugo 主题。\n\n![./images/screenshot.png](https://raw.githubusercontent.com/nodejh/hugo-theme-mini/master/images/screenshot.png)\n\n- [在线 Demo](https://nodejh.github.io/hugo-theme-mini)\n- [示例网站源码](https://github.com/nodejh/hugo-theme-mini/tree/master/exampleSite)\n\n特性：\n\n- 快\n- 简约\n- 响应式\n- 归档页\n- 标签页\n\n\n## 1. 安装\n\n\n### 1.1 使用 Hugo 模块安装 (推荐)\n\n\u003e ⚠️ 如果你使用的是 [二进制包](https://gohugo.io/getting-started/installing/#binary-cross-platform) 安装的 Hugo，那么你需要在电脑上安装 Go 语言。 你可以使用下面的命令检查是否安装 Go：\n\u003e ```\n\u003e $ go version\n\u003e ```\n\u003e Go 语言从 v1.14 开始支持模块. [下载 Go](https://golang.org/dl/)。\n\n1. 在项目目录初始化 hugo 模块系统，如果之前已经执行过则忽略此步骤：\n\n    ```bash\n    $ hugo mod init github.com/\u003cyour_user\u003e/\u003cyour_project\u003e\n    ```\n\n2. 在 `config.yaml` 中添加主题：\n\n    ```yaml\n    theme: \n       - github.com/nodejh/hugo-theme-mini\n    ```\n\n### 1.2 使用 Git Submodule 安装\n\n\n1. 在项目目录中执行下面的命令，将 hugo-theme-mini 作为 submodule：\n\n    ```bash\n    $ git submodule add https://github.com/nodejh/hugo-theme-mini.git themes/mini\n    ```\n\n2. 在 `config.yaml` 中配置主题：\n\n    ```yaml\n   theme: mini\n    ```\n\n更多信息可参考 Hugo 官方文档 [setup guide](//gohugo.io/overview/installing/)。\n\n\n## 2. 开始使用\n\n成功安装主题后，在生成网站前还需要进行少部分的配置。\n\n\n### 2.1 修改配置文件\n\n在 [`exampleSite`](https://github.com/nodejh/hugo-theme-mini/tree/master/exampleSite) 目录中有一个 [`config.yaml`](https://github.com/nodejh/hugo-theme-mini/blob/master/exampleSite/config.yaml) 的配置文件，你可以将其复制到你的项目根目录中，将一些配置项修改为你的配置。这些配置都可以随意修改。\n\n\n\u003e ⚠️ 你需要删除这行配置： `themesDir: ../../` 。\n\n### 2.2 默认语言\n\n你可以通过 `defaultContentLanguage` 配置设置默认语言：\n\n```yaml\ndefaultContentLanguage: en\n```\n\n默认是 `en`。目前支持以下语言：\n\n- `en`: 英语\n- `zh`: 汉语\n- `nl`: 荷兰语\n- `fr`: 法语\n- `es`: 西班牙语\n\n更多关于多语言的信息可以参考：[Multilingual Mode](https://gohugo.io/content-management/multilingual/)。\n\n\n### 2.2 评论功能\n\n要使用评论功能，你需要添加下面的配置：\n\n- 设置 Disqus： `disqusShortname: your-disqus-shorname`\n- 启用评论：\n\n    ```yaml\n    params:\n      enableComments: true\n    ```\n\n### 2.3 Google 分析\n\n要使用 Google 分析功能，你需要添加下面的配置：\n\n- 设置 Google Analytics ID： `googleAnalytics: your-google-analytics-id`\n- 启用 Google Analytics：\n\n    ```yaml\n    params:\n      enableGoogleAnalytics: true\n    ```\n\n### 2.4 Logo 和 favicon\n\n你可以替换网站中的 Log 和 favicon，只需要将你的图片放在网站的 `static/images` 中，并分别命名为 `avatar.png` 和 `favicon.ico`。下面是项目目录示例：\n\n```shell\n- content\n- static\n└── images\n    ├── avatar.png\n    └── favicon.ico\n```\n\n### 2.5 运行网站\n\n为了检查网站运行情况，你可以在本地启动 hugo server：\n\n```bash\n$ hugo server\n```\n\n现在你就可以在浏览器中打开 http://localhost:1313 查看你的网站了。\n\n### 2.6 生产环境\n\n如果要将网站部署到生产环境 (例如支持 Google Analytics)，你需要在 `hugo` 命令前增加环境变量 `HUGO_ENV=production`。例如：\n\n```bash\nHUGO_ENV=production hugo\n```\n\n注意：上面的命令对 Windows 无效。如你使用 Windows，则需要使用下面的命令：\n\n```bash\nset HUGO_ENV=production\nhugo\n```\n\n## 3. 可选配置\n\n### 3.1 Table of Content\n\n如果要启用目录，你可以将 `showToc` 设置为 `true`：\n\n```yaml\nshowToc: true\n```\n\n\n### 3.2 在某页面禁用评论\n\n要在某页面禁用评论，你可以在页面的 Front Matter 中将 `enableComments` 设置为 `false`。\n\n例如：\n\n```yaml\n---\ntitle: Some title\nenableComments: false\n---\n```\n\n### 3.3 自定义 CSS 和 JS\n\n你可以将自定义 CSS 和 JS 放在 `static` 中，也可以使用远程的 CSS 或 JS 文件。\n\n例如：\n\n```yaml\ncustomCSS:\n  - css/custom.css # local css in `static/css/custom.css`\n  - https://example.com/custom.css # remote css\ncustomJS:\n  - js/custom.js # local js in `static/js/custom.js`\n  - https://example.com/custom.js # remote js\n```\n\n\n### 3.4 数学排版\n\n该主题使用了 [KaTeX](https://katex.org/) 来支持数学符号拍版。\n\n- 全局支持数学排版：在项目的配置文件中将 `math` 设置为 `true`\n- 在某页面支持数学拍版：在某页面 Front Matter 中将 `math` 设置为 `true`\n\n### 3.5 在首页隐藏文章摘要 \n\n如果要在首页隐藏文章摘要，你可以将 `hiddenPostSummaryInHomePage` 设置为 `true`，默认是 `false`。\n\n例如：\n\n```yaml\nhiddenPostSummaryInHomePage: true\n```\n\n## License\n\n[MIT](https://github.com/nodejh/hugo-theme-mini/blob/master/LICENSE.md)\n","funding_links":[],"categories":["HTML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejh%2Fhugo-theme-mini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodejh%2Fhugo-theme-mini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejh%2Fhugo-theme-mini/lists"}