/jekyll-relative-links

A Jekyll plugin to convert relative links to markdown files to their rendered equivalents

Primary LanguageRubyMIT LicenseMIT

Jekyll Relative Links

A Jekyll plugin to convert relative links to markdown files to their rendered equivalents.

What it does

Let's say you have a link like this in a markdown file:

[foo](bar.md)

While that would render as a valid link on GitHub.com, it would not be a valid link on Pages. Instead, this plugin converst that link to:

[foo](bar.html)

It even work with pages with custom permalinks. If you have bar.md with the following:

---
permalink: /bar/
---

# bar

Then [foo](bar.md) will render as [foo](/bar/).

Why

Because markdown files rendered by GitHub Pages should behave similar to Markdown files rendered on GitHub.com

Usage

  1. Add the following to your site's Gemfile:
gem 'jekyll-relative-links'
  1. Add the following to your site's config file:
gems:
  - jekyll-relative-links