The steps for publishing your capsule are:
Once you’re live, we’ll look at ways to automate the process.
You can generate your personal access token via meta.sr.ht:
=> OAuth 2.0 personal access tokens
Write it down for later reference.
Here's a simple example. Let's say you write this file to index.gmi:
# My sourcehut capsule Welcome to my cool sourcehut capsule!
You can create a tarball for it like so:
$ tar -cvz index.gmi > site.tar.gz
Add any number of files other than index.gmi to expand this.
Here's another example of a capsule using gssg:
$ gssg $ tar -C public -cvz . > site.tar.gz
=> gssg
You can use any tool, just so long as it outputs static content.
Once you have a tarball, upload it to pages.sr.ht:
$ curl --oauth2-bearer "access token" \ -Fcontent=@site.tar.gz \ -Fprotocol=GEMINI \ https://pages.sr.ht/publish/username.srht.site
Substitute “access token” with your personal access token, and username with your sr.ht username.
=> Want to use your own domain name? Review the extra steps here.
Once you run this command, your capsule should now be live at gemini://username.srht.site!
=> Automating deployments This content has been proxied by September (ba2dc).Proxy Information
text/gemini