Skip to content
master
Switch branches/tags
Code
This branch is 42 commits ahead of christroutner/gatsby-ipfs-boilerplate:master.
Contribute

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

gatsby-ipfs-template

This repository contains a website template for building a website with the Gatsby framework.

Unlike other Gatsby starters and website templates, this template has some specific features:

  • Markdown support added. Easily create new research articles and blog posts. Save your markdown files to the markdown directory.
  • IPFS ready. The public folder where the site gets built is ready to be added to the IPFS network, and will serve the website from any IPFS gateway. Here's an example
  • Responsive and Mobile First. The site template is originally based on Forty by HTML5 Up. It features mobile-first styling and easy-to-use grid system for controlling the mobile and desktop displays.

This template is intended to work in concert with two other pieces of software:

  • The ipfs-web-server is the 'back-end' server intended to serve up the website generated by this 'front-end' repository. It serves the content in a conventional way, but also syndicates it over the IPFS and Tor networks.
  • The memo-push tool is used to publish the IPFS link on the Bitcoin Cash blockchain, using the Memo.cash protocol. This is how the web server can detect updates and download changes to your website.

Together, these three pieces of software can publish progressive web apps in a way that is very hard to censor. They were created to encourage developers to combine the forces of Bitcoin Cash, IPFS, and Tor to unleash a vibrant online economy.

Browser IPFS Node

This template includes an example of how to create an IPFS node inside the web browser. Navigate to the /ipfs page and follow the instructions.

Installation

Install this starter (assuming Gatsby is installed) by running from your CLI:
gatsby new gatsby-ipfs-template https://github.com/Permissionless-Software-Foundation/gatsby-ipfs-template

Run gatsby develop in the terminal to start the dev site.

CSS Grid

The grid on this site was replaced with a custom version, built using CSS Grid. It's a very simple 12 column grid that is disabled on mobile. To start using the grid, wrap the desired items with grid-wrapper. Items inside the grid-wrapper use the class col- followed by a number, which should add up to 12.

Here is an example of using the grid, for a 3 column layout:

<div className="grid-wrapper">
    <div className="col-4">
        <p>Content Here</p>
    </div>
    <div className="col-4">
        <p>Content Here</p>
    </div>
    <div className="col-4">
        <p>Content Here</p>
    </div>
</div>

Markdown

By default, the website offers two different areas to post your markdown files inside the markdown directory:

  • The blog directory will add your file to the /blog page, sorted by date.
  • The research directory will list articles based on topics, on the /research page. These articles are ordered by topic instead of by date. Topics correspond to the subdirectories in the research directory.

IPFS

v1.0.1 uploaded to IPFS with npm dependencies:

  • Get repository: ipfs get QmSvmWaRFZp9psEfA5BaVpVR7MKJUtwdoWnN2Qq6PKXTXL
  • Pin repository: ipfs pin add -r QmSvmWaRFZp9psEfA5BaVpVR7MKJUtwdoWnN2Qq6PKXTXL

About

Template for a Gatsby website, ready to be served over IPFS

Resources

License

Stars

Watchers

Forks

Packages

No packages published