gitlab上的fork jekyll不起作用 - 显示404页
我正在使用Jekyll创建一个新的项目模板。新项目模板>选择Jekyll。
但是,当我运行CI/CD构建以服务页面时,
- CSS页面有点混乱
- 当我单击Jekyll帖子时,
,如下所示。网站上没有任何进一步的说明:我已经删除了叉子关系并按照指示启用了跑步者。 https://gitlab.com/pages/jekyll
有什么想法吗?
I am creating a new project template using Jekyll by doing > new project template > choose Jekyll.
However, when I run the CI/CD build to serve the pages
- the CSS pages are kinda messed up
- When I click on the Jekyll post it shows a 404 like below.
There aren't any further instructions in the site: I have already removed the fork relationship and enabled runners as per instructed. https://gitlab.com/pages/jekyll
Any idea why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请确保您正确设置
url
和baseurl
configs在_Config.yml
文件中。URL
带有架构前缀的域名。例如:https://example.com
。baseurl
是指应在此处提供网站的子路径。它应该以/
开始。例如:/blog
,/docs
等
。在这种情况下,它将变为
https://example.com/blog
。但是,如果您使用的是自定义主题,则需要确保进行某些修复程序。
例如,如果您在不使用baseurl和URL的情况下引用资产,则需要修复它。
应成为
如果子路径更改,
使用
baseurl
属性。同样,< link>
in< head>
:在将托管在Github的根域上的站点移动到GitHub的一个站点时,将
其工作起来,转到测试GitLab环境子路径。
如果您使用市场上的主题,那么可以已经配置了此内容,并且您可以使用
url
和baseurl
config _config.yml config >。Please make sure you are correctly setting up
url
andbaseurl
configs in the_config.yml
file.The
url
refers to the domain name with schema prefix. For example:https://example.com
.The
baseurl
refers to the sub-path from where your site should be served. It should start with/
. For example:/blog
,/docs
, etc._config.yml
This lets the theme know where you want to serve the site from. In this case it becomes
https://example.com/blog
.But if you are using a custom theme, you need to make sure you do certain fixes.
For example, if you are referencing assets without using baseurl and url you need to fix it.
should become
to utilise the
baseurl
property if the sub-path changes.Similarly,
<link>
in<head>
:becomes
This worked for me while moving a site hosted on a root domain at GitHub, to a test GitLab environment on a sub-path.
If you use a theme from the marketplace then this thing could already be configured and you can go ahead just with
url
andbaseurl
config in_config.yml
.