如何在没有本地安装Jekyll的情况下向github页面添加新帖

如何在没有本地安装Jekyll的情况下向github页面添加新帖

本文介绍了如何在没有本地安装Jekyll的情况下向github页面添加新帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在github上使用,现在我想添加新帖子。我添加了 _posts 文件夹,并放置了名为2015-04-05-post-name.md的文件。然后我将所有更改都推送到github上进行回购。新页面变得可用,但它不被设计为index.html。



我做错了什么?我试图达到的目的是能够添加用markdown编写的新帖子,但不在我的电脑上安装jekyll。所有新帖子应根据博客的整体风格来看。



文件内容如下所示:



<$ p $测试标题
---

#第一篇文章标题

一些文字在这里。


解决方案

最小和板岩)没有单独的后布局,只有一个默认布局。因为您已经指定 layout:post (根据Jekyll文档的指示),Jekyll正在试图找到一个并放弃。 完全移除布局线,它会正确回退到默认样式。您不必创建或编辑布局。


I created blog on github for a project using automatic generator and now I want to add new post. I added _posts folder and put file named 2015-04-05-post-name.md. Then I pushed all changes to repo on github. New page became available however it is not styled as index.html.

What do I do wrong? What I'm trying to achive is to be able to add new posts written in markdown but without installing jekyll on my pc. All new posts should look according to the overall style of blog.

Content of file looks like:

---
layout: post
title: Test Title
---

# First Post Header

Some text goes here.
解决方案

The provided themes (at least the two I tried, Minimal and Slate) don't have a separate "post" layout, just one "default" layout. Because you've specified layout: post (as instructed by the Jekyll docs), Jekyll is trying to find one and giving up. Remove the layout line entirely and it will fall back, correctly, to the default style. You don't have to create or edit a layout.

这篇关于如何在没有本地安装Jekyll的情况下向github页面添加新帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 14:09