Blog Posting Guide
Preparation
- Register a GitCode account by referring to https://docs.gitcode.com/docs/start/quick.
- Set the primary email address in GitCode personal settings by visiting https://gitcode.com/setting/email.
- Sign the Contributor License Agreement (CLA) by visiting https://clasign.osinfra.cn/sign/67e7c745ea9ceaa8feb65567.
Understanding the Blog Format
openFuyao blogs are written in Markdown. The file header must contain the following information:
---
title: "Sample Post"
date: 2025-01-01
category: blog
tags:
- Sample A
- Sample B
sig: sig-xxx
archives: 2025-01
author:
- openFuyao 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.About the Format
The site uses the VitePress framework to deliver improved SEO and faster loading speeds, but it also enforces stricter packaging rules. You are advised to read the following rules carefully:
- The name of an .md file cannot contain the plus sign (+).
- The name of a figure cannot contain spaces and is case-sensitive. You are advised to use lowercase letters and hyphens (-). For example, blog-example.png.
<font> </font> <center> </center>have been deprecated and are no longer supported by VitePress. If necessary, use<div align=center> </div>.- HTML tags used in an .md file must be closed, for example,
<div> </div>. - Currently, c ++code blocks are not supported. To display c++ code, do not specify the code block language. Instead, use the default language.
- Code, file paths, key names, and commands in a blog should be wrapped in code blocks.
Submitting a Blog
A blog is submitted by using a GitCode pull request (PR).
Submission Methods
Method 1
For details about how to submit a PR for openFuyao blog project https://gitcode.com/openfuyao/community, visit https://docs.gitcode.com/docs/start/contribute.
Method 2
Forking a project
Fork openFuyao blog project https://gitcode.com/openfuyao/community to your GitCode.
Cloning the project to a local path
Run the following command to clone the project to a local path:
git clone https://gitcode.com/your-gitcode-id/communityCreating a branch
Run the following command to create a branch:
git checkout -b <branch-name>Creating a working path
To post a blog in Chinese whose working path is
zh/content/blog, run the following command to write a Chinese blog:cd zh/content/blog mkdir <your-gitcode-id> cd <your-gitcode-id> touch YEAR-MONTH-DAY-title.mdYou can name your resource file with the name of your MD file for ease of use. Example:
YEAR-MONTH-DAY-title-NN.MARKUPIn the preceding example, YEAR, MONTH, DAY, and title should be the same as those in your blog MD file. NN is a sequence number such as 01, 02, and 03. MARKUP is the file name extension. Example:
2025-01-01-new-years-is-coming.md 2025-01-01-new-years-is-coming-01.png 2025-01-01-new-years-is-coming-02.gif 2025-01-01-new-years-is-coming-03.pdfUse HTML
tags to insert a figure that is stored in the current directory (your-GitCode-id). Enter the figure name as the src value. Example:
<img src = "./2025-01-01-new-years-is-coming-01.png">Committing your blog
git add . git commit -m "<message>" git push origin <branch-name>Creating a PR
Submit your PR by referring to https://docs.gitcode.com/docs/help/home/org_project/pullrequests/pr-create.
Waiting for review and publishing
This article is first published by the openFuyao Community. Reproduction is permitted in accordance with the terms of the CC-BY-SA 4.0 License.
