This is the source repository for the IPFS Blog.
-
install node + npm and required modules
npm install
-
run build
node build.js
To create a new post:
mkdir src/<next-number>-<short-title>/
touch src/<next-number>-<short-title>/index.md
That will create a directory for the post inside src/
. Edit the index.md
there. Place any static assets (e.g. images) inside that directory.
Run build:
make build
This should setup a server. For now, it screws up the styling because the styles are pulled from ipfs directly. (FIXME, should put the styles in the build dir.) Just kill it when you're ready to publish
How to publish the blog on IPFS.io
- Make a change to a file
- Add and commit.
make build
$ ipfs add -r build
Only if you want a preview for other people (you can just usemake serve
). The path isbuild
, in the website and the blog. The daemon needs to be running for others to access it, or to access it through a gateway.- Push to remote branch.
- Make a pull request to
master
. - Get it merged following review from another member.
$ git checkout master && git pull origin master
-
$ ipfs daemon
-
$ make publish
Now anyone who has the hash can access. -
Go to IRC: Use pinbot to liase with all of the other 8 gateways (planets: Uranus, Venus, etc) and make sure they have it pinned. So, like so:
$ !pin <hash> <label>
The label (it should be blog
) can change, of course. This can sometimes take ages, because there is a pinbug that causes a hang. Pinbot will tell you when it succeeds. If it continually hangs, the gateway needs to restart. Pin @lgierth or @whyrusleeping and tell them that the pinning bug is bugging you, and have them zap it. Then try pinning again (it should work right away).
$ make publish-to-domain
You will need access to DigitalOcean for this to work. You will then need to use the token. This will take a few minutes for DNS to propogate.
The layouts follow the example viewer. Modify the files inside
tmpl/