theme-next / hexo-theme-next

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

Hexo-NexT Blog on github pages go blank after deploying [solved] #303

Closed Janegao011919 closed 6 years ago

Janegao011919 commented 6 years ago

I agree and want to create new issue


Expected behavior

I was activating functions by editing the _config.yml under folder theme NexT. Somewhere around uploading photos for "donate" functions, I got confused and somehow change the path/to as "/themes/next/source/images". Something may have generated because of the mistake and now my whole blog just went blank.

Actual behavior

Now my blog looks like this:https://janegao011919.github.io/Jtalks.github.io/2018/05/17/hello-world/

Something may have generated because of the mistake and now my whole blog just went blank. Figured that might be the problem from information after $ hexo s --debug

``svg 10:50:30.538 DEBUG Generator: page 10:50:30.538 DEBUG Generator: post 10:50:30.538 DEBUG Generator: category 10:50:30.538 DEBUG Generator: archive 10:50:30.538 DEBUG Generator: index 10:50:30.538 DEBUG Generator: feed 10:50:30.538 DEBUG Generator: tag 10:50:30.540 DEBUG Generator: asset 10:50:30.547 WARN ============================================================= == 10:50:30.547 WARN ========================= ATTENTION! ======================== == 10:50:30.547 WARN ============================================================= == 10:50:30.547 WARN NexT repository is moving here: https://github.com/theme-nex t 10:50:30.548 WARN ============================================================= == 10:50:30.548 WARN It's rebase to v6.0.0 and future maintenance will resume the re 10:50:30.548 WARN ============================================================= == 10:50:30.550 INFO Hexo is running at http://localhost:4000/Jtalks.github.io/. P ress Ctrl+C to stop. 10:50:30.564 DEBUG Database saved 10:50:36.668 DEBUG Rendering archive: archives/index.html Unhandled rejection Error: ENOENT: no such file or directory, open 'D:\软件\My R epository{Jtalks}\themes\next\layout_scripts\schemes.swig' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.ret.load (D:\软件\My Repository{Jtalks}\node_modules\swig-templat es\lib\loaders\filesystem.js:55:15) at exports.Swig.compileFile (D:\软件\My Repository{Jtalks}\node_modules\swi g-templates\lib\swig.js:694:31) at Object.eval [as tpl] (eval at precompile (D:\软件\My Repository{Jtalks}\ node_modules\swig-templates\lib\swig.js:497:13), :476:18) at compiled (D:\软件\My Repository{Jtalks}\node_modules\swig-templates\lib\ swig.js:618:18) at Theme._View.View._compiled.locals [as _compiled] (D:\软件\My Repository{ Jtalks}\node_modules\hexo\lib\theme\view.js:124:48) at Theme._View.View.View.render (D:\软件\My Repository{Jtalks}\node_modules \hexo\lib\theme\view.js:29:15) at route.set (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\hexo\inde x.js:386:29) at tryCatcher (D:\软件\My Repository{Jtalks}\node_modules\bluebird\js\relea se\util.js:16:23) at D:\软件\My Repository{Jtalks}\node_modules\bluebird\js\release\method.js :15:34 at RouteStream._read (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\h exo\router.js:134:3) at RouteStream.Readable.read (_streamreadable.js:442:10) at resume (_stream_readable.js:822:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) GET /Jtalks.github.io/archives/ - - ms - - 10:52:36.675 DEBUG Rendering archive: archives/index.html Unhandled rejection Error: ENOENT: no such file or directory, open 'D:\软件\My Repository{Jtalks}\themes\next\layout_scripts\schemes.swig' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.ret.load (D:\软件\My Repository{Jtalks}\node_modules\swig-templates\lib\loaders\filesystem.js:55:15) at exports.Swig.compileFile (D:\软件\My Repository{Jtalks}\node_modules\swig-templates\lib\swig.js:694:31) at Object.eval [as tpl] (eval at precompile (D:\软件\My Repository{Jtalks}\node_modules\swig-templates\lib\swig.js:497:13), :476:18) at compiled (D:\软件\My Repository{Jtalks}\node_modules\swig-templates\lib\swig.js:618:18) at Theme._View.View._compiled.locals [as _compiled] (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\theme\view.js:124:48) at Theme._View.View.View.render (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\theme\view.js:29:15) at route.set (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\hexo\index.js:386:29) at tryCatcher (D:\软件\My Repository{Jtalks}\node_modules\bluebird\js\release\util.js:16:23) at D:\软件\My Repository{Jtalks}\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\hexo\router.js:134:3) at RouteStream.Readable.read (_streamreadable.js:442:10) at resume (_stream_readable.js:822:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) GET /Jtalks.github.io/archives/ - - ms - - 10:54:36.676 DEBUG Rendering archive: archives/index.html Unhandled rejection Error: ENOENT: no such file or directory, open 'D:\软件\My Repository{Jtalks}\themes\next\layout_scripts\schemes.swig' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.ret.load (D:\软件\My Repository{Jtalks}\node_modules\swig-templates\lib\loaders\filesystem.js:55:15) at exports.Swig.compileFile (D:\软件\My Repository{Jtalks}\node_modules\swig-templates\lib\swig.js:694:31) at Object.eval [as tpl] (eval at precompile (D:\软件\My Repository{Jtalks}\node_modules\swig-templates\lib\swig.js:497:13), :476:18) at compiled (D:\软件\My Repository{Jtalks}\node_modules\swig-templates\lib\swig.js:618:18) at Theme._View.View._compiled.locals [as _compiled] (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\theme\view.js:124:48) at Theme._View.View.View.render (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\theme\view.js:29:15) at route.set (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\hexo\index.js:386:29) at tryCatcher (D:\软件\My Repository{Jtalks}\node_modules\bluebird\js\release\util.js:16:23) at D:\软件\My Repository{Jtalks}\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (D:\软件\My Repository{Jtalks}\node_modules\hexo\lib\hexo\router.js:134:3) at RouteStream.Readable.read (_streamreadable.js:442:10) at resume (_stream_readable.js:822:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) 10:55:51.852 INFO See you again 10:55:51.911 DEBUG Database saved

