I_am_Sab

I research CNC machines, aiming to design low-cost systems and produce efficiently and affordably.

View on GitHub
6 December 2025

GitHub Markdown Editing — Basic to Master

by


GitHub Markdown Editing — Basic to Master

1. BASIC (Beginner)

✔ How to edit a .md file on GitHub

  1. Open your repository
  2. Click the file (example: README.md)
  3. Click Edit (pencil icon)
  4. Make changes
  5. Scroll down → add commit message
  6. Click Commit changes

Done.

✔ Basic Markdown formatting

# Heading 1
## Heading 2
### Heading 3

**bold**  
*italic*  
~~strike~~

- list item
- list item

1. number list
2. next

2. INTERMEDIATE (Useful Daily Skills)

[Google](https://google.com)

[About Me](about.html)

✔ Images

![alt text](/assets/image/myphoto.png)

✔ Code Blocks

```python
print("Hello")
```

✔ Inline Code

Use `ls` to list files.

✔ Blockquotes

> This is a quote.

✔ Horizontal Line

---

3. ADVANCED (For GitHub Pages / Projects)

✔ Front Matter (Jekyll)

Used in posts & pages:

---
layout: post
title: My First Post
categories: blog
---
[Projects](/projects/)
[Blog](/blog/)
[About](/about.html)

✔ Adding images to your site

  1. Place images in: /assets/image/your-file.png
  2. Use in Markdown:

    ![](/assets/image/your-file.png)
    

✔ Table

| Name | Age |
|------|-----|
| Sab  | 25  |

✔ Highlight / Note

**Note:** This is important.

4. MASTER LEVEL (Full Control)

✔ Create new pages

Create a file like:

projects/index.md

---
layout: page
title: Projects
permalink: /projects/
---

# My Projects

✔ Create blog posts

Inside _posts/:

2025-02-20-My-Post.md

---
layout: post
title: My CNC Tool
categories: projects
---

✔ Use categories

categories: blog
categories: projects
categories: WhatAppChannel

✔ Loop posts (list specific category)


  
  - [GitHub Markdown Editing — default](/blog/2025/12/06/sample.html)
  

  
  - [GitHub Markdown Editing — Basic to Master](/blog/2025/12/06/GitHub-Markdown.html)
  

  

  

  

  
  - [My Thinking Notes](/blog/1992/02/20/My-Thinking.html)
  

  

  

✔ Add navigation

Edit _data/navigation.yml:

- title: Home
  url: /
- title: Blog
  url: /blog/
- title: Projects
  url: /projects/

✔ Hide a file from showing

Add:

published: false

In Jekyll (and GitHub Pages), post filenames must follow a special format:

YYYY-MM-DD-title.md

Why:

  1. Date is important

    • YYYY-MM-DD tells Jekyll the post date automatically.
    • Used for sorting posts (latest first) and generating URLs.
  2. Unique identifier

    • The combination of date + title ensures no two posts clash.
  3. Automatic permalink

    • Example: _posts/1992-02-20-Hello.md → URL:

      /1992/02/20/hello.html
      

      (unless you customize permalinks in _config.yml)

  4. Works with Jekyll loops

    • site.posts automatically reads _posts/ files using this format.

Example:

# _posts/2025-12-06-My-CNC-Tool.md
---
layout: post
title: "My CNC Tool"
categories: projects
---

Tip: If you want drafts without a date, put them in _drafts/ folder. Then you can publish later by moving them to _posts/ with the correct YYYY-MM-DD-title.md format.

---
layout: page
title: WhatAppChannel
permalink: /WhatAppChannel/
---

# WhatsApp Channel


  

  

  
  - **[Daily Repeat Work Routine (No Exhaustion)](/whatappchannel/2025/12/05/Article_0003.html)**  
    <small>Dec 05, 2025</small>
  

  
  - **[Aircel’s Last Call: The Untold Truth Behind the Shutdown](/whatappchannel/2025/12/04/Article_0002.html)**  
    <small>Dec 04, 2025</small>
  

  
  - **[Why Losing Someone Doesn’t Mean You Lost](/whatappchannel/2025/12/03/Article_0001.html)**  
    <small>Dec 03, 2025</small>
  

  

  

  

✅ How it works:

  1. In any post, add:
published: false
  1. That post will NOT appear on the WhatAppChannel page (or any loop checking for post.published != false), but the file still exists in _posts.

This is useful for drafts or posts you want to keep but not show publicly.

Example:

---
layout: post
title: "My Visible Post"
categories: WhatAppChannel
published: true
---

This post will appear in loops like:


  

  

  
  - [Daily Repeat Work Routine (No Exhaustion)](/whatappchannel/2025/12/05/Article_0003.html)
  

  
  - [Aircel’s Last Call: The Untold Truth Behind the Shutdown](/whatappchannel/2025/12/04/Article_0002.html)
  

  
  - [Why Losing Someone Doesn’t Mean You Lost](/whatappchannel/2025/12/03/Article_0001.html)
  

  

  

  

✅ It will show exactly like a normal post.

Use published: false only when you want to hide the post temporarily.

Example in front matter:

---
layout: post
title: "My Post"
# published: false   # This line is ignored by Jekyll
published: true
---

In Markdown text (outside front matter), # does mean a header:

# Heading 1
## Heading 2
### Heading 3

So the meaning depends on where you use it:

Context Meaning
YAML front matter Comment
Markdown content Header (H1, H2…)

1. Using _config.yml (Recommended for Jekyll/GitHub Pages)

Open _config.yml and add/change:

theme: jekyll-theme-hacker

2. Using GitHub Repository Settings (Web UI)

  1. Go to your repository on GitHub.
  2. Click Settings → Pages → Theme Chooser.
  3. Select Hacker from the list.
  4. Click Save.
  5. GitHub will rebuild your site with the new theme.

3. Things to note

bundle exec jekyll serve

and open:

http://localhost:4000

build and preview your GitHub Pages site locally before pushing changes.


1. Install Ruby and Bundler

GitHub Pages uses Jekyll, which is Ruby-based.

On Linux (Ubuntu/Debian):

sudo apt update
sudo apt install ruby-full build-essential zlib1g-dev

Set up environment to avoid permission issues:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Install Bundler:

gem install bundler

2. Install Jekyll & GitHub Pages locally

In your site folder:

cd ~/Desktop/MY_GIT/tpj-root.github.io
bundle init   # creates a Gemfile if none exists

Edit Gemfile and add:

gem "github-pages", group: :jekyll_plugins

Then run:

bundle install

3. Build & serve locally

Run:

bundle exec jekyll serve
http://localhost:4000

4. Optional: Using a theme

If you use a theme (like Hacker):

theme: jekyll-theme-hacker
bundle exec jekyll serve

5. Tips

bundle exec jekyll doctor

tags: