Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.md First May 19, 2019
README.md
index.js
package.json
yarn.lock First May 19, 2019

README.md

make-relative

A missing link for IPFS compatibility: this module makes links relative on a website, so that one can navigate through the pages when using IPFS. IPFS essentially makes websites run in sub-directories, so if you’re using links that start with /, then they’ll jump to the wrong place.

Usage:

This needs to be run in the root of a built website. It will find all HTML files under its current path and rewrite the following references in-place:

  • a href, link href
  • meta content
  • img src
$ make-relative https://expected-domain-name.com

The domain name is required, because that makes this able to make domain-absolute links relative if they point to the same website.

You can’t perform that action at this time.