在新创建的 Jekyll 站点上某些页面返回 404

问题描述 投票:0回答:1

我刚刚重构了我的静态网站以使用 Jekyll。 我的代码位于

master
,我使用自定义操作来生成网站并使用
peaceiris/actions-gh-pages@v4
发布它。这是我的工作流程文件:https://github.com/asafd1/asafd1.github.io/actions/runs/10999824198/workflow

文件似乎已正确推送到

gh-pages
分支。

我也在使用自定义域,但我认为它不相关。

我的问题是**某些页面可以工作,例如:https://asafd1.github.io/index.html,而某些页面返回404,例如:https://asafd1.github。 io/blog.html

我错过了什么?

jekyll github-pages
1个回答
0
投票

您没有 blog.html 文件!如果您想要

/blog.html
然后创建文件 (:

您的文件夹结构也不符合文档。移动文件,使其适合此结构。

.
├── _config.yml
├── _data
│   └── members.yml
├── _drafts
│   ├── begin-with-the-crazy-ideas.md
│   └── on-simplicity-in-technology.md
├── _includes
│   ├── footer.html
│   └── header.html
├── _layouts
│   ├── default.html
│   └── post.html
├── _posts
│   ├── 2007-10-29-why-every-programmer-should-play-nethack.md
│   └── 2009-04-26-barcamp-boston-4-roundup.md
├── _sass
│   ├── _base.scss
│   └── _layout.scss
├── _site
├── .jekyll-cache
│   └── Jekyll
│       └── Cache
│           └── [...]
├── .jekyll-metadata
└── index.html # can also be an 'index.md' with valid front matter
© www.soinside.com 2019 - 2024. All rights reserved.