Jekyll new article tutorial, master how to write articles and make your words fly!

🚀💡 Jekyll新建文章教程带你掌握写作技巧,让你的文字飞起,成为内容王者!从今天起,用创意征服世界!📝✨

Jekyll is a simple, blog-style framework for building static websites.

it uses Markdown and Liquid template language, allowing you to easily create beautiful, dynamic websites.

Jekyll new article tutorial, master how to write articles and make your words fly!

How to create a new article in Jekyll?

Here are the steps on how to use Jekyll to write articles:

1. Create a new article file

In your Jekyll website folder, create a new Markdown file whose name should end with .md end.

Posts folder

This one_postsThe folder is where your blog posts are stored. You use Markdown to create posts, but HTML is also supported.

To create an article post, just start with .md add the ending file to your_postsdirectory, the format is as follows:

YEAR-MONTH-DAY-title.MARKUP

Among them, YEAR is a four-digit number, MONTH and DAY are both two-digit numbers, and MARKUP is a file extension that indicates the format used in the file. For example, the following are examples of valid post filenames:

2011-12-31-new-years-eve-is-awesome.md
2012-09-12-how-to-write-a-blog.md
  • All blog post files must begin with a preamble that sets the layout or other metadata.

2. Add article content

Add your article content using Markdown syntax.

You can use Markdown to format text, add images, create lists, and more...

3. Add article metadata

At the top of the article, add the YAML prefix.

The prefix contains information about your article, such as title, author, and date.

Here is a sample article:

---
layout: post
title: 我的第一篇文章
author: 陈沩亮
date: 2024-4-12
---

# 这是一些文本

## 这是一个标题

![这是一个图像](https://www.example.com/image.jpg)

* 这是一个列表项
* 这是另一个列表项

这是一个链接:[https://www.example.com/](https://www.example.com/)
  • Please use the code with caution.

4. Preview your article

使用 jekyll serve command to start the Jekyll server.

访问 http://localhost:4000/your-article.md to view your article.

5. Structure your article

使用 jekyll build command to build your website.

The constructed article will be located at _site/your-article.html in the file.

Click the link below to learn how to use Jekyll to automatically generate articles, making updating your blog a breeze ▼

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Jekyll New Article Tutorial, master how to write articles and make your words fly!" 》, helpful to you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-31585.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top