2

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

我想显示一个静态页面,例如about.md,作为主页,并将博客文章移动到一个链接,例如website.com/blog/

4

1 回答 1

4

由于您使用 Minima 作为您网站的主题,因此可以轻松实现您要查找的内容。

第 1 步:添加一个名为blog您网站根目录的新文件夹。

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

---
# This file is at `./blog/index.md`

layout: home
title: Morteza's Blog
---

第 3 步:更改原始./index.md文件以使用page布局。

---
# This file is at `./index.md`

layout: page
title: Landing Page
---

注意:如果您不想维护一个blog目录来存放单个index.md文件,您可以创建一个名为的文件blog.md并将其设置为使用home布局并渲染为blog/index.html

---
# This file is at `./blog.md`

layout: home
title: Morteza's Blog
permalink: /blog/
---
于 2018-04-26T19:39:19.187 回答