Steps to reproduce the behavior

  1. First,I followed the doc from http://theme-next.iissnan.com/theme-settings.html to customize until "donate" and " Wechat Subscriber" function. Couldn't show the photos on my blog. Added photos to D:\软件\My Repository{Jtalks}\themes\next\source\images and D:\软件\My Repository{Jtalks}\source\uploads `# Wechat Subscriber wechat_subscriber: enabled: true qcode: /uploads/wechat-qcode.jpg description: 欢迎扫一扫,订阅我的公众号! Subscribe to my blog by scanning my public wechat account:)

Reward

reward_comment: wechatpay: /images/wechatpay.jpg alipay: /images/alipay.jpg `

  1. Then I tried to add the wechat subscriber function. Added folder uploads to source folder under blog: D:\软件\My Repository{Jtalks}\source\uploads. #Reward reward_comment: wechatpay: /themes/next/source/images/wechatpay.jpg alipay: /themes/next/source/images/alipay.jpg

  2. None of the pictures was shown on my blog. So I got "creative" and tried changing the "path/to" as "/themes/next/source/images" ` Reward reward_comment: wechatpay: //themes/next/source/images/wechatpay.jpg alipay: //themes/next/source/images/alipay.jpg

    bitcoin: /images/bitcoin.png`

    `

  3. After that didn't work. And my blog went blank. Tried $ hexo s --debug: svg 10:50:30.538 DEBUG Generator: page 10:50:30.538 DEBUG Generator: post 10:50:30.538 DEBUG Generator: category 10:50:30.538 DEBUG Generator: archive 10:50:30.538 DEBUG Generator: index 10:50:30.538 DEBUG Generator: feed 10:50:30.538 DEBUG Generator: tag 10:50:30.540 DEBUG Generator: asset 10:50:30.547 WARN ============================================================= == 10:50:30.547 WARN ========================= ATTENTION! ======================== == 10:50:30.547 WARN ============================================================= == 10:50:30.547 WARN NexT repository is moving here: https://github.com/theme-nex t 10:50:30.548 WARN ============================================================= == 10:50:30.548 WARN It's rebase to v6.0.0 and future maintenance will resume the re 10:50:30.548 WARN ============================================================= == 10:50:30.550 INFO Hexo is running at http://localhost:4000/Jtalks.github.io/. P ress Ctrl+C to stop. 10:50:30.564 DEBUG Database saved 10:50:36.668 DEBUG Rendering archive: archives/index.html Unhandled rejection Error: ENOENT: no such file or directory, open 'D:\软件\My R epository\{Jtalks}\themes\next\layout\_scripts\schemes\.swig' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.ret.load (D:\软件\My Repository\{Jtalks}\node_modules\swig-templat es\lib\loaders\filesystem.js:55:15) at exports.Swig.compileFile (D:\软件\My Repository\{Jtalks}\node_modules\swi g-templates\lib\swig.js:694:31) at Object.eval [as tpl] (eval at precompile (D:\软件\My Repository\{Jtalks}\ node_modules\swig-templates\lib\swig.js:497:13), <anonymous>:476:18) at compiled (D:\软件\My Repository\{Jtalks}\node_modules\swig-templates\lib\ swig.js:618:18) at Theme._View.View._compiled.locals [as _compiled] (D:\软件\My Repository\{ Jtalks}\node_modules\hexo\lib\theme\view.js:124:48) at Theme._View.View.View.render (D:\软件\My Repository\{Jtalks}\node_modules \hexo\lib\theme\view.js:29:15) at route.set (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\hexo\inde x.js:386:29) at tryCatcher (D:\软件\My Repository\{Jtalks}\node_modules\bluebird\js\relea se\util.js:16:23) at D:\软件\My Repository\{Jtalks}\node_modules\bluebird\js\release\method.js :15:34 at RouteStream._read (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\h exo\router.js:134:3) at RouteStream.Readable.read (_stream_readable.js:442:10) at resume_ (_stream_readable.js:822:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) GET /Jtalks.github.io/archives/ - - ms - - 10:52:36.675 DEBUG Rendering archive: archives/index.html Unhandled rejection Error: ENOENT: no such file or directory, open 'D:\软件\My Repository\{Jtalks}\themes\next\layout\_scripts\schemes\.swig' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.ret.load (D:\软件\My Repository\{Jtalks}\node_modules\swig-templates\lib\loaders\filesystem.js:55:15) at exports.Swig.compileFile (D:\软件\My Repository\{Jtalks}\node_modules\swig-templates\lib\swig.js:694:31) at Object.eval [as tpl] (eval at precompile (D:\软件\My Repository\{Jtalks}\node_modules\swig-templates\lib\swig.js:497:13), <anonymous>:476:18) at compiled (D:\软件\My Repository\{Jtalks}\node_modules\swig-templates\lib\swig.js:618:18) at Theme._View.View._compiled.locals [as _compiled] (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\theme\view.js:124:48) at Theme._View.View.View.render (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\theme\view.js:29:15) at route.set (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\hexo\index.js:386:29) at tryCatcher (D:\软件\My Repository\{Jtalks}\node_modules\bluebird\js\release\util.js:16:23) at D:\软件\My Repository\{Jtalks}\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\hexo\router.js:134:3) at RouteStream.Readable.read (_stream_readable.js:442:10) at resume_ (_stream_readable.js:822:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) GET /Jtalks.github.io/archives/ - - ms - - 10:54:36.676 DEBUG Rendering archive: archives/index.html Unhandled rejection Error: ENOENT: no such file or directory, open 'D:\软件\My Repository\{Jtalks}\themes\next\layout\_scripts\schemes\.swig' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.ret.load (D:\软件\My Repository\{Jtalks}\node_modules\swig-templates\lib\loaders\filesystem.js:55:15) at exports.Swig.compileFile (D:\软件\My Repository\{Jtalks}\node_modules\swig-templates\lib\swig.js:694:31) at Object.eval [as tpl] (eval at precompile (D:\软件\My Repository\{Jtalks}\node_modules\swig-templates\lib\swig.js:497:13), <anonymous>:476:18) at compiled (D:\软件\My Repository\{Jtalks}\node_modules\swig-templates\lib\swig.js:618:18) at Theme._View.View._compiled.locals [as _compiled] (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\theme\view.js:124:48) at Theme._View.View.View.render (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\theme\view.js:29:15) at route.set (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\hexo\index.js:386:29) at tryCatcher (D:\软件\My Repository\{Jtalks}\node_modules\bluebird\js\release\util.js:16:23) at D:\软件\My Repository\{Jtalks}\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (D:\软件\My Repository\{Jtalks}\node_modules\hexo\lib\hexo\router.js:134:3) at RouteStream.Readable.read (_stream_readable.js:442:10) at resume_ (_stream_readable.js:822:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) 10:55:51.852 INFO See you again 10:55:51.911 DEBUG Database saved

  4. Some clues I found according to the results above: Unhandled rejection Error: ENOENT: no such file or directory, open 'D:\软件\My R epository\{Jtalks}\themes\next\layout\_scripts\schemes\.swig'

  5. I know my workflow is a mess. Really appreciate if you could give me some advice. I read the 《Pro Git》file several times. But since the Hexo and the theme file NexT are all frameworks with their own commands. It's hard to figure which file to"$ git add" exactly. So I just $ hexo clean $ hexo g $ hexo s --debug $ hexo d every time. Sometimes after $ hexo s, the page doesn't work on localhost, but $ hexo d works. So I just got careless and my blog is down.

