https://www.reddit.com/r/geminiprotocol/comments/1hrh1qz/user_input_on_capsules/
created by gayspaceanarchist on 02/01/2025 at 00:33 UTC
6 upvotes, 2 top-level comments (showing 2)
How would someone go about adding user input on their capsules? Say if I wanted to add a way to make comments.
I know there has to be a way to do so, but I'm not entirely sure how to? I have a guestbook up (which is how I know it's possible), but preferably, these would be entirely separate from each other, and just be a basic comment section on a section of my capsule
Comment by LesZedCB at 02/01/2025 at 01:07 UTC
1 upvotes, 1 direct replies
gemini protocol only takes input via url params, and the url is limited to 1024 bytes.
https://geminiprotocol.net/docs/app-guide.gmi[1] check out section 3.1
1: https://geminiprotocol.net/docs/app-guide.gmi
https://geminiprotocol.net/docs/protocol-specification.gmi
Comment by corlaez at 10/01/2025 at 01:26 UTC
1 upvotes, 0 direct replies
Essentially you want to put a link in your page "Add Comment"
then you will have to respond with status 10 and an optional prompt (as a meta field, content should not be sent, that's only for success 20) finalize your header with CRLF.
If you also want to keep the identity with the user you may need to request a certificate from your client, but if not, you can omit this.
Besides that you will need to store all the comments somehow and somehow update the page (maybe your page is always server rendered or you generate a file after updating your comment)