Skip to content

Commit 252316b

Browse files
committed
blog: add how-to-contribute post
Signed-off-by: Ayush <mail@ayuch.dev>
1 parent 522ae1e commit 252316b

File tree

2 files changed

+158
-2
lines changed

2 files changed

+158
-2
lines changed

content/en/blog/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ menu: {main: {weight: 40}}
44
# type: "docs"
55
---
66

7-
This is the **blog** section.
7+
<!-- This is the **blog** section.
88
9-
Files in these directories will be listed in reverse chronological order.
9+
Files in these directories will be listed in reverse chronological order. -->
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
title: "How to Contribute a Blog Post to GITx Documentation"
3+
linkTitle: "Contributing Blog Posts"
4+
date: 2025-10-02
5+
description: "A step-by-step guide on how to write and submit your first blog post to the GITx documentation site."
6+
author: "bakayu"
7+
---
8+
9+
Welcome to the GITx blog! We're excited to have you here and even more excited if you're thinking about contributing your own post. This guide will walk you through the entire process of creating and submitting a blog post to our documentation site.
10+
11+
## What Should You Write About?
12+
13+
We welcome blog posts on any topic related to Git! Here are some ideas to get you started:
14+
15+
- **Git Commands Deep Dive**: Explain a specific Git command in detail (like `git bisect`, `git rebase`, or `git cherry-pick`)
16+
- **Git Workflows**: Share best practices for team collaboration using Git
17+
- **Git History & Fun Facts**: Interesting trivia about Git's development or its creator
18+
- **Personal Stories**: How Git helped you solve a problem or improved your workflow
19+
- **Tips & Tricks**: Lesser-known Git features that make developers more productive
20+
- **Tutorials**: Step-by-step guides for achieving specific tasks with Git
21+
22+
## Step-by-Step: How to Contribute
23+
24+
### 1. Fork the Repository
25+
26+
Start by forking the [`gitxtui/docs`](https://github.com/gitxtui/docs) repository on GitHub. Click the "Fork" button in the top-right corner of the repository page.
27+
28+
```bash
29+
# Clone your forked repository
30+
git clone https://github.com/YOUR_USERNAME/docs.git
31+
cd docs
32+
```
33+
34+
### 2. Create Your Blog Post File
35+
36+
Navigate to the blog directory and create a new Markdown file:
37+
38+
```bash
39+
cd content/en/blog
40+
touch my-awesome-git-post.md
41+
```
42+
43+
Choose a descriptive filename using lowercase letters and hyphens (e.g., `git-rebase-explained.md`, `my-first-git-contribution.md`).
44+
45+
### 3. Add the Front Matter
46+
47+
Every blog post needs front matter at the top. This is metadata that Hugo (our static site generator) uses to organize and display your post. Here's the required format:
48+
49+
```markdown
50+
---
51+
title: "Your Blog Post Title"
52+
linkTitle: "Short Title"
53+
date: 2025-10-02
54+
description: "A brief description of what your post is about (1-2 sentences)."
55+
author: "Your Name or GitHub Username"
56+
---
57+
```
58+
59+
**Explanation:**
60+
- `title`: The full title that appears at the top of your post
61+
- `linkTitle`: A shorter version for navigation menus
62+
- `date`: The publication date (use today's date)
63+
- `description`: A brief summary for SEO and previews
64+
- `author`: Your name or GitHub username
65+
66+
### 4. Write Your Content
67+
68+
Now comes the fun part! Write your blog post using Markdown. Here are some formatting tips:
69+
70+
**Headers:**
71+
```markdown
72+
### Main Section
73+
### Subsection
74+
```
75+
76+
**Code Blocks:**
77+
````markdown
78+
```go
79+
package main
80+
81+
import "fmt"
82+
83+
func main() {
84+
fmt.Println("Hello, World!")
85+
}
86+
```
87+
````
88+
89+
**Emphasis:**
90+
````markdown
91+
**bold text**
92+
*italic text*
93+
`inline code`
94+
````
95+
96+
**Links:**
97+
````markdown
98+
[link text](https://example.com)
99+
````
100+
101+
### 5. Preview Your Post Locally
102+
103+
If you want to see how your post looks before submitting, you can run Hugo locally:
104+
105+
```sh
106+
# From the docs root directory
107+
hugo server -D
108+
```
109+
110+
hen open [http://localhost:1313/docs/blog](http://localhost:1313/docs/blog) in your browser to preview your post.
111+
112+
### 6. Submit Your Pull Request
113+
114+
Once you're happy with your post, it's time to submit it:
115+
116+
```sh
117+
# switch to a new branch
118+
git switch -c docs-add-blog
119+
120+
# Add your new file
121+
git add content/en/blog/my-awesome-git-post.md
122+
123+
# Commit with a descriptive message
124+
git commit -m "feat: Add blog post about [your topic]"
125+
126+
# Push to your fork
127+
git push origin docs-add-blog
128+
```
129+
130+
Now go to GitHub and create a pull request from your fork to the main [`gitxtui/docs`](https://github.com/gitxtui/docs) repository. In your PR description, briefly explain what your blog post is about.
131+
132+
### 7. Review Process
133+
134+
After you submit your PR:
135+
136+
- Our team will review your submission
137+
- We may provide feedback or suggestions for improvement
138+
- Once everything looks good, we'll merge your post
139+
- Your contribution will be live on the GITx documentation site! 🎉
140+
141+
Tips for Great Blog Posts:
142+
143+
- Keep it focused: Cover one main topic per post
144+
- Use examples: Code examples and real-world scenarios help readers understand
145+
- Break it up: Use headers, lists, and short paragraphs for readability
146+
- Proofread: Check for typos and grammar issues before submitting
147+
- Be friendly: Write in a conversational tone—imagine you're explaining to a friend
148+
- Need Help?
149+
150+
If you have questions or need assistance:
151+
152+
- Open an issue on the [gitxtui/docs](https://github.com/gitxtui/docs) repository
153+
- Join our [Discord community](https://discord.gg/DphdFXd3Bh)
154+
- Comment on the [blog contribution issue](https://github.com/gitxtui/docs/issues/)
155+
156+
We can't wait to read your contribution! Happy writing! ✍️

0 commit comments

Comments
 (0)