Node.js and NPM Information

$ node -v
v8.11.2

$ npm -v 5.6.0

Package dependencies Information

$ cat package.json
{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.7.1"
  },
  "dependencies": {
    "hexo": "^3.2.0",
    "hexo-asset-image": "0.0.3",
    "hexo-deployer-git": "^0.3.1",
    "hexo-generator-archive": "^0.1.4",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-feed": "^1.2.2",
    "hexo-generator-index": "^0.2.0",
    "hexo-generator-tag": "^0.2.0",
    "hexo-renderer-ejs": "^0.3.0",
    "hexo-renderer-marked": "^0.3.0",
    "hexo-renderer-stylus": "^0.3.1",
    "hexo-server": "^0.2.0",
    "hexo-wordcount": "^3.0.2"
  }
}

Hexo Information

Hexo version

$ hexo -v
hexo: 3.7.1
hexo-cli: 1.1.0
os: Windows_NT 10.0.16299 win32 x64
http_parser: 2.8.0
node: 8.11.2
v8: 6.2.414.54
uv: 1.19.1
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.29.0
napi: 3
openssl: 1.0.2o
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c

Hexo Configuration

# Site
title: Jtalks
subtitle: 简聊
description: 
keywords:
author: Jane Gao
language: zh-Hans
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://janegao011919.github.io/Jtalks.github.io 
root: /Jtalks.github.io/
permalink: :year/:month/:day/: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:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
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:

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

