Hexo-theme-next: 怎样设置 Logo、文章标题、正文的字重?

Created on 25 Oct 2018  ·  2Comments  ·  Source: theme-next/hexo-theme-next

请问怎样对 Logo、文章标题、正文等字体的字重进行设置?

  • 需要哪些文件?
  • 具体如何操作?

感谢🙏🏻

I agree and want to create new issue


Expected behavior

希望能针对 Logo、文章标题、正文等字体的字重进行设置。

Actual behavior

Hexo Information

Hexo version

hexo: 3.8.0
hexo-cli: 1.1.0
os: Darwin 18.2.0 darwin x64
http_parser: 2.8.0
node: 8.12.0
v8: 6.2.414.66
uv: 1.19.2
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.32.0
napi: 3
openssl: 1.0.2p
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c

Hexo Configuration

### NexT Information

NexT Version:

  • [x] Latest Master branch
  • [ ] Latest Release version
  • [ ] Old version

NexT Scheme:

  • [ ] All schemes
  • [x] Muse
  • [ ] Mist
  • [ ] Pisces
  • [ ] Gemini

NexT Configuration:

  global:
    external: true
    family: source-han-sans-simplified-c, "PingFang SC", sans-serif
    size: 20

  # Font settings for Headlines (H1, H2, H3, H4, H5, H6).
  # Fallback to `global` font settings.
  headings:
    external: true
    family: source-han-sans-simplified-c, sans-serif
    size: 28

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

  # Font settings for Logo.
  # Fallback to `global` font settings.
  logo:
    external: true
    family: source-han-sans-simplified-c, sans-serif
    size: 160

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

Other Information

  • Chrome 69.0.3497.100
  • macOS Mojave
Stale Support 🌀 Fonts

Most helpful comment

The first method:

http://theme-next.iissnan.com/theme-settings.html#fonts-customization

https://github.com/theme-next/hexo-theme-next/blob/1e71640110c5253b9ec1c4983717b6ab91a774ce/_config.yml#L382-L436

The second way:

using Data Files , you can put your custom styles file outside theme directory in root source/_data to set styles: source/_data/styles.styl.

https://github.com/theme-next/hexo-theme-next/blob/1e71640110c5253b9ec1c4983717b6ab91a774ce/_config.yml#L18-L32

so u can add your custom styles in source/_data/styles.styl according to base.styl.

https://github.com/theme-next/hexo-theme-next/blob/1e71640110c5253b9ec1c4983717b6ab91a774ce/source/css/_variables/base.styl#L64-L109


So, you can have a try.

All 2 comments

The first method:

http://theme-next.iissnan.com/theme-settings.html#fonts-customization

https://github.com/theme-next/hexo-theme-next/blob/1e71640110c5253b9ec1c4983717b6ab91a774ce/_config.yml#L382-L436

The second way:

using Data Files , you can put your custom styles file outside theme directory in root source/_data to set styles: source/_data/styles.styl.

https://github.com/theme-next/hexo-theme-next/blob/1e71640110c5253b9ec1c4983717b6ab91a774ce/_config.yml#L18-L32

so u can add your custom styles in source/_data/styles.styl according to base.styl.

https://github.com/theme-next/hexo-theme-next/blob/1e71640110c5253b9ec1c4983717b6ab91a774ce/source/css/_variables/base.styl#L64-L109


So, you can have a try.

:wave: @trai25, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.

Was this page helpful?
0 / 5 - 0 ratings