[英]Cannot use “page” and “post” layouts of Jekyll theme in GitHub pages?
I started experimenting with GitHub pages and Jekyll. 我开始尝试使用GitHub页面和Jekyll。
You can find my repository here: 您可以在这里找到我的存储库:
https://github.com/braek/braek.github.io https://github.com/braek/braek.github.io
And the website you can find here: 您可以在这里找到该网站:
http://www.braek.be http://www.braek.be
I created a post and configured "page" as layout, but the page is not rendered in the Cayman theme that I selected in the GitHub pages settings. 我创建了一个帖子,并将“页面”配置为布局,但是该页面未在我在GitHub页面设置中选择的Cayman主题中呈现。
The same goes for a post with layout set to "post". 布局设置为“ post”的帖子也是如此。
Is this normal? 这正常吗? Do I need to add these templates myself in the _layouts directory?
我需要自己在_layouts目录中添加这些模板吗?
Kind regards, B. 亲切的问候,B.
The Cayman theme does not have a page
layout. Cayman主题没有
page
布局。 It only has a default
layout. 它只有
default
布局。
You have to build the page
layout yourself . 您必须自己构建
page
布局 。
The instructions on how to create new layouts & modify the default one are in the repository of the Cayman theme, copied below for simplicity: 有关如何创建新布局和修改默认布局的说明位于 Cayman主题的存储库中,为简单起见,下面将其复制:
Layouts
布局
If you'd like to change the theme's HTML layout:
如果您想更改主题的HTML布局:
- Copy the original template from the theme's repository
从主题的存储库中复制原始模板
( Pro-tip: click "raw" to make copying easier )( 专业提示:单击“原始”可简化复制 )
- Create a file called
/_layouts/default.html
in your site在您的网站中创建一个名为
/_layouts/default.html
的文件- Paste the default layout content copied in the first step
粘贴第一步中复制的默认布局内容
- Customize the layout as you'd like
根据需要自定义布局
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.