hexo
hexo copied to clipboard
页面全部变成黑白的,毫无预兆的,图片或者按钮或者装饰,整个页面变成黑白的。但是各个组件都正常工作
Check List
- [X] I have already read Docs page & Troubleshooting page.
- [X] I have already searched existing issues and they are not help to me.
- [X] I examined error or warning messages and it's difficult to solve.
- [X] I am using the latest version of Hexo. (run
hexo versionto check) - [X] My Node.js is matched the required version.
Expected behavior
本来渲染之后是彩色的,和官方文档的样式一样,但是可能安装了Nessus或者rips等之后,导致站点变成黑白的,各个组件都正常工作。(shokax)主题
Actual behavior
搭建博客完成后一切正常,下载了一些软件部署(Xterminal、Nessus、rips、seay等)在本地后博客发生异常,整个界面变成了黑色
即使讲黑夜模式关闭,他还是黑白粉笔的样式,并且连加载的毛毛虫都变成了黑色。
How to reproduce?
在--safe安全模式下,他仍然会这样,插件都没有被加载,但是整个页面仍然是黑白的,我将我的博客内容和配置负责下来,删除博客的目录重新hexo init,仍然是这样的问题,hexo渲染的界面仍然是黑白的,像黑白照片一样,然后我npm uninstall hexo时候报错Cannot read properties of null (reading 'matches'),这个报错频繁出现,安装时候也会出现,卸载软件时候也会出现,npm版本已经是latest,也强制清除过npm缓存,但是都没有办法,最后使用cnpm时候才有可能不会报错,出现安装hexo之后仍然渲染的是黑白的
Is the problem still there under Safe mode?
是的
Your Node.js & npm version
PS E:\my-blog> npm -v
10.5.1
PS E:\my-blog> node -v
v20.10.0
Your Hexo and Plugin version
PS E:\my-blog> npm ls --depth 0
[email protected] E:\my-blog
+-- @algolia/[email protected] -> .\node_modules\.pnpm\@[email protected]\node_modules\@algolia\client-search
+-- @waline/[email protected] -> .\node_modules\.pnpm\@[email protected]\node_modules\@waline\client
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\algoliasearch
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\esbuild
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-algoliasearch
+-- [email protected] -> .\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\hexo-feed
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-fs
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-generator-archive
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-generator-category
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-generator-index
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-generator-tag
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-lightning-minify
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-pagination
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-renderer-ejs
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-renderer-multi-next-markdown-it
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-renderer-pug
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-renderer-stylus
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-server
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-theme-landscape
+-- [email protected] -> .\node_modules\.pnpm\[email protected][email protected][email protected][email protected]\node_modules\hexo-theme-shokax
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo-util
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\hexo
+-- [email protected] -> .\node_modules\.pnpm\[email protected][email protected]\node_modules\instantsearch.js
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\js-yaml
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\mouse-firework
+-- [email protected] -> .\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\quicklink
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\theme-shokax-anime
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\theme-shokax-pjax
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\twikoo
+-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\unlazy
`-- [email protected] -> .\node_modules\.pnpm\[email protected]\node_modules\vue
Your package.json
{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "hexo generate",
"clean": "hexo clean",
"deploy": "hexo deploy",
"server": "hexo server"
},
"hexo": {
"version": "7.0.0"
},
"dependencies": {
"@algolia/client-search": "4.22.1",
"@waline/client": "3.0.1",
"algoliasearch": "4.22.1",
"esbuild": "0.20.0",
"hexo": "^7.0.0",
"hexo-algoliasearch": "^2.0.1",
"hexo-feed": "^1.1.2",
"hexo-fs": "4.1.1",
"hexo-generator-archive": "^2.0.0",
"hexo-generator-category": "^2.0.0",
"hexo-generator-index": "^3.0.0",
"hexo-generator-tag": "^2.0.0",
"hexo-lightning-minify": "^0.1.5",
"hexo-pagination": "3.0.0",
"hexo-renderer-ejs": "^2.0.0",
"hexo-renderer-multi-next-markdown-it": "^0.2.1",
"hexo-renderer-pug": "^3.0.0",
"hexo-renderer-stylus": "^3.0.0",
"hexo-server": "^3.0.0",
"hexo-theme-landscape": "^1.0.0",
"hexo-theme-shokax": "^0.4.2",
"hexo-util": "3.2.0",
"instantsearch.js": "4.64.2",
"js-yaml": "4.1.0",
"mouse-firework": "0.0.5",
"quicklink": "2.3.0",
"theme-shokax-anime": "0.0.6",
"theme-shokax-pjax": "0.0.3",
"twikoo": "1.6.31",
"unlazy": "0.10.4",
"vue": "3.4.15"
}
}
Your site's _config.yml (Optional)
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: " "
subtitle: 'しんじつはいつもひとつ(いです)'
description: 'しんじつはいつもひとつ(いです)'
keywords: CTF
author: MorIo24
language: zh-CN
timezone: 'Asia/Shanghai'
# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://ctf-learner.github.io/
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: false
relative_link: false
future: true
syntax_highlighter: false # highlight.js
highlight:
enable: false
# 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:
关于shokaX: about shokaX
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: shokaX
#配置markdown插件
markdown:
render: # 渲染器设置
html: false # 过滤 HTML 标签
xhtmlOut: true # 使用 '/' 来闭合单标签 (比如 <br />)。
breaks: true # 转换段落里的 '\n' 到 <br>。
linkify: true # 将类似 URL 的文本自动转换为链接。
typographer:
quotes: "“”‘’"
plugins: # markdown-it 插件设置
- plugin:
name: markdown-it-toc-and-anchor
enable: true
options: # 文章目录以及锚点应用的 class 名称,shoka 系主题必须设置成这样
tocClassName: "toc"
anchorClassName: "anchor"
- plugin:
name: markdown-it-multimd-table
enable: true
options:
multiline: true
rowspan: true
headerless: true
- plugin:
name: ./markdown-it-furigana
enable: true
options:
fallbackParens: "()"
- plugin:
name: ./markdown-it-spoiler
enable: true
options:
title: "你知道得太多了"
autoprefixer:
exclude:
- "*.min.css"
#配置hexo-lightning-minify
minify:
js:
enable: true # ShokaX 自带 esbuild 优化,不建议开启,其他主题建议开启
exclude: # 排除文件,接受 string[],需符合 micromatch 格式
css:
enable: true # 开启 CSS 优化
options:
targets: ">= 0.5%" # browserslist 格式的 target
exclude: # 排除文件,接受 string[],需符合 micromatch 格式
html:
minifier: html-minifier
enable: true # 开启 HTML 优化
options:
comments: false # 是否保留注释内容
exclude: # 排除文件,接受 string[],需符合 micromatch 格式
image:
enable: true # 开启图片预处理和自动 WebP 化
options:
avif: false
webp: true # 预留配置项,现版本无作用
quality: 80 # 质量,支持1-100的整数、lossless或nearLossless
effort: 2 # CPU 工作量,0-6之间的整数(越低越快)
replaceSrc: true # 自动替换生成html中的本地图片链接为webp链接
# 我们更建议使用 Service Worker 来在用户侧实现 replaceSrc 的功能,这将能够以一种侵入式更小的方式实现链接替换
exclude:
# 配置feed
feed:
limit: 20
order_by: "-date"
tag_dir: false
category_dir: false
rss:
enable: true
template: "node_modules/hexo-theme-shokax/layout/_alternate/rss.ejs"
output: "rss.xml"
atom:
enable: true
template: "node_modules/hexo-theme-shokax/layout/_alternate/atom.ejs"
output: "atom.xml"
jsonFeed:
enable: true
template: "node_modules/hexo-theme-shokax/layout/_alternate/json.ejs"
output: "feed.json"
#配置algolia
algolia:
appId: B6T86OQERC #Your appId
apiKey: 6a0dfa0d9ff8edb4eedb381347d5bb65 #Your apiKey
adminApiKey: 2a6a17ced2cd18b18052f14ba9571965 #Your adminApiKey
chunkSize: 5000
indexName: "hexo" #"shokaX"
fields:
- title #必须配置
- path #必须配置
- categories #推荐配置
- content:strip:truncate,0,2000
- gallery
- photos
- tags
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: 'git'
repo: [email protected]:ctf-learner/ctf-learner.github.io.git
branch: main
Others
No response
我无法通过你在How to reproduce?中提供的信息复现这个问题。问题听上去来自你使用的的主题而不是Hexo本身,请联系主题开发者获得帮助。