Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modifying font-title of blogdown webst

Hello guys this is my first question regarding the blog. I would like to make a basic change to the blog title.

The blog is from this link:

yihui

This is the .toml file:

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 = "…"

On the site says Magazine title in Blackletter (𝔅𝔏𝔄ℭ𝔎 𝔏𝔈𝔗𝔗𝔈ℜ) but I can't find anything associated with this type of font in the .css files. And this is the font I would like to change.

Please any help?

Just an idea would be good.

Thanks

like image 523
Laura Avatar asked Oct 23 '19 23:10

Laura


1 Answers

Yihui used some regular expression black magic to convert the title into Math bold Fraktur. As a result, it is not controlled by the CSS font setting.

You can find it here:

To change it to another font. modify the line to

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

then in your CSS, change the font-family:

.yourfancytitle{
  font-family: Candara;
}                                                                                          
like image 171
TC Zhang Avatar answered Oct 01 '22 00:10

TC Zhang