Skip to content

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

License

Notifications You must be signed in to change notification settings

bunto/bunto-relative-links

Repository files navigation

Bunto Relative Links

Build Status

A Bunto 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 converts 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 'bunto-relative-links'
  1. Add the following to your site's config file:
gems:
  - bunto-relative-links