Vuepress Plugin Ipfs screenshot

Vuepress Plugin Ipfs

Author Avatar Theme by Cwaring
Updated: 21 May 2020
14 Stars

Host any VuePress project on IPFS

Overview

VuePress Plugin IPFS transforms VuePress 1.x bundles into a format that is well-suited for hosting on the InterPlanetary File System (IPFS). This plugin is geared towards developers looking to enhance their VuePress sites by ensuring that asset paths are relative, which is crucial for optimal functionality on IPFS. By simplifying asset management across multiple pages, this tool addresses common challenges faced by developers when hosting content on decentralized platforms.

The plugin streamlines the process of setting up a VuePress project for IPFS, allowing for easy configuration with other plugins or themes. It offers a seamless approach to ensure that all assets are appropriately referenced, enabling smoother content delivery to users accessing sites through various IPFS gateways.

Features

  • Relative Asset Paths: Automatically converts asset paths to relative ones during production builds, crucial for accessing sites via varying IPFS gateways.

  • $withBase Helper Method: An integrated method that assists in generating the correct asset path regardless of whether users access the site through the root domain or an IPFS gateway.

  • Easy Configuration: Simply add the plugin to your VuePress config.js or theme/index.js to enable automatic processing of pages and CSS files.

  • Dynamic Base Path Handling: Automatically calculates the base path using the current IPFS gateway and CID, ensuring accurate path references.

  • Component Compatibility: Allows usage of the $withBase method in theme components and Markdown files, ensuring flexibility for developers.

  • Guidance for Base Key Removal: Provides clear instructions on the need to remove any existing base key in configuration files for proper plugin functionality.