Hugo 主题
Archie
Archie 是一个简洁的 Hugo 主题,具有 markdown 风格的 UI。
- 作者: Athul Cyriac Ajay
- GitHub Star: 1074
- 更新时间: 2025-01-07
- 许可证: MIT
- 标签: 博客 极简 个人 响应式
Archie - Hugo 主题
Archie 是一个简洁的 Hugo 主题,具有 markdown 风格的 UI。
Fork 自 Ezhil 主题
演示
查看托管在 GitHub Pages 上的演示 :smile: 。你可以在此仓库的 site
分支中找到源代码
功能
- Google Analytics 脚本
- 标注
- 标签
- 自动暗黑模式(基于系统主题)
- 暗/亮模式切换
- tl:dr; 前言
- 目录
- CSS 文件的缓存清除
- Disqus 评论
安装
在你的 Hugo 网站目录中,创建一个名为 theme 的新文件夹并克隆此仓库
$ mkdir themes
$ cd themes
$ git clone https://github.com/athul/archie.git
编辑 config.toml
文件,设置 theme="archie"
。更多信息请阅读 Hugo 的官方设置指南。
如果你在使用 Google Analytics 时遇到任何问题,请将 Hugo 更新到 v0.125.0 或更高版本,并确保你使用的是主题的最新版本。
撰写文章
在 *content/posts* 文件夹中创建一个新的 .md
文件
---
title: Title of the post
description:
date:
tldr: (optional)
draft: true/false (optional)
tags: [tag names] (optional)
toc: true/false (optional)
---
鸣谢
Fork 自 Ezhil 主题,并根据 MIT 许可证授权。设计灵感来自 blog.jse.li
配置选项
自定义 CSS
可以通过 customcss
配置参数包含自定义 CSS 文件。
注意:CSS 文件应放置在 assets
目录下,例如 assets/css/first.css
。
[params]
customcss = ["css/first.css", "css/second.css"]
标注
有五种不同类型的标注,包括此主题的原始标注和一个自定义标注。这些标注与亮色和暗色主题模式兼容。
原始
此设置是为了确保与先前的标注向后兼容。
{{< callout emoji="⚡️" text="Original callout." >}}
警告
{{< callout type="alert" text="This is an alert callout." >}}
自定义
这包括设置你自己的标注表情符号、标题和 CSS 样式元素的功能。
{{< callout type="custom" emoji="⚡️" title="Custom callout" text="This is custom text for a custom callout." style="background-color: transparent; border: 3px solid #d340e0;" >}}
提示
{{< callout type="tip" text="This is a tip callout." >}}
警告
{{< callout type="warning" text="This is a warning callout." >}}
演示站点的配置
baseURL = "https://athul.github.io/archie/"
languageCode = "en-us"
title = "Archie"
theme="archie"
copyright = "© Athul"
# Code Highlight
pygmentsstyle = "monokai"
pygmentscodefences = true
pygmentscodefencesguesssyntax = true
disqusShortname = "yourDisqusShortname"
paginate=3 # articles per page
[params]
mode="auto" # color-mode → light,dark,toggle or auto
useCDN=false # don't use CDNs for fonts and icons, instead serve them locally.
subtitle = "Minimal and Clean [blog theme for Hugo](https://github.com/athul/archie)"
mathjax = true # enable MathJax support
katex = true # enable KaTeX support
# Social Tags
[[params.social]]
name = "GitHub"
icon = "github"
url = "https://github.com/athul/archie"
[[params.social]]
name = "Twitter"
icon = "twitter"
url = "https://twitter.com/athulcajay/"
[[params.social]]
name = "GitLab"
icon = "gitlab"
url = "https://gitlab.com/athul/"
# Main menu Items
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "All posts"
url = "/posts"
weight = 2
[[menu.main]]
name = "About"
url = "/about"
weight = 3
[[menu.main]]
name = "Tags"
url = "/tags"
weight = 4
如果你喜欢我的作品,请考虑在 BuymeACoffee 上支持我