提交 50a59891 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!11 Update the guidance to post a blog according to the new design

Merge pull request !11 from Fred_Li/guidance
+++
title = "Post a blog"
title = "Guidance to Post a Blog"
+++
## 前期准备
1. 注册码云账号,请参考[http://git.mydoc.io/?t=179267](http://git.mydoc.io/?t=179267)
2. 设置主邮箱,进入邮箱页面[https://gitee.com/profile/emails](https://gitee.com/profile/emails)配置个人主邮箱。
3. 签署CLA,进入CLA签署页面[https://openeuler.org/zh/cla.html](https://openeuler.org/zh/cla.html),填写必填信息签署CLA。
4. 准备GIT环境,详细参见:[http://git.mydoc.io/?t=180692](http://git.mydoc.io/?t=180692)
## 编写博客内容
## Preparation
博客采用MD(markdown)格式编写、组织内容,博客内容由两部分组成,博客描述信息和博客内容,其中博客描述信息包含如下几部分:
- banner: 一个用于呈现博客内容简要的图片,这个图片将会在博客列表中显示出来。
- title: 博客标题。
- summary: 博客内容的精简描述。
- author: 该博客的作者。
- tags: 博客的标签
- archives: 该博客发布的年月份,用于首页上的分类显示。
- date: 博客发布日期。
1. Refer to <http://git.mydoc.io/?t=179267> to register Gitee account.
样例如下:
2. Set your primary mail box in gitee settings <https://gitee.com/profile/emails>.
3. Sign your CLA in <https://openeuler.org/zh/cla.html>.
4. Prepare your git environment refering to <http://git.mydoc.io/?t=180692>.
## Understand blog format
The openEuler blog is written in markdown format.
You can read <https://gitee.com/openeuler/blog/blob/master/design/content_posts.md> to get understand how the blog is designed.
The head includes the following information:
```
+++
banner = "img/banners/banner-1.jpg"
title = "openEuler 线下活动介绍"
date = "2019-10-10"
tags = ["meetup"]
archives = "2019.10"
author = "user1"
summary = "openEuler第一次线下活动将在北京举行。"
title = "Sample Post"
date = "2020-03-03"
tags = ["Sample", "ABC", "cccc"]
archives = "2020-03"
author = "openEuler Blog Maintainer"
summary = "Just about everything you'll need to style in the theme: headings, paragraphs, blockquotes, tables, code blocks, and more."
+++
此处为博客内容.
Here you can edit your blog.
```
## 上传博客
Tips: you can copy content/_example/2020-03-03-sample-post.md to your folder and edit it.
## Post your blog
The blog posting follows the pull request of [Gitee](gitee.com).
1. Fork openEuler blog project <https://gitee.com/openeuler/blog> to your own gitee. Refer to <http://git.mydoc.io/?t=153749> for detailed guidance.
博客系统采用码云的PR模式上传(提交)博客,步骤如下:
1. Fork 博客工程[https://gitee.com/openeuler/blog](https://gitee.com/openeuler/blog), Fork方法参见[http://git.mydoc.io/?t=153749](http://git.mydoc.io/?t=153749)
2. 使用git,在本地机器上clone 码云上fork出来的工程。
2. Clone the code to your local environment.
```
git clone https://gitee.com/<your-id>/blog
git clone https://gitee.com/<your-gitee-id>/blog
```
4. 创建git分支
4. Create a branch
```
git checkout -b <branch-name>
```
6. 将博客内容放置在content\post目录下。
7. 保存到git并提交到码云
5. Create a folder in the blog floder
```
cd content\post
mkdir <your-gitee-id>
cd <your-gitee-id>
touch YEAR-MONTH-DAY-title.md
```
And You can put the resources in the same folder as your text file's, and name the resources as
```
YEAR-MONTH-DAY-title-NN.MARKUP
```
Where the YEAR, MONTH, DAY, and title are the same as your blog file, and NN is the serial number of the pictures, like 01, 02 and so on. The MARKUP is the file extension, and for pictures it is recommended to use png.
The following are one example.
```
2020-01-01-new-years-is-coming.md
2020-01-01-new-years-is-coming-01.png
2020-01-01-new-years-is-coming-02.gif
2020-01-01-new-years-is-coming-03.pdf
```
6. Commit your post
```
git add <file-path>
......@@ -60,6 +82,6 @@ git commit -m "<message>"
git push origin <branch-name>:<branch-name>
```
8. 创建PR,详细参见[http://git.mydoc.io/?t=153749](http://git.mydoc.io/?t=153749)
7. Refer to <http://git.mydoc.io/?t=153749> to submit your Pull Request
--
\ No newline at end of file
8. Wait for reviewing and merging.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册