【发布时间】:2020-03-09 08:24:19
【问题描述】:
Hugo 和 css 的新手。尝试根据这些说明更改 beautifulhugo 主题的字体:
参见 Chandra 11 月 17 日的帖子: https://discourse.gohugo.io/t/font-selection-in-theme/8803/8
我已经下载了两种字体并将它们放在 static/fonts 中
将以下内容添加到 config.toml
googlefonts = “http://fonts.googleapis.com/css?family=Itim|Limelight”
将此添加到 static/css/custom_style.css
body {
font-family: ‘Limelight’, cursive;
}
p {
font-family: ‘Itim’, cursive;
}
并将其添加到 layouts/partials/head_custom.html
{{ if .Site.Params.googlefonts }}
<link rel="stylesheet" href="{{ .Site.Params.googlefonts }}" type="text/css" media="all" />
{{ end }}
然而,没有可见的变化。请告知我做错了什么。
一切都应该在这里可用:https://github.com/ixodid198/blog
【问题讨论】: