修改Blogdown网站的字体标题

时间:2019-10-23 23:54:37

标签: html css r-markdown blogdown

大家好,这是我关于博客的第一个问题。我想对博客标题进行基本更改。

博客来自此链接:

yihui

这是.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文件中找到与此字体相关的任何内容。这是我要更改的字体。

请帮忙吗?

一个主意就好。

谢谢

1 个答案:

答案 0 :(得分:2)

Yihui使用一些正则表达式黑魔法将标题转换为Math bold的Fraktur。因此,它不受CSS字体设置的控制。

您可以找到它here

将其更改为另一种字体。将该行修改为

__name__

然后在您的CSS中,更改字体系列:

__module__