theme-next / hexo-theme-next

Elegant and powerful theme for Hexo.
https://theme-next.org
Other
8.12k stars 2.05k forks source link

移动端国内访问博客只显示框架,不显示文字 #1730

Closed ThisisXXZ closed 1 year ago

ThisisXXZ commented 1 year ago

Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。

Issue Checklist


Expected behavior

移动端访问博客只显示框架,无文字显示。虽然不显示文字,但是网页的其他元素均未出现问题。 并且,这个问题只在国内出现。只要开启 VPN,移动端就能正常访问博客。 再者,好像这是使用了 NexT 主题的 Hexo 博客的问题。我尝试在移动端访问使用了其他主题的 Hexo 博客,均能正常访问。

由于只有文字不显示,我一度怀疑是 Google font server 的问题,于是我将 Google fonts server 由 fonts.googleapis.com 修改为 fonts.font.im,测试后发现没有解决问题。

这个问题困扰了我快一个月了,希望得到大家的帮助,谢谢!!

Actual behavior

Steps to reproduce the behavior

  1. N/A
  2. N/A
  3. N/A

Environment Information

Node.js and NPM Information

v18.16.0
9.5.1

Package dependencies Information

hexo-site@0.0.0 C:\Users\XXZ\Desktop\document\github\Hexo-blog
├── eslint@8.41.0
├── hexo-asset-image@1.0.0
├── hexo-deployer-git@4.0.0
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-feed@3.0.0
├── hexo-generator-index-pin-top@0.2.2
├── hexo-generator-searchdb@1.4.1
├── hexo-generator-sitemap@3.0.1
├── hexo-generator-tag@2.0.0
├── hexo-math@4.0.0
├── hexo-next-share@1.1.0 (git+ssh://git@github.com/theme-next/hexo-next-share.git#a0cfd32ade7bd25b8d282366fa177afb7644d321)
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-kramed@0.1.4
├── hexo-renderer-stylus@3.0.0
├── hexo-server@3.0.0
├── hexo-symbols-count-time@0.7.1
├── hexo-theme-landscape@1.0.0
├── hexo-theme-next@8.16.0
└── hexo@6.3.0

Hexo Configuration

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: ThisisXXZ's Blog
subtitle: Sound! Euphonium
description: 如果努力的尽头是奇迹
keywords:
author: XXZ
language: en
timezone: ''

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://www.thisisxxz.com/
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: true
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace: '    '
  wrap: true
  hljs: false
prismjs:
  enable: false
  preprocess: true
  line_number: true
  tab_replace: '    '

# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
  path: ''
  per_page: 10
  order_by: -date

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: 'mtime'

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: git
  repository: git@github.com:ThisisXXZ/ThisisXXZ.github.io.git
  branch: main

# Math
math:
  engine: 'mathjax'
  mathjax:
    src: custom_mathjax_source
    config:
      # MathJax config

# article word count and expected reading time

symbols_count_time:
  symbols: false
  time: false
  total_symbols: false  
  total_time: false
  exclude_codeblock: false
  awl: 2                   # Average Word Length
  wpm: 300                 # Words Per Minute
  suffix: "mins."

# in-site search
  path: search.xml
  field: post
  format: html
  limit: 10000

marked:
  prependRoot: true
  postAsset: true

plugins: hexo-generate-feed
feed:
  enable: true
  type: atom
  path: atom.xml
  limit: 20
  hub:
  content:
  content_limit: 140
  content_limit_delim: ' '
  order_by: -date
  icon: icon.png
  autodiscovery: true
  template:

NexT Configuration

只粘贴了使用 CDN 的部分和字体相关的修改。

# NeedMoreShare2
# Dependencies: https://github.com/theme-next/theme-next-needmoreshare2
# For more information: https://github.com/revir/need-more-share2
# iconStyle: default | box
# boxForm: horizontal | vertical
# position: top / middle / bottom + Left / Center / Right
# networks:
# Weibo | Wechat | Douban | QQZone | Twitter | Facebook | Linkedin | Mailto | Reddit | Delicious | StumbleUpon | Pinterest
# GooglePlus | Tumblr | GoogleBookmarks | Newsvine | Evernote | Friendfeed | Vkontakte | Odnoklassniki | Mailru
needmoreshare:
  enable: true
  cdn:
    js: //cdn.jsdelivr.net/gh/theme-next/theme-next-needmoreshare2@1/needsharebutton.min.js
    css: //cdn.jsdelivr.net/gh/theme-next/theme-next-needmoreshare2@1/needsharebutton.min.css
  postbottom:
    enable: true
    options:
      iconStyle: box
      boxForm: horizontal
      position: bottomCenter
      networks: Wechat,QQZone,Weibo,Douban,Twitter,Facebook
  float:
    enable: false
    options:
      iconStyle: box
      boxForm: horizontal
      position: middleRight
      networks: Wechat,QQZone,Weibo,Douban,Twitter,Facebook

font:
  enable: true

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

  # 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)

  # Global font settings used for all elements inside <body>.
  global:
    external: true
    family: Noto Serif SC
    size: 

  # Font settings for site title (.site-title).
  title:
    external: true
    family: 
    size: 

  # Font settings for headlines (<h1> to <h6>).
  headings:
    external: true
    family: Sitka Heading
    size: 2

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

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

Other Information

手机端 Chrome 版本:113.0.5672.77 b36d042bb23ddfb4b9416e14425772c 除文字不显示外,网页的其余功能均能正常运作,甚至站内搜索页面都没有失效

welcome[bot] commented 1 year ago

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

ThisisXXZ commented 1 year ago

已解决,更新至 8.0.0 以上版本即可