Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何修改多级标题h1,h2,h3的字体大小及其step? #872

Closed
AlexHex7 opened this issue May 12, 2019 · 3 comments
Closed

如何修改多级标题h1,h2,h3的字体大小及其step? #872

AlexHex7 opened this issue May 12, 2019 · 3 comments

Comments

@AlexHex7
Copy link

AlexHex7 commented May 12, 2019

我想增加h1、h2、h3标题的大小,并加大他们之间的step。另外,这些标题是直接使用markdown语法的#号创建的。

  1. 我修改了 themes/next/source/css/_variables/base.styl文件中的相关参数。将base改为40px,step改为4px。但是只有文章的标题变为了40px,文中的h1,h2,h3标题并没有变大,但step变化为4了。
// Headings font size
$font-size-headings-step    = 4px
$font-size-headings-base    = 40px
$font-size-headings-base    = unit(hexo-config('font.headings.size'), px) if hexo-config('font.headings.size') is a 'unit'
$font-size-headings-small   = $font-size-headings-base - $font-size-headings-step
$font-size-headings-smaller = $font-size-headings-small - $font-size-headings-step
$font-size-headings-large   = $font-size-headings-base + $font-size-headings-step
$font-size-headings-larger  = $font-size-headings-large + $font-size-headings-step

2.我也尝试了修改themes/next/_config.yml文件中的参数. 同样只有文章标题大小改变了,文中标题依然没有改变。

font:
  enable: false

  # Uri of fonts host, e.g. //fonts.googleapis.com (Default).
  host:

  # Font options:
  # `external: true` will load this font family from `host` above.
  # `family: Times New Roman`. Without any quotes.
  # `size: xx`. Use `px` as unit.

  # Global font settings used for all elements in <body>.
  global:
    external: true
    family: Lato
    size: 18

  # Font settings for Headlines (H1, H2, H3, H4, H5, H6).
  # Fallback to `global` font settings.
  headings:
    external: true
    family:
    size: 40

  # Font settings for posts.
  # Fallback to `global` font settings.
  posts:
    external: true
    family:

  # Font settings for Logo.
  # Fallback to `global` font settings.
  logo:
    external: true
    family:
    size: 

  # Font settings for <code> and code blocks.
  codes:
    external: true
    family:
    size:

Which means that I want to enlarge all h1 in my article. What's more, increase the steps between h1 and h2.

@welcome
Copy link

welcome bot commented May 12, 2019

Thanks for opening this issue, maintainers will get back to you as soon as possible!

@AlexHex7 AlexHex7 changed the title How to change the font size of H1, H2, H3? 如何修改多级标题h1,h2,h3的字体大小及其step? May 12, 2019
@stevenjoezhang
Copy link
Contributor

别急,这个逻辑正在改:#800
下次版本更新时会实装

@stevenjoezhang
Copy link
Contributor

Fixed in #1005, #1006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants