使用Jekyll中的静态网页作为主页

时间:2018-04-26 18:21:39

标签: jekyll minima

我使用Jekyll创建了一个默认主题为minima的网站。本网站的主页显示了博客文章。

我想将一个静态页面(如about.md)显示为主页,并将博客帖子移至website.com/blog/等链接。

1 个答案:

答案 0 :(得分:1)

由于您使用Minima作为网站的主题,因此您可以轻松实现所需的目标。

第1步:在您网站的根目录中添加名为file_put_contents("discountsList.txt", ""); file_put_contents("discountsList.txt", serialize($discounts)); if (isset($_POST['leave'])) header("Location: index.html"); else header("Location: admin_dashboard.php?status=completed"); exit(); 的新文件夹。

第2步:在blog目录中创建index.md布局的home页面。

blog

第3步:更改原始--- # This file is at `./blog/index.md` layout: home title: Morteza's Blog --- 文件以使用./index.md布局。

page

注意:如果您不想仅保留--- # This file is at `./index.md` layout: page title: Landing Page --- 目录以容纳单个blog文件,则可以创建名为index.md的文件并设置它使用blog.md布局并渲染到home

blog/index.html