iTimeTraveler / hexo-theme-hipaper

A fashional newspaper theme for Hexo.
https://itimetraveler.github.io/hexo-theme-hipaper/
MIT License
249 stars 77 forks source link

how can i change the font? #35

Closed hjlgood closed 1 week ago

hjlgood commented 5 years ago

Hello,

I appreciate your theme.

However, I would like to change the font of the main article, but I could not find where the fonts for the main article are located in.

Thank you in advance.

image

KangChou commented 4 years ago

You can add the following code to the theme configuration of the blog, which may help you.

#字体设置
font:
  enable: true
  # CDN
  host: 

  # Font options:
  # `external: true` will load this font family from `host` above.
  # `family: Times New Roman`. Without any quotes.
  # `size: x.x`. Use `em` as unit. Default: 1 (16px)

  # external: 控制是否使用 CDN。
  # family: 字体样式。
  # size: 字体大小。默认为 1(16px)。

  # Global font settings used for all elements inside <body>.
  # 全局配置,覆盖 <body> 标签里所有元素
  global:
    external: true
    family: Monda
    size: 

  # Font settings for site title (.site-title).
  # 博客名字那儿
  title:
    external: true
    family: 
    size:

  # Font settings for headlines (<h1> to <h6>).
  # 注意这是文章里的标题,而不是侧边栏的 toc
  headings:
    external: true
    family: #Roboto Mono
    size:

  # Font settings for posts (.post-body).
  # 正文
  posts:
    external: true
    family:
    size:

  # Font settings for <code> and code blocks.
  # 代码块
  codes:
    external: true
family: