From 408b08ddec3e96fb7aa48fd86d89c288b75269d0 Mon Sep 17 00:00:00 2001 From: ailoooong Date: Fri, 25 Apr 2025 17:34:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8D=9A=E5=AE=A2=E6=8C=87=E5=8D=97?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/en/blogs/guidance/index.md | 94 ++++++++++++++++++++++++++++++++++ app/zh/blogs/guidance/index.md | 88 +++++++++++++++---------------- 2 files changed, 139 insertions(+), 43 deletions(-) create mode 100644 app/en/blogs/guidance/index.md diff --git a/app/en/blogs/guidance/index.md b/app/en/blogs/guidance/index.md new file mode 100644 index 00000000..9a4efcba --- /dev/null +++ b/app/en/blogs/guidance/index.md @@ -0,0 +1,94 @@ +--- +title: 'Guidance to Post a Blog' +category: 'blog' +--- + +## Preparation + +- Refer to to register GitCode account. + +- et your primary mail box in GitCode settings . + +- Sign your CLA in . + +- Prepare your git environment refering to . + +## Understand blog format + +The openGauss blog is written in markdown format. You can read to get understand how the blog is designed. + +The head includes the following information: + +``` +--- +title: 'Sample Post' +date: '2020-03-03' +category: 'blog' +tags: ['openGauss'] +archives: '2020-03' +author: 'openGaussBlog 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 to your folder and edit it. + +## Post your blog + +The blog posting follows the pull request of GitCode. + +- Fork openGauss blog project to your own GitCode. Refer to for detailed guidance. + +- Clone the code to your local environment. + + ``` + git clone https://gitcode.com//openGauss-blog + ``` + +- Create a branch + + ``` + git checkout -b + ``` + +- Create a folder in the website floder If you are going to post a blog in English, the app/en/blog is your work path. + + And if you are going to post a blog in Chinese, the app/zh/blog is your work path. + + Assume that you are preparing an English blog. + + ``` + cd app/en/blogs + mkdir + cd + 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 + ``` + +- Commit your post + + ``` + git add + git commit -m "" + git push origin : + ``` + +- Refer to to submit your Pull Request + +- Wait for reviewing and merging. diff --git a/app/zh/blogs/guidance/index.md b/app/zh/blogs/guidance/index.md index d61b83ef..a5946c77 100644 --- a/app/zh/blogs/guidance/index.md +++ b/app/zh/blogs/guidance/index.md @@ -9,13 +9,13 @@ category: 'blog' ## 准备 -1. 参考 注册 Gitee 账号。 +1. 参考 注册 GitCode 账号。 -2. 在 Gitee 个人设置中设置主邮箱地址,在此 。 +2. 在 GitCode 个人设置中设置主邮箱地址,在此 。 3. 签署贡献者协议,。 -4. 参考 准备你的 git 环境。 +4. 参考 准备你的 git 环境。 ## 理解博客格式 @@ -37,7 +37,7 @@ summary: 'Just about everything you'll need to style in the theme:headings, pa Here you can edit your blog. ``` -小提示:你可以复制 [https://gitee.com/opengauss/blog/blob/v2/app/zh/blogs/blog_example/20220901-sample-post.md](https://gitee.com/opengauss/blog/blob/v2/app/zh/blogs/blog_example/20220901-sample-post.md) 到你的工作路径下然后继续编辑。 +小提示:你可以复制 [https://gitcode.com/opengauss/blog/blob/v2/app/zh/blogs/blog_example/20220901-sample-post.md](https://gitcode.com/opengauss/blog/blob/v2/app/zh/blogs/blog_example/20220901-sample-post.md) 到你的工作路径下然后继续编辑。 ### 关于格式 @@ -52,63 +52,65 @@ Here you can edit your blog. ## 提交博客 -博客的提交利用了 Gitee 的 PR(Pull Request)。 +博客的提交利用了 GitCode 的 PR(Pull Request)。 -1. Fork openGauss 博客项目 到你自己的 Gitee 上。如果需要具体指导请参考 。 +1. Fork openGauss 博客项目 到你自己的 GitCode 上。如果需要具体指导请参考 。 2. Clone 代码 -``` -git clone https://gitee.com//openGauss-blog -``` + ``` + git clone https://gitcode.com//openGauss-blog + ``` 3. 创建分支 -``` -git checkout -b -``` + ``` + git checkout -b + ``` 4. 创建工作路径 -如果你发表中文博客,工作路径是 `app/zh/blogs` 。 -假设你要写一个中文博客: + 如果你发表中文博客,工作路径是 `app/zh/blogs` 。 + 假设你要写一个中文博客: -``` -cd app/zh/blogs -mkdir -cd -touch YEAR-MONTH-DAY-title.md -``` + ``` + cd app/zh/blogs + mkdir + cd + touch YEAR-MONTH-DAY-title.md + ``` -你可以以你的 md 文档名来命名你的资源文件,方便使用。例如: + 你可以以你的 md 文档名来命名你的资源文件,方便使用。例如: -``` -YEAR-MONTH-DAY-title-NN.MARKUP -``` + ``` + YEAR-MONTH-DAY-title-NN.MARKUP + ``` -其中,YEAR, MONTH, DAY, 和 title 和你的博客 md 文件名一致。NN 是 01、02、03 这样的序号。MARKUP 文件扩展名。如下例子: + 其中,YEAR, MONTH, DAY, 和 title 和你的博客 md 文件名一致。NN 是 01、02、03 这样的序号。MARKUP 文件扩展名。如下例子: -``` -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 -``` + ``` + 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 + ``` -使用 HTML \ 标签嵌入图片, 但你的图片资源需要放入当前目录下(即 your-gitee-id 目录下),输入图片名称作为 src 值: + 你可以使用如下代码来生成这些文件: -``` - -``` + 使用 HTML \ 标签嵌入图片, 但你的图片资源需要放入当前目录下(即 your-gitcode-id 目录下),输入图片名称作为 src 值: -1. Commit 你的博客 + ``` + + ``` -``` -git add -git commit -m "" -git push origin : -``` +5. Commit 你的博客 + + ``` + git add + git commit -m "" + git push origin : + ``` -2. 参考 提交你的 PR +6. 参考 提交你的 PR -3. 等待评审和合入。 +7. 等待评审和合入。 -- Gitee