theme-next / hexo-theme-next

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

A page that loads in local environment gives a 404 error in deploy / 本地正常的页面deploy后是404 #1318

Closed ericazz17 closed 4 years ago

ericazz17 commented 4 years ago

Please check if your Issue fulfills the following requirements. If you refuse to fill out the following information in accordance with the template, we may close your issue without conducting an investigation. 请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。如果您拒绝根据模板填写以下信息,我们可能会在不进行调查的情况下关闭您的 Issue。

Issue Checklist


Expected behavior

Under "Resume" in the main menu, the resume page loads in local host, but no matter how many times I clean+generate+deploy, the deployed page on GitHub.io would be a 404 error; however all the other pages (Project, Journal) are normal under the exact same set up.

在菜单的Resume页面,本地是可以运行的,但是一旦用github.io的链接打开,Resume页面就是404;但是其他用完全相同的设置的页面Project, Journal都没问题;不明白为什么就单单这一个页面404。 (PL, ML, Algo 我还没设置好,可以先不管) menu: home: / || home Resume: /Resume/ || user Projects: /Projects/ || laptop Algo: /categories/Algo/ || th PL: /categories/PL/ || product-hunt ML: /categories/ML/ || coffee Journal: /categories/Journal/ || heart

My folder names are Resume, Projects, ML, PL, Algo etc.. respectively.

Inside the index.md file it's just

title: Resume date: 2019-12-13 23:50:16

Actual behavior

Steps to reproduce the behavior

  1. Open https://ericazhang17.github.io
  2. Resume page in menu gives 404 error
  3. N/A

Environment Information

Node.js and NPM Information

v10.16.3

6.13.2

Package dependencies Information

hexo-site@0.0.0 /Users/Erica/myblog
├── hexo@4.1.1
├── hexo-asset-image@0.0.5 (git+https://github.com/CodeFalling/hexo-asset-image.git#3c114cf0c0343ab28469635085b225fcae7fb9d3)
├── hexo-deployer-git@2.1.0
├── hexo-generator-archive@1.0.0
├── hexo-generator-category@1.0.0
├── hexo-generator-index@1.0.0
├── hexo-generator-tag@1.0.0
├── hexo-helper-live2d@3.1.1
├── hexo-renderer-ejs@1.0.0
├── hexo-renderer-marked@2.0.0
├── hexo-renderer-stylus@1.1.0
├── hexo-server@1.0.0
├── hexo-symbols-count-time@0.7.0
├── hexo-wordcount@6.0.1
├── live2d-widget-model-hijiki@1.0.5
└── live2d-widget-model-tororo@1.0.5

Hexo Configuration

Hexo Configuration

Docs: https://hexo.io/docs/configuration.html

Source: https://github.com/hexojs/hexo/

Site

title: Erica's Notes subtitle: Active Learning description: '' keywords: author: Erica Zhang language: en timezone: ''

URL

If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'

url: http://yoursite.com root: / 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

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

Use post's date for updated date unless set in front-matter

use_date_for_updated: false

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

live2d: enable: true scriptFrom: local pluginRootPath: live2dw/ pluginJsPath: lib/ pluginModelPath: assets/ tagMode: false debug: false model: use: live2d-widget-model-tororo display: position: right width: 150 height: 300 mobile: show: true react: opacity: 1

symbols_count_time: symbols: true time: true total_symbols: true total_time: true exclude_codeblock: false

Deployment

Docs: https://hexo.io/docs/deployment.html

deploy: type: git repository: https://github.com/ericazhang17/ericazhang17.github.io.git branch: master

NexT Configuration

scheme: Mist

menu: home: / || home Resume: /Resume/ || user Projects: /Projects/ || laptop Algo: /categories/Algo/ || th PL: /categories/PL/ || product-hunt ML: /categories/ML/ || coffee Journal: /categories/Journal/ || heart

toc: enable: false

Other Information

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label Bug to this issue, with a confidence of 0.80. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

ericazz17 commented 4 years ago

已自行解决!

chinobing commented 4 years ago

已自行解决!

请问你是如何解决的?我也遇到了一模一样的问题,升级了hexo和next到最新版都不行。