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
publicfolder 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 Fourty 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.
Here is a non-technical video overview of how governments censor content on the internet, and how decentralized publishing tools can be used to circumvent it.
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
gatsby develop in the terminal to start the dev site.
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>
By default, the website offers two different areas to post your markdown files inside the markdown directory:
blogdirectory will add your file to the
/blogpage, sorted by date.
researchdirectory will list articles based on topics, on the
/researchpage. These articles are ordered by topic instead of by date. Topics correspond to the subdirectories in the
v1.0.1 uploaded to IPFS with npm dependencies:
- Get repository:
ipfs get QmSvmWaRFZp9psEfA5BaVpVR7MKJUtwdoWnN2Qq6PKXTXL
- Pin repository:
ipfs pin add -r QmSvmWaRFZp9psEfA5BaVpVR7MKJUtwdoWnN2Qq6PKXTXL