next-theme / hexo-theme-next

🎉 Elegant and powerful theme for Hexo.
https://theme-next.js.org
Other
2.31k stars 411 forks source link

博客文章外链无法正常加载 #775

Closed lyz05 closed 2 weeks ago

lyz05 commented 1 month ago

Issue Checklist

Expected behavior

image 预期应该直接点击文章可以跳转到外链,在NexT version 8.17.1版本及之前可以正常显示。

Actual behavior

在NexT version 8.18.0版本之后,外链不能跳转,而是一个空的博文

Steps to reproduce the behavior

在hexo根目录执行以下命令

npm install
hexo clean
hexo s

打开含外链的标签页面 http://localhost:4000/tags/link/

Node.js and NPM Information

v21.7.1
10.5.0

Package dependencies Information

hexo-site@0.0.0 C:\Users\congcong\git\hexo
├── @next-theme/plugins@8.19.2
├── hexo-deployer-ali-oss@1.0.0
├── hexo-deployer-git@4.0.0
├── hexo-douban@2.2.6
├── hexo-excerpt@1.3.1
├── hexo-filter-mermaid-diagrams@1.0.5
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-searchdb@1.4.1
├── hexo-generator-sitemap@3.0.1
├── hexo-generator-tag@2.0.0
├── hexo-neat@1.0.9
├── hexo-next-valine@2.1.0 (git+ssh://git@github.com/next-theme/hexo-next-valine.git#f96edab62f91f30f93b8e501402628858a7542f3)
├── hexo-offline-popup@1.0.3
├── hexo-reference@1.0.4
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-marked@6.2.0
├── hexo-renderer-stylus@3.0.1
├── hexo-server@3.0.0
├── hexo-symbols-count-time@0.7.1
├── hexo-theme-next@8.19.2
├── hexo@6.3.0
└── quicklink@2.3.0

Hexo Configuration

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

# Site
title: Lyz's Blog
subtitle: Never Give Up
description: 怯,你就会输一辈子
keywords:
author: lyz05
language: zh-CN
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://blog.lyz05.cn
root: /
permalink: :year/:title/
permalink_defaults:

# 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:
  - "web/**"
  - "lab/note/static/**"

# 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
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  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)
# hexo-generator-index
index_generator:
  path: ''
  per_page: 5
  order_by: -date

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# 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

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

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

# Deployment
## Docs: https://hexo.io/zh-cn/docs/one-command-deployment
# deploy:
# - type: git
#   branch: master
#   repository:
#     github: git@github.com:lyz05/lyz05.github.io.git
    #coding: git@git.coding.net:lyz05/lyz05.git
    #aliyun: git@lyz05.cn:hexo.git

# 以下是新添加的配置
# hexo-generator-archive 归档生成
archive_generator:
  per_page: 15

# hexo-generator-tag 分页生成
tag_generator:
  per_page: 10

# hexo-generator-searchdb
search:
  path: search.xml
  field: post
  format: html
  limit: 10000

# hexo-generator-sitemap
sitemap:
  path: sitemap.xml

# hexo-symbols-count-time
symbols_count_time:
  symbols: true
  time: true
  total_symbols: false
  total_time: false
  exclude_codeblock: false

# hexo-excerpt
# 博文截断
excerpt:
  depth: 5
  excerpt_excludes: []
  more_excludes: []
  hideWholePostExcerpts: true

# hexo-neat
# 博文压缩
neat_enable: true
# 压缩html
neat_html:
  enable: true
  exclude:
# 压缩css
neat_css:
  enable: true
  exclude:
    - '**/*.min.css'
# 压缩js
neat_js:
  enable: true
  mangle: true
  output:
  compress:
  exclude:
    - '**/*.min.js'
    - '**/jquery.fancybox.pack.js'
    - '**/index.js'
    - '**/fireworks.js'

# hexo-douban
douban:
  id: 140286755
  builtin: false
  book:
    title: '阅读'
  movie:
    title: '观影'
  timeout: 10000

# hexo-offline-popup 
# offline config passed to sw-precache.
service_worker:
  maximumFileSizeToCacheInBytes: 5242880
  staticFileGlobs:
  - public/**/*.{js,html,css,png,jpg,gif,svg,eot,ttf,woff,woff2}
  stripPrefix: public
  verbose: true

