Skip to content

Commit 5749af8

Browse files
committed
new posts + ui improve
1 parent 13c863f commit 5749af8

File tree

4 files changed

+98
-5
lines changed

4 files changed

+98
-5
lines changed
Loading
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
![test](https://opengraph.githubassets.com/3bf2b12ea830ab581a1534e6b5c8cdef573e81607ea005103c03fe3c50212dae/maptime/getting-started-with-git-and-github)
2+
GitHub is a powerful tool for version control and collaboration, making it easier for developers to work on projects together. If you're new to GitHub, understanding how to set up your account and manage issues is crucial. In this guide, we'll walk you through the basics of setting up GitHub and using issues to track and manage tasks.
3+
4+
### Setting Up GitHub
5+
6+
**a. Create a GitHub Account**
7+
8+
1. **Sign Up**: Go to [GitHub's Sign Up page](https://github.com/join) and create a free account by providing your email address, creating a username, and setting a password.
9+
10+
2. **Verify Email**: GitHub will send you a verification email. Click the link in the email to verify your address.
11+
12+
3. **Complete Setup**: Follow the prompts to complete the setup process, including choosing a plan (the free plan is often sufficient for beginners).
13+
14+
**b. Install Git**
15+
16+
1. **Download Git**: Go to the [Git website](https://git-scm.com/) and download the appropriate version for your operating system.
17+
18+
2. **Install Git**: Follow the installation instructions. During installation, you can select default options if you're unsure.
19+
20+
**c. Configure Git**
21+
22+
1. **Open Terminal**: On Windows, you can use Git Bash; on macOS and Linux, use the terminal.
23+
24+
2. **Set Up User Info**: Configure Git with your GitHub username and email:
25+
26+
```bash
27+
git config --global user.name "Your Name"
28+
git config --global user.email "your.email@example.com"
29+
```
30+
31+
**d. Create a Repository**
32+
33+
1. **Create a New Repo**: On GitHub, click the "+" icon in the top-right corner and select "New repository."
34+
35+
2. **Fill in Details**: Enter a repository name, description, and choose whether it should be public or private.
36+
37+
3. **Initialize Repo**: Optionally, you can initialize the repository with a README file.
38+
39+
4. **Clone Repo**: Copy the repository URL and use the following command in your terminal to clone it to your local machine:
40+
41+
```bash
42+
git clone https://github.com/your-username/your-repo.git
43+
```
44+
45+
### Understanding GitHub Issues
46+
47+
GitHub Issues is a feature that allows you to track tasks, bugs, and feature requests in your repository. Here’s how to use it effectively:
48+
49+
**a. Creating an Issue**
50+
51+
1. **Navigate to Issues**: Go to your repository on GitHub and click on the "Issues" tab.
52+
53+
2. **New Issue**: Click the "New issue" button.
54+
55+
3. **Fill in Details**: Provide a descriptive title and details for the issue. You can also add labels, assign it to users, and set milestones if needed.
56+
57+
4. **Submit**: Click "Submit new issue" to create it.
58+
59+
**b. Managing Issues**
60+
61+
1. **View Issues**: You can view open and closed issues in the "Issues" tab.
62+
63+
2. **Comment**: You can add comments to issues to provide updates or ask questions.
64+
65+
3. **Close Issues**: When an issue is resolved, you can close it by clicking the "Close issue" button on the issue page.
66+
67+
4. **Labels and Milestones**: Use labels to categorize issues (e.g., bug, enhancement) and milestones to track progress towards a goal.
68+
69+
**c. Linking Issues to Pull Requests**
70+
71+
1. **Reference Issues**: When creating a pull request, you can reference issues by including keywords like "Fixes #issue-number" in the pull request description. This will automatically close the issue when the pull request is merged.
72+
73+
### Best Practices
74+
75+
- **Descriptive Titles**: Use clear and descriptive titles for issues to make it easy to understand the problem or task.
76+
- **Detailed Descriptions**: Provide as much detail as possible, including steps to reproduce issues or specifics about the task.
77+
- **Use Labels**: Apply appropriate labels to categorize and prioritize issues.
78+
79+
### Conclusion
80+
81+
GitHub is an essential tool for modern software development, and mastering its basics will set you up for success. By setting up your GitHub account, understanding how to manage issues, and using best practices, you’ll be well on your way to effective project management and collaboration. Happy coding!
82+
83+
> Written by **Sakib Ahmed** | [GitHub](https://github.com/devvsakib)

public/posts/index.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
},
88
{
99
"title": "git_hooks_automating_your_workflow"
10+
},
11+
{
12+
"title": "getting_started_with_github_issues_and_setup"
1013
}
1114
]

src/pages/Doc/single doc/index.jsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const DocDetail = () => {
8282

8383
if (loading) return <div className="flex justify-center items-center h-screen"><Spin size="large" /></div>;
8484
if (error) return <Alert message="Error" description={error} type="error" />;
85-
85+
const headingToId = (children) => String(children).toLowerCase().replace(/\s+/g, '-');
8686
return (
8787
<Layout>
8888
<section className="container mx-auto p-4 min-h-screen">
@@ -97,7 +97,7 @@ const DocDetail = () => {
9797
<li key={index} className={`ml-${heading.level} ${activeSection === heading.title.replace(/\s+/g, '-').toLowerCase() && 'text-green-500 font-semibold'}`}>
9898
<a href={`#${heading.title.replace(/\s+/g, '-').toLowerCase()}`}
9999

100-
onClick={() => setActiveSection(heading.title.replace(/\s+/g, '-').toLowerCase())}
100+
onClick={() => setActiveSection(heading.title.replace(/\s+/g, '-')?.toLowerCase())}
101101
>
102102
{heading.title}
103103
</a>
@@ -127,13 +127,13 @@ const DocDetail = () => {
127127
);
128128
},
129129
h1({ node, children }) {
130-
return <h1 className='text-xl font-normal mt-10 mb-3' id={children.toLowerCase().replace(/\s+/g, '-')}> {children}</h1>;
130+
return <h1 className='text-xl font-normal mt-10 mb-3' id={headingToId(children)}> {children}</h1>;
131131
},
132132
h2({ node, children }) {
133-
return <h2 className='text-xl font-normal mt-10 mb-3' id={children.toLowerCase().replace(/\s+/g, '-')}>🌿 {children}</h2>;
133+
return <h2 className='text-xl font-normal mt-10 mb-3' id={headingToId(children)}>🌿 {children}</h2>;
134134
},
135135
h3({ node, children }) {
136-
return <h3 className='text-xl font-normal mt-10 mb-3' id={children.toLowerCase().replace(/\s+/g, '-')}>🌿 {children}</h3>;
136+
return <h3 className='text-xl font-normal mt-10 mb-3' id={headingToId(children)}>🌿 {children}</h3>;
137137
},
138138
blockquote({ node, children }) {
139139
return <span className='bg-gray-100 p-4 pl-0 text-sm my-4 block text-gray'>{children}</span>;
@@ -147,7 +147,14 @@ const DocDetail = () => {
147147
},
148148
ul({ node, children }) {
149149
return <ul className='list-disc ml-4 mb-2'>{children}</ul>;
150+
},
151+
ol({ node, children }) {
152+
return <ul className='list-disc ml-4 mb-2'>{children}</ul>;
153+
},
154+
img({ node, src, alt }) {
155+
return <img src={src} alt={alt} className='mb-4 rounded-md' />;
150156
}
157+
151158
}}
152159
>
153160
{content}

0 commit comments

Comments
 (0)