html - 修改 blogdown webst 的 font-title
问题描述
大家好,这是我关于博客的第一个问题。我想对博客标题进行基本更改。
该博客来自此链接:
这是 .toml 文件:
baseurl = "/"
languageCode = "en-us"
title = "This is the Title I want Change"
theme = "hugo-xmag"
googleAnalytics = ""
disqusShortname = ""
ignoreFiles = ["\\.Rmd$", "_files$", "_cache$"]
preserveTaxonomyNames = true
footnotereturnlinkcontents = "↩"
hasCJKLanguage = true
enableEmoji = true
paginate = 6
[permalinks]
post = "/post/:year/:month/:day/:slug/"
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "About"
url = "/about/"
weight = 2
[[menu.main]]
name = "Categories"
url = "/categories/"
weight = 3
[[menu.main]]
name = "Tags"
url = "/tags/"
weight = 4
[[menu.main]]
name = "Subscribe"
url = "/index.xml"
[params]
description = "A website built through Hugo and blogdown."
summary_length = 300
github_edit = "https://github.com/yihui/hugo-xmag/edit/master/exampleSite/content/"
footer = "© [Yihui Xie](https://yihui.name) 2017 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"
[params.text]
back = "← Back to Home"
edit = "Edit this page →"
truncated = "…"
在网站上说 Blackletter 中的杂志标题 (ℭ ℜ) 但我在 .css 文件中找不到与这种字体相关的任何内容。这是我想改变的字体。
请问有什么帮助吗?
只是一个想法会很好。
谢谢
解决方案
Yihui 使用了一些正则表达式黑魔法将标题转换为 Math 粗体 Fraktur。因此,它不受 CSS 字体设置的控制。
你可以在这里找到它:
将其更改为另一种字体。将行修改为
{{ else }}<div class="yourfancytitle"> {{ .Site.Title }} </div>
然后在您的 CSS 中,更改字体系列:
.yourfancytitle{
font-family: Candara;
}
推荐阅读
- lagom - Lagom withPathParamSerializer
- tfs - VSTS Sprint 容量 - 无法选择活动
- docker - 在 Docker 中动态更改 Traefik 前端配置
- git - VSTS GIT REST API 忽略“ExcludeDeletes”;有解决方法吗?
- c# - 发送开发时发生意外错误,但未实时发生
- android - 没有帖子ID是否可以得到评论?
- ssl - Firebase 托管生成的 SSL 证书不包括连接的域
- android - 使用 RxJava 调用四个 api 组合在一起
- git - Git:man 命令不起作用
- python - 使用 pyinstaller 更新或添加新数据文件到 exe