NexT Configuration

# Remove unnecessary files after hexo generate.
minify: true

# 自定义文件
custom_file_path:
  head: source/_data/head.njk
  style: source/_data/styles.styl
  footer: source/_data/footer.njk

# 主题
scheme: Gemini

# 暗黑模式
darkmode: true

# 创作者协议
creative_commons:
    sidebar: true
    post: false

# 主菜单
menu:
  home: / || fa fa-home
  archives: /archives/ || fa fa-archive
  tags: /tags/ || fa fa-tags
  categories: /categories/ || fa fa-th
  lab:
    default: /lab/ || fa fa-flask fa-fw
    file: http://home.lyz05.cn:5244/ || fa fa-folder
    note: /note/ || fa fa-clipboard
    uptime: https://stats.uptimerobot.com/XnEypsn5VN || fas fa-heartbeat
    FC: /FC/ || fas fa-rocket
  books: /books/ || fa fa-book
  movie: /movies/ || fa fa-film
  about: /about/ || fa fa-user
  links: /links/ || fas fa-link

menu_settings:
# 徽标
  badges: true

# 头像
avatar:
  url: /images/avatar.webp
  rounded: true

# 社交链接
social:
  GitHub: https://github.com/lyz05 || fab fa-github
  E-Mail: mailto:blog@lyz05.cn || fa fa-envelope
  知乎: http://www.zhihu.com/people/liu-yuan-zhe-16 || iconfont icon-douban
  豆瓣: http://www.douban.com/people/140286755/ || iconfont icon-zhihu

# 社交图标
social_icons:
  icons_only: true

footer:
  since: 2015

# Post元信息显示
post_meta:
  created_at: true
  updated_at:
    enable: false

mobile_layout_economy: true

back2top:
  scrollpercent: true

math:
  mathjax:
    enable: true

cloudflare_analytics: ebddc42d1db14fe2b0307d0dce464211

local_search:
  enable: true
  preload: true

pdf:
  enable: true

# 代码块
codeblock:
  copy_button:
    enable: true
  fold:
    enable: true
    height: 500

# 动画
motion:
  enable: false
  async: true
  transition:
    post_block: fadeIn
    post_header:
    post_body:
    coll_header:
    sidebar: fadeInUp

# 顶部进度条
pace:
  enable: true

# 图片懒加载
lazyload: true

# 中英文文字留白
pangu: true

# 页面预加载
quicklink:
  enable: true
  home: true
  archive: true

# Post关联github编辑博文
post_edit:
  enable: true
  url: https://github.com/lyz05/lyz05.github.io/tree/blog/source/ # Link for view source

# 为字体插件建立早期链接
preconnect: true

tag_icon: true

github_banner:
  enable: true
  permalink: https://github.com/lyz05

# SEO
index_with_subtitle: true

vendors:
  # The CDN provider of NexT internal scripts.
  # Available values: local | jsdelivr | unpkg | cdnjs
  # Warning: If you are using the latest master branch of NexT, please set `internal: local`
  internal: local
  # The default CDN provider of third-party plugins.
  # Available values: local | jsdelivr | unpkg | cdnjs
  # Dependencies for `plugins: local`: https://github.com/next-theme/plugins
  plugins: local

# Leancloud统计字数与评论功能
valine:
  enable: true
  appId: IOO0v6UWzOQE94hPLrgXiQhg-9Nh9j0Va
  appKey: vBfyrsgGJnqg8qG3PD4MglR8
  visitor: true
  serverURLs: https://ioo0v6uw.lc-cn-n1-shared.com
  recordIP: true

# Mermaid 标签
mermaid:
  enable: true
  # Available themes: default | dark | forest | neutral
  theme:
    light: default
    dark: dark

# 打赏设置
reward_settings:
  enable: true
  animation: false
  comment: 赏个鸡腿🍗

reward:
  wechatpay: /images/wechatpay.png
  alipay: /images/alipay.jpg
  #paypal: /images/paypal.png
  #bitcoin: /images/bitcoin.png

Other Information

No response

welcome[bot] commented 1 month ago

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

stevenjoezhang commented 1 month ago

谢谢反馈,这个特性此前被移除了: https://github.com/hexojs/hexo/issues/5239 下个版本会加回来