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

(已解决)网页显示内容极其残缺,请问大神们这是怎么一回事 #95

Open
JoYEmbedded opened this issue Mar 10, 2023 · 3 comments

Comments

@JoYEmbedded
Copy link

JoYEmbedded commented Mar 10, 2023

如下图所示,我的网页搭建完后极其残缺。有谁知道是怎么回事吗?
image
报错情况在下面

INFO  minify the html: index.html [ 15.93% saved]
ERROR Asset render failed: css/app.css
TypeError: D:/hexo_web/hexo/hexo/blog/themes/shoka/source/css/_common/outline/sidebar/social.styl:45:44
   41|
   42|     $social = hexo-config('social');
   43|
   44|     for type in $social {
   45|       for i in split(" || ", slice(type, 1)) {
--------------------------------------------------^
   46|           color = slice(i, 1, -1)
   47|       }
   48|

Cannot read properties of undefined (reading 'split')
    at ".item " (D:/hexo_web/hexo/hexo/blog/themes/shoka/source/css/_common/outline/sidebar/social.styl:4:22)
    at ".social " (D:/hexo_web/hexo/hexo/blog/themes/shoka/source/css/_common/outline/sidebar/social.styl:64:2)

    at Evaluator.split (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\functions\index.js:1088:33)
    at Evaluator.invokeBuiltin (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:1033:30)
    at Evaluator.visitCall (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:498:16)
    at Visitor.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:153:18)
    at Evaluator.visitExpression (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:626:26)
    at Visitor.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:153:18)
    at Evaluator.visitEach (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:398:32)
    at Visitor.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:153:18)
    at Evaluator.visitBlock (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:702:39)
    at Visitor.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:153:18)
    at visitBody (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:415:17)
    at Evaluator.visitEach (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:431:7)
    at Visitor.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:153:18)
    at Evaluator.visitBlock (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:702:39)
    at Visitor.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:153:18)
    at Evaluator.visitGroup (D:\hexo_web\hexo\hexo\blog\node_modules\stylus\lib\visitor\evaluator.js:243:22)

@llxlr
Copy link

llxlr commented Mar 12, 2023

social这个应该是没配置对,看主题example目录下的示例yaml。为什么残缺,不知道,因人而异,可能有啥地方没配好。

@JoYEmbedded
Copy link
Author

JoYEmbedded commented Mar 16, 2023

social这个应该是没配置对,看主题example目录下的示例yaml。为什么残缺,不知道,因人而异,可能有啥地方没配好。

感谢你的提示,确实是没配置好,最关键的点在于themes/shoka下的_config.yml里的menu那一栏没有取消注释。其实很早就看到了你的提示,想着解决完全部bug再回复,但是一个新的bug却让我困扰了很久。现在在localhost中能正常显示图片,但是当我上传到我的githubpages时,图片却无法显示,想问问您知道怎么解决吗?再次向您表示感谢。
local时:
image
上传到网页时:
image

@JoYEmbedded
Copy link
Author

问题已解决,我发现在我上传了其他博客以后,网站上的全部图片都能够正常显示了。

@JoYEmbedded JoYEmbedded changed the title 网页显示内容极其残缺,请问大神们这是怎么一回事 (已解决)网页显示内容极其残缺,请问大神们这是怎么一回事 Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants