Official website for IPFS http://ipfs.io
This project builds out a static site to explain IPFS, ready for deployment on ipfs itself. It uses
hugo to glue the html together. It provides an informative, public-facing website. The most important things are the words, concepts and links it presents.
Much of the site content is data-driven; take a look at the
data dir where find the data behind the implementations and bundles information as json.
> git clone https://github.com/ipfs/website
To deploy the site ipfs.io, run:
# Build out the optimised site to ./public, where you can check it locally. > make # Add the site to your local ipfs, you can check it via /ipfs/<hash> > make deploy # Save your dnsimple api token as auth.token > cat "<api token here>" > auth.token # Update the dns record for ipfs.io to point to the new ipfs hash. > make publish-to-domain
The following commands are available:
Build the optimised site to the
Preview the production ready site at http://localhost:1313 (requires
hugo on your
Start a hot-reloading dev server on http://localhost:1313 (requires
hugo on your
Optimise all the things!
Build the site in the
public dir and add to
ipfs on your
Update the DNS record for
ipfs.io. (requires an
auto.token file to be saved in the project root.)
If you'd like to update the dnslink TXT record for another domain, pass
DOMAIN=<your domain here> like so:
> make publish-to-domain DOMAIN=tableflip.io
Makefile for the full list or run
make help in the project root. You can pass the env var
DEBUG=true to increase the verbosity of your chosen command.
Latest Blog Posts
The IPFS Starlog list in the Latest section is populated from the IPFS blog, which has a separate build and deploy process. That process includes building an
index.json file containing the latest post data in the blog's root directory. Latest posts can be rendered by this project via two mechanisms:
- Statically, at build time. The
/layouts/partials/latest.htmlpartial contains code (currently commented-out) which GETs
index.jsonfrom its expected absolute URL and uses the returned data to populate the IPFS Starlog. Note that if this
index.jsonrequest fails for any reason the entire Hugo build proces will fail, so this code should only be uncommented once that resource is available.
- Dynamically, via the
/js/lib/blog-feed.jsscript. This script requests the resource at
/blog/index.jsononce the page has loaded, locally to avoid any CORS concerns. If successful, the response will be used to overwrite any static content. For development purposes, a placeholder file is provided in
/static/blog/index.json, which will be loaded by the script when running a local dev server. This file should not be deployed - to that end,
make deploywill remove it from the
publicfolder prior it being added to IPFS and then put it back once that's been done.
hugoto build website
npmfor build tools
ipfsto deploy changes
auth.tokenfile in the project root containing your dnsimple api token to update the dns
All other dependencies are pulled from
npm and the Makefile will run
npm install for you because it's nice like that.
Please do! Check out the issues, or open a PR!
Check out our notes on contributing for more information on how we work, and about contributing in general. Please be aware that all interactions related to IPFS are subject to the IPFS Code of Conduct.
Small note: If editing the README, please conform to the standard-readme specification.