Event JSON
{
"id": "fbe38b870b5415b39e176d6a5fc4467da616c36058325965ac713f7578f49366",
"pubkey": "08eade50df51da4a42f5dc045e35b371902e06d6a805215bec3d72dc687ccb04",
"created_at": 1720182024,
"kind": 30023,
"tags": [
[
"d",
"how-to-self-host-on-github"
],
[
"title",
"How to self-host npub.pro website on Github Pages?"
],
[
"summary",
"Host your site for free on Github"
],
[
"published_at",
"1720181831"
],
[
"alt",
"This is a long form article, you can read it in https://habla.news/a/naddr1qvzqqqr4gupzqz82megd75w6ffp0thqytc6mxuvs9crdd2q9y9d7c0tjm358ejcyqqdxsmmh946x7ttnv4kxvttgdaehgtt0dckkw6t5dp6kyxzm8mn"
],
[
"t",
"#howto"
],
[
"image",
"https://image.nostr.build/3bef7b2e01dbe4ea48d1a774c9582139d83195615a5bc7db6822cc6e250f5068.png"
],
[
"published_at",
"1720181831"
]
],
"content": "1. Create git repo:\n\n```export USER=\u003cgithub-user-name\u003e\nexport REPO=nostr-site-demo\nmkdir $REPO; cd $REPO;\n```\n\n2. Create $REPO on github.\n\n3. Init local repo and push to Github:\n\n```echo \"# nostr-site-demo\" \u003e\u003e README.md\ngit init\ngit add README.md\ngit commit -m \"first commit\"\ngit branch -M main\ngit remote add origin https://github.com/$USER/$REPO.git\ngit push -u origin main\n```\n\n4. Setup Github Pages:\n\n- open repo page on github\n- open Settings -\u003e Pages\n- under Branch choose 'main' and save\n\n5. Wait 1-2 minutes and reload the settings -\u003e Pages page until you see \"Your site is live at URL\". \n\n- copy URL of your github pages website\n\n6. Go to npub.pro [admin panel](https://npub.pro/admin) and choose your site and open Settings.\n\n- edit Website Address, paste the URL of your Github Pages address\n- click Save\n\n7. Download the updated zip archive for self-hosting at \u003cyoursite\u003e.npub.pro/dist.zip\n\n8. Extract files from archive to your REPO dir, commit, push to Github:\n\n```\nunzip path/to/zip/dist.zip\ngit add .\ngit commit -m \"Add site files\"\ngit push origin main\n```\n\n9. Wait 1 minute for Github to update your site.\n\nYou should be done now!\n",
"sig": "0c85f39695c00aea5cbd42d960e4354fc002a9a2b4ba40c75ea8da3ed1fb87c647c24d36cd20adfc9553325e77e75e23945ba40de1f93bc2182784052cba5c08"
}