This repo provides an example setup to publish your Jekyll project on IPFS and mirror those changes over a freely provided or custom domain name.
You'll need to install Textile on your local machine. To do so, download the binary for your computer here, https://github.com/textileio/textile/releases/latest.
Apple users: Textile is not signing the build with Apple developer keys, you'll need to authorize the app to run in your security settings. Download the Darwin build and go through the install steps (untar, cd, ./install
). Next, run a Textile command once, e.g. textile --help
. This will fail due to permissions. Go to System Preferences -> Security. In the bottom right, click to allow Textile to run anyway. Run textile --help
again, confirm your decision, and you'll not be prompted again.
Textile uses passwordless login for all users, giving them remote IPFS pinning for their projects.
textile login
Follow the instructions.
textile whoami
Should now show you your account. If you think you'll want to collaborate with others, you should create a team and then enter you team before creating projects and buckets.
textile team add <NAME>
Followed by
textile switch
All Buckets are part of Projects. To make Project management easy, you can initialize a Project in the any directory. Then, each time you are working in that directory with Textile, it will know which project it is working with.
cd <JEKYLL PROJECT DIRECTORY>
textile project init <UNIQUE PROJECT NAME>
This will create a file ./.textile/config.yml
. If you are using Git, you should commit this file to your code history.
First, you should build your Jekyll for production.
jekyll build
By default, this will build your site in the _site
directory. This is the directory you will push to a Bucket.
textile bucket push _site/* <UNIQUE BUCKET NAME>
That's it! You now have the contents of your _site
folder pinned to a remote IPFS node. You can explore the data using the data explorer. Your Bucket URL can be found using,
https://cloud.textile.io/dashboard/<PROJECT NAME>/<BUCKET NAME>
Your site will be rendered on the Gateway. You can view your live site using the URL,
https://<BUCKET NAME>.textile.cafe/
If you are using GitHub, you can use GitHub Actions to update your Bucket automatically now. Here's how you can do it.
$HOME/.textile/auth.yml
. That file will contain the string `token:TEXTILE_AUTH_TOKEN
. For the value, enter the string from YOUR_PRIVATE_TOKEN
above..textile/config.yml
folder and file to your GitHub project.Textile curates a few Actions in the GitHub Marketplace. If your site uses the default Jekyll build settings, this step should be easy.
.github/
into your own GitHub repo in the same location (i.e. .github/
-> .github/
).BUCKET_NAME: 'jekyll-ipfs-blog'
from jekyll-ipfs-blog
to the Bucket name you created above.Now, all new changes to your Master branch will udpate your primary Bucket. In addition, you can use ephemeral Buckets created for each of your PRs so you can view and review your website changes before pushing them live.
If you want to update your custom domain using your new IFPS content, follow the Cloudflare DNSLink setup instructions here.