Skip to content

Commit cfc00b3

Browse files
authored
Merge pull request #1513 from Adez017/dicord
Fix contribution guidelines and build error regarding version on lint
2 parents 06cac74 + b07b3a4 commit cfc00b3

6 files changed

Lines changed: 307 additions & 72 deletions

File tree

docs/getting_started.md

Lines changed: 244 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,28 @@ Use a short, descriptive name — for example `blog/intro-to-docker` or `blog/re
6161

6262
---
6363

64+
:::tip Blog Quality Checklist
65+
Before starting any development, make sure your blog meets **all** of the following criteria. Your blog can be **rejected** if any requirement is not fulfilled:
66+
67+
- 1. 5 backlinks to different external websites to support our documentation.
68+
- 2. 5 internal backlinks to other articles on recodehive.
69+
70+
- 3. **No generic content** — avoid surface-level topics like "what is Azure" or "difference between X and Y". Write pure, high-depth technical articles with images. See [this example](https://www.recodehive.com/docs/GitHub/Maintainer-guide/milestone) for the standard we aim for. (Tip: tools like [Snagit](https://www.techsmith.com/screen-capture.html) help produce great annotated screenshots.)
71+
72+
- 4. Image filenames must be descriptive and SEO-friendly — no random names like `screenshot123.png`.
73+
- 5. **Content-to-code ratio**: text should be more than code. Adsense flags pages at 60% code / 40% text - keep it the opposite. If code is long, link to GitHub and reference it in comments instead.
74+
75+
- 6. Include a **bulleted summary section** at the top of the blog post.
76+
- 7. Include a **FAQ section** at the bottom.
77+
- 8. Use Docusaurus admonitions (`:::tip`, `:::info`, `:::note`) for callouts, tips, and cautions (see formatting guidelines below).
78+
- 9. Tables must be **center-aligned** - wrap them in an `:::info` block to achieve this in Docusaurus.
79+
- 10. Use **named code blocks** with a filename label when showing code (e.g., ` ```java title="Sample.java" `).
80+
- 11. When showing a query and its output together, use a **Tabs** block with separate "Query" and "Output" tabs.
81+
- 12. Screenshots must follow the naming convention and size guidelines below.
82+
:::
83+
84+
---
85+
6486
## Step 4: Create the Blog Folder and File
6587

6688
All blog posts live inside the `blog/` directory. Each post gets its own folder.
@@ -149,7 +171,7 @@ After the closing `---` of your frontmatter, add the `<!-- truncate -->` comment
149171
...frontmatter...
150172
---
151173
152-
<!-- truncate -->
174+
<!-- truncate -->
153175
154176
Your introduction paragraph goes here. This will appear as the preview on the blog index page.
155177
@@ -158,18 +180,168 @@ Your introduction paragraph goes here. This will appear as the preview on the bl
158180
Body content continues here...
159181
```
160182

161-
### Formatting Tips
183+
### Formatting Guidelines
184+
185+
Use `##` and `###` headings to structure your content.
186+
187+
---
188+
189+
#### Bulleted Summary Section (Required)
190+
191+
Every blog must begin with a bulleted summary right after the intro paragraph. This helps readers quickly understand what they'll learn.
192+
193+
```md
194+
**What you'll learn in this post:**
195+
- How to set up X from scratch
196+
- How to configure Y for production
197+
- Common pitfalls and how to avoid them
198+
```
199+
200+
---
201+
202+
#### Named Code Blocks (Required)
203+
204+
Always label code blocks with a filename so readers know exactly what file they are editing:
205+
206+
````md
207+
```java title="Sample.java"
208+
public class Hello {
209+
public static void main(String[] args) {
210+
System.out.println("Hello, world!");
211+
}
212+
}
213+
```
214+
````
215+
216+
---
217+
218+
#### Query + Output: Use Tabs (Required)
162219

163-
- Use `##` and `###` headings to structure your content.
164-
- Use fenced code blocks with the language name for syntax highlighting:
220+
When showing a database query alongside its output, use a Tabs block so both fit in a single window.
165221

