-- Leo's gemini proxy
-- Connecting to srht.site:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
The steps for publishing your capsule are:
Generate a personal access token
Create a tarball with your capsule's contents
Upload your tarball to pages.sr.ht
Once you’re live, we’ll look at ways to automate the process.
You can generate your personal access token via meta.sr.ht:
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
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.
Once you run this command, your capsule should now be live at gemini://username.srht.site!
-- Response ended
-- Page fetched on Fri Mar 29 14:38:12 2024