Published on 2024-04-30 17:30 by Boubacar BARRY
How to Contribute a Blog Post
Are you interested in sharing your knowledge by adding a blog post to our repository? In this guide, we’ll show you how to contribute your own blog posts directly to our GitHub repository. You can either create a pull request or submit an issue following our GitHub template.
Prerequisites
- A GitHub account
- Basic understanding of Git and Markdown
We will be covering the following:
- Forking the repository
- Cloning the repository
- Creating a new branch
- Adding your blog post
- Committing and pushing your changes
- Creating a pull request
- Alternative: Submitting an issue
- Conclusion
Forking the Repository
Let’s start by forking our public repository to your own GitHub account.
- Navigate to the repository page.
- Click on the Fork button at the top-right corner.
Cloning the Repository
Clone the forked repository to your local machine:
git clone https://github.com/b-barry/helb-it-trends
cd helb-it-trends
Creating a New Branch
Create a new branch for your blog post:
git checkout -b add-my-blog-post
Adding Your Blog Post
Add your blog post in the src/content/blog directory using the provided Markdown template.
The Markdown Template
---
title: Your Blog Post Title
pubDate: Date and Time
author: "Your Name"
tags:
- Tag1
- Tag2
imgUrl: '../../assets/your-image.jpg'
description: A brief description of your blog post.
layout: '../../layouts/BlogPost.astro'
---
## Your Blog Post Title
Your content goes here.
Make sure to fill out all the fields accordingly.
Committing and Pushing Your Changes
After adding your blog post, commit your changes:
git add .
git commit -m "Add my blog post"
git push origin add-my-blog-post
Creating a Pull Request
Go to your forked repository on GitHub and click on Compare & pull request to submit your changes for review.
Alternative: Submitting an Issue
If you’re not familiar with Git or prefer not to use it, you can submit your blog post by creating an issue using our GitHub template.
Steps to Submit an Issue
- Navigate to the Issues tab in the repository.
- Click on New Issue.
- Select the Blog Post Submission template.
- Fill in the required information and paste your blog post content.
Conclusion
If you have any questions or need assistance, feel free to reach out!
Written by Boubacar BARRY
← Back to blog