Straypenguins-Tips-Inventory

GitHub Pages + Jekyll: How Markdown Links Are Handled (2025 Edition)

👉 日本語版は こちら

Overview

When building documentation with GitHub Pages (Pages) and Jekyll, many writers wonder:

GitHub Pages (with its default Jekyll setup) provides powerful, automatic handling of Markdown links—thanks to built-in plugins like jekyll-relative-links. This article summarizes behaviors I observed and explains how it all works, so you can write Markdown links with confidence.

📝 Note:
The behavior described in this document is based on my experiments and observations in Sep 2025. They may vary in the future.

📌 index.md VS README.md

📌 My _config.yml

plugins:
  - jekyll-sitemap

My _config.yml is this simple. See Best Practices & Practical Tips.


GitHub Pages enables several Jekyll plugins by default (see official docs), including:

jekyll-relative-links is key:
It automatically rewrites Markdown links between .md files so that, when your site is built, links point to the corresponding .html files (or directory paths for index.html). This means you can write all your internal links simply as [Label](other-page.md) or [Label](Subfolder/), and they’ll Just Work™ in the published site.


3. References


4. Best Practices & Practical Tips


5. Summary