Hugo 主题
HugoTeX
一个看起来像 LaTeX 文档的 Hugo 主题。
在线演示:https://hugotex.vercel.app/
此主题深受 latex-css 的启发。
快速开始
git clone https://github.com/kaisugi/HugoTeX
cd HugoTeX/exampleSite
hugo server -t ../..
# open https://127.0.0.1:1313/
需要 Hugo (>= 0.128.0)。
配置设置
示例
baseURL = "https://hugotex.vercel.app/"
title = "HugoTeX"
languageCode = "en"
DefaultContentLanguage = "en"
enableInlineShortcodes = true
footnoteReturnLinkContents = "^"
[pagination]
pagerSize = 3
[Params.Author]
name = "Kaito Sugimoto"
abstract = """
I'm a software engineer and a coffee enthusiast in Japan.
My primary interest lies in the area of natural language processing.
"""
[taxonomies]
category = "categories"
tag = "tags"
series = "series"
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
[markup.highlight]
style = "paraiso-dark" # syntax highlighting style
[Params]
darkmode = true # set true if you want to enforce dark mode
# lightmode = true # set true if you want to enforce light mode
默认情况下,深色模式会根据 prefers-color-scheme
媒体查询自动启用。 如果要强制启用或停用此设置,请在 [Params] 中设置 darkmode=true
或 lightmode=true
。
社交媒体
如果要启用 Twitter Card 或 Opengraph meta
标签的生成,以便在 Twitter、Facebook 和其他社交媒体网站上获得良好的嵌入效果,请添加以下内容
[Params]
twittercard = true
opengraph = true
有关如何进一步配置此行为,请参阅 Hugo 中的内部模板。
短代码
边注
HugoTeX 使用的 LaTeX.css 定义了边注的语法。 然而,由于编写起来有点冗长,我们为此提供了一个 Hugo 短代码
A sentence deserving a sidenote.{{% sidenote %}}The note itself.{{% /sidenote %}}.
在较大的屏幕上,注释将显示在右边距。 在较小的屏幕上,注释默认会被隐藏,单击标记注释存在的上标数字时会打开。
对于贡献者
欢迎任何问题或拉取请求。
许可证
MIT
类似项目
- queensferryme / hugo-theme-texify