166-
````md
167-
```python
168-
print("Hello, world!")
222+
First, import the components at the top of your `index.md` (after frontmatter, before any content):
223+
224+
```md
225+
import Tabs from '@theme/Tabs';
226+
import TabItem from '@theme/TabItem';
227+
```
228+
229+
Then structure your query + output like this:
230+
231+
````md
232+
<Tabs>
233+
<TabItem value="Query">
234+
235+
```sql
236+
-- Create the table
237+
CREATE TABLE friends (
238+
id INT PRIMARY KEY,
239+
name VARCHAR(100),
240+
username VARCHAR(100)
241+
);
242+
243+
-- Insert data
244+
INSERT INTO friends (id, name, username) VALUES
245+
(1, 'John Doe', 'johndoe'),
246+
(2, 'Jane Smith', 'janesmith'),
247+
(3, 'Bob Johnson', 'bobjohnson');
169248
```
170-
````
171249

172-
- Use `>` for callout blockquotes and `---` for horizontal dividers between sections.
250+
</TabItem>
251+
<TabItem value="Output">
252+
253+
| id | name | username |
254+
|----|-------------|-------------|
255+
| 1 | John Doe | johndoe |
256+
| 2 | Jane Smith | janesmith |
257+
| 3 | Bob Johnson | bobjohnson |
258+
259+
</TabItem>
260+
</Tabs>
261+
````
262+
263+
:::tip
264+
You can add as many `<TabItem>` tabs as needed — for example separate tabs per subquery type, or one tab per language variant.
265+
:::
266+
267+
---
268+
269+
#### Admonitions: Tips, Notes, Info, and Cautions
270+
271+
Use Docusaurus admonitions to highlight important information. Don't overuse them — only where they add real value.
272+
273+
**For tips and helpful extras:**
274+
275+
```md
276+
:::tip Need Git Commands?
277+
Check out our [comprehensive Git Commands Cheatsheet](../GitHub/setup-environment/git-commands.md)
278+
with 50 essential Git commands and examples.
279+
:::
280+
```
281+
282+
**For extra context or caution:**
283+
284+
```md
285+
:::info
286+
In the picture below, Developer 1 handles the men's shopping section, Developer 2
287+
deals with the women's section, and Developer 3 works on the login feature.
288+
:::
289+
```
290+
291+
**For key feature callouts:**
292+
293+
```md
294+
:::note
295+
Key Features of GitLab:
296+
- GitLab provides **built-in CI/CD pipelines**.
297+
- Unlike GitHub, GitLab can be **self-hosted** or used on the cloud (GitLab.com).
298+
- GitLab offers [Premium Plans](https://about.gitlab.com/pricing/) with advanced CI/CD and security features.
299+
:::
300+
```
301+
302+
---
303+
304+
#### Tables: Center Alignment via `:::info`
305+
306+
Plain Markdown tables are left-aligned by default in Docusaurus. Wrap your table in an `:::info` block to center it:
307+
308+
```md
309+
:::
310+
311+
| Command | Description |
312+
|-------------|-------------------|
313+
| `git init` | Initialize a repo |
314+
| `git clone` | Clone a repo |
315+
316+
:::
317+
```
318+
319+
### Rendered Output
320+
321+
:::info
322+
323+
| Command | Description |
324+
|-------------|-------------------|
325+
| `git init` | Initialize a repo |
326+
| `git clone` | Clone a repo |
327+
328+
:::
329+
330+
---
331+
332+
#### FAQ Section (Required)
333+
334+
Every blog post must end with a FAQ section before the conclusion. Use questions your readers are likely to have:
335+
336+
```md
337+
## Frequently Asked Questions
338+
339+
**Q: Do I need to know X before starting this guide?**
340+
A: Basic familiarity with Y is helpful, but the guide covers everything step by step.
341+
342+
**Q: Will this work on Windows?**
343+
A: Yes, the steps are cross-platform. Windows-specific commands are noted where they differ.
344+
```
173345

174346
---
175347

@@ -188,7 +360,7 @@ Use **PNG** for UI screenshots (crisp text) and **JPEG/WebP** for photos.
188360

189361
### Naming Convention
190362

191-
Use lowercase, hyphen-separated, numbered filenames so they sort correctly:
363+
Use lowercase, hyphen-separated, numbered filenames so they sort correctly and are SEO-friendly. **Never use random or auto-generated names.**
192364

193365
```
194366
images/
@@ -208,20 +380,52 @@ Reference images relative to `index.md`:
208380

209381
Always write descriptive alt text — it improves accessibility and SEO.
210382

383+
:::tip Screenshot Tool Recommendation
384+
Tools like [Snagit](https://www.techsmith.com/screen-capture.html) make it easy to produce annotated, professional-quality screenshots. See [this article](https://www.recodehive.com/docs/GitHub/Maintainer-guide/milestone) as a reference for the image quality standard we aim for.
385+
:::
386+
387+
---
388+
389+
## Step 9: Update the Database
390+
391+
All blog data is linked in the database folder (`\database\blogs\index.tsx`). Update it with the following details:
392+
393+
```json
394+
{
395+
id: sequence_wise,
396+
title: "Title of the post",
397+
image: "relative path of the cover image for the blog post",
398+
description: "A short (2-3) lines of description of the post",
399+
slug: "The name of the blog folder (keep it exact)",
400+
authors: ["your-author-id"],
401+
category: "The category the blog belongs to",
402+
tags: ["tags or topics the blog is related to (tools or technologies)"],
403+
}
404+
```
405+
406+
:::note
407+
All details are necessary for correctly rendering the blog card on the blogs page. Take a close look and make sure everything is filled in.
408+
:::
409+
211410
---
212411

213-
## Step 9: Preview Your Post
412+
## Step 10: Preview Your Post
214413

215414
Make sure your dev server is still running (`npm start`), then navigate to [http://localhost:3000/blog](http://localhost:3000/blog) to see your post in the listing and click into it to read the full content. Verify:
216415

217416
- The frontmatter title, date, and author show correctly.
218417
- The truncate preview looks right on the blog index.
418+
- The bulleted summary section appears near the top.
219419
- All images load and are properly sized.
220-
- Code blocks are syntax-highlighted.
420+
- Code blocks are syntax-highlighted and have filename labels.
421+
- Query/output pairs use Tabs.
422+
- Tables are center-aligned inside `:::info` blocks.
423+
- Tips and notes use the correct admonition type.
424+
- The FAQ section is present at the bottom.
221425

222426
---
223427

224-
## Step 10: Commit and Push Your Changes
428+
## Step 11: Commit and Push Your Changes
225429

226430
Once you are happy with the preview, stage and commit your files:
227431

@@ -239,13 +443,13 @@ git push origin blog/your-blog-title
239443

240444
---
241445

242-
## Step 11: Open a Pull Request
446+
## Step 12: Open a Pull Request
243447

244-
1. Go to your fork on GitHub — you will see a **"Compare & pull request"** banner. Click it.
245-
2. Set the **base repository** to `recodehive/recode-website` and **base branch** to `main`.
246-
3. Write a clear PR title, e.g. `blog: Add post on Your Blog Title`.
247-
4. In the description, briefly summarize what the post covers.
248-
5. Click **Create pull request**.
448+
- 1. Go to your fork on GitHub — you will see a **"Compare & pull request"** banner. Click it.
449+
- 2. Set the **base repository** to `recodehive/recode-website` and **base branch** to `main`.
450+
- 3. Write a clear PR title, e.g. `blog: Add post on Your Blog Title`.
451+
- 4. In the description, briefly summarize what the post covers.
452+
- 5. Click **Create pull request**.
249453

250454
A maintainer will review and merge your post. You may be asked to make small edits before it is approved.
251455

@@ -268,13 +472,24 @@ git push origin main
268472

269473
Before submitting your PR, go through this checklist:
270474

271-
- [ ] Blog folder created at `blog/your-blog-title/index.md`
272-
- [ ] Frontmatter is complete (title, authors, tags, date, description, draft: false)
273-
- [ ] Author entry exists in `blog/authors.yml`
274-
- [ ] `<!-- truncate -->` comment placed after the intro paragraph
275-
- [ ] All images are in `blog/your-blog-title/images/` and named with the convention
276-
- [ ] Cover image is 1200 × 630 px; step screenshots are no wider than 1280 px
277-
- [ ] Image file sizes are under 500 KB each
278-
- [ ] Post previews correctly at `localhost:3000/blog`
279-
- [ ] Committed on a feature branch (not `main`)
280-
- [ ] Pull request targets `recodehive/recode-website` `main` branch
475+
- 1. [ ] Blog folder created at `blog/your-blog-title/index.md`
476+
- 2. [ ] Frontmatter is complete (title, authors, tags, date, description, draft: false)
477+
- 3. [ ] Author entry exists in `blog/authors.yml`
478+
- 4. [ ] `<!-- truncate -->` comment placed after the intro paragraph
479+
- 5. [ ] **Bulleted summary section** included near the top of the post
480+
- 6. [ ] **FAQ section** included at the bottom of the post
481+
- 7. [ ] No generic content — article is high-depth and technical with images
482+
- 8. [ ] 5 external backlinks to supporting websites
483+
- 9. [ ] 5 internal backlinks to other recodehive articles
484+
- 10. [ ] Text is more than code — long code blocks link to GitHub instead
485+
- 11. [ ] Code blocks use filename labels — e.g., opening fence followed by `python title="app.py"`
486+
- 12. [ ] Query + output pairs use Tabs blocks
487+
- 14. [ ] Tables are wrapped in `:::info` for center alignment
488+
- 15. [ ] Tips, notes, and cautions use the correct Docusaurus admonition
489+
- 16. [ ] All images are in `blog/your-blog-title/images/` with SEO-friendly names
490+
- 17. [ ] Cover image is 1200 × 630 px; step screenshots are no wider than 1280 px
491+
- 18. [ ] Image file sizes are under 500 KB each
492+
- 19. [ ] Post previews correctly at `localhost:3000/blog`
493+
- 20. [ ] Database entry added in `\database\blogs\index.tsx`
494+
- 21. [ ] Committed on a feature branch (not `main`)
495+
- 22. [ ] Pull request targets `recodehive/recode-website` `main` branch

docs/image.png

201 KB
Loading

docusaurus.config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const config: Config = {
3838

3939
onBrokenLinks: "throw",
4040
// onBrokenMarkdownLinks moved to markdown.hooks
41-
41+
4242
// Google Analytics and Theme Scripts
4343
scripts: [
4444
{
@@ -298,10 +298,10 @@ const config: Config = {
298298
EMAILJS_TEMPLATE_ID: process.env.EMAILJS_TEMPLATE_ID || "",
299299
algoliaSiteSearch: hasAlgoliaSiteSearch
300300
? {
301-
applicationId: algoliaAppId,
302-
apiKey: algoliaSearchApiKey,
303-
indexName: algoliaIndexName,
304-
}
301+
applicationId: algoliaAppId,
302+
apiKey: algoliaSearchApiKey,
303+
indexName: algoliaIndexName,
304+
}
305305
: null,
306306
hooks: {
307307
onBrokenMarkdownLinks: "warn",

0 commit comments

Comments
 (0)