Personal blog by Janaka Abeywardhana. Thoughts and notes on web technology, software development, and technical product managenement.
The main version at https://janaka.dev is hosted traditionally. A mirror at https://ipfs.janaka.dev is hosted on IPFS. A key reason for creating this site and using a static site generator was to host on IPFS as a learning exercise (web3). I've not managed to get IPFS hosting working reliably. So for now web2 hosting until I figure it out.
Forked from Gatsby blog starter. Help and inspiration from overreacted.io by Dan Abramov. Syntax theme based on Sarah Drasner's Night Owl with small tweaks. Copied from overreacted.io.
No third-party contributions except for code and content fixes. PRs welcome.
Supported languages in code blocks
Deploy to IPFS https://ipfs.janaka.dev
- Push to master on Github triggers the deploy workflow on fleek.co
Deploy to traditional hosting https://janaka.dev
- Push to master on Github triggers the deploy workflow on Github actions
- run
yarn dev
- open https://localhost:8000
This is not the preferred option.
yarn build
Note: This command wrapsgatsby build
cd blog-janaka-dev
ipfs add -r public
- (One off step) create custome key
ipfs key gen --type=rsa -size=2048 blog-janaka-dev
Should return a$PEER_ID
- (one off step) create TLS cert?
ipfs name publish --key=blog-janaka-dev $CID
$CID is the content ID from the add step Should returnPublished to $PEER_ID: /ipfs/$CID
refs: https://docs-beta.ipfs.io/how-to/host-single-page-site/#create-your-site
This is not the preferred option. Use this only if local testing of CI/CD is require for troubleshooting
-
Add the following to a
.env
fileAWS_S3_BUCKET_NAME=<bucket name> AWS_REGION=<aws region> AWS_PROFILE=<aws credentials profile name>
-
yarn build
-
yarn deploy