【问题标题】:Modifying font-title of blogdown webst修改 blogdown webst 的 font-title
【发布时间】:2019-10-23 23:54:37
【问题描述】:

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

博客来自这个链接:

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

请帮忙?

一个想法就好了。

谢谢

【问题讨论】:

    标签: html css r-markdown blogdown


    【解决方案1】:

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

    你可以找到here:

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

    {{ else }}<div class="yourfancytitle"> {{ .Site.Title }} </div>                                                                    
    

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

    .yourfancytitle{
      font-family: Candara;
    }                                                                                          
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-20
      • 1970-01-01
      • 1970-01-01
      • 2016-04-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多