# 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: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: https://github.com/Janegao011919/Jtalks.github.io.git
  branch: master

NexT Information

NexT Version:

NexT Scheme:

NexT Configuration:

footer:
  # Specify the date when the site was setup.
  # If not defined, current year will be used.
  since: 2018

# If not defined, will be used `author` from Hexo main config.
  copyright:
  # -------------------------------------------------------------
  # Hexo link (Powered by Hexo).
  powered: true

menu:
  home: / || home
  about: /about/ || user
  tags: /tags/ || tags
  categories: /categories/ || th
  archives: /archives/ || archive
  #schedule: /schedule/ || calendar
  #sitemap: /sitemap.xml || sitemap
  commonweal: /404/ || heartbeat

# Schemes
#scheme: Muse
scheme: Mist
#scheme: Pisces
#scheme: Gemini

social:
  GitHub: https://github.com/janegao011919 || github
  #E-Mail: mailto:yourname@gmail.com || envelope
  #Google: https://plus.google.com/yourname || google
  Twitter: https://twitter.com/janegao0119 || twitter
  #FB Page: https://www.facebook.com/yourname || facebook
  #VK Group: https://vk.com/yourname || vk
  #StackOverflow: https://stackoverflow.com/yourname || stack-overflow
  YouTube: https://youtube.com/Jane Gao || youtube
  Instagram: https://instagram.com/janegao0119 || instagram
  #Skype: skype:yourname?call|chat || skype
  #微博: http://weibo.com/用户名
  #知乎: http://www.zhihu.com/people/your-user-name
  #豆瓣: http://douban.com/people/your-user-name

sidebar:
  # Sidebar Position, available value: left | right (only for Pisces | Gemini).
  position: left
  #position: right

# Automatically Excerpt. Not recommend.
# Please use <!-- more --> in the post to control excerpt accurately.
# auto_excerpt:
  enable: false
  length: 150

# Post meta display settings
post_meta:
  item_text: true
  created_at: true
  updated_at: false
  categories: true

# Post wordcount display settings
# Dependencies: https://github.com/willin/hexo-wordcount
post_wordcount:
  item_text: true
  wordcount: true
  min2read: false
  totalcount: true
  separated_meta: true

# Wechat Subscriber
wechat_subscriber:
  enabled: true
  qcode: /uploads/wechat-qcode.jpg
  description: 欢迎扫一扫,订阅我的公众号! Subscribe to my blog by scanning my public wechat account:)

# Reward
reward_comment: 饱暖思开源,请我喝杯咖啡吧~喵~~
wechatpay: /uploads/wechatpay.jpg
alipay: /uploads/alipay.jpg
#bitcoin: /images/bitcoin.png

# Declare license on posts
post_copyright:
  enable: true
  license: CC BY-NC-SA 3.0
  license_url: https://creativecommons.org/licenses/by-nc-sa/3.0/

# Show number of visitors to each article.
# You can visit https://leancloud.cn get AppID and AppKey.
leancloud_visitors:
  enable: true
  app_id: PzQlXGNzOrdr1O7fgd5olEgQ-gzGzoHsz
  app_key: zOkfPiGlTCnCEM2L5h6drIK9

Other Information

sli1989 commented 6 years ago

try to this folder: hexo\source\uploads and hexo\source\images? V6 is available. You can also try to upgrade it.

Janegao011919 commented 6 years ago

@sli1989 Thank you ~ I will try that.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.