Comment by ๐ฒ byte
Re: "Does anyone have an idea on what Titan Edit is, and how doโฆ"
gemini://transjovian.org/titan/page/The%20Titan%20Specification try the original description
2025-02-17 ยท 1 year ago
4 Later Comments โ
๐ฆ tblFlip ยท 2025-02-17 at 03:23:
funny you should ask... i just had to deal with that earlier.
the "real" documentation is only available on gemini, so DDG wont help much.
its not that hard to implement once you wrapped your head around it.
basically, before navigating to a titan url, prompt the user for some input.
either as file, or let them enter some text/gemini (etc.) in a text box.
what do you do need to know for the request is the content that will be sent,
its mime-type and size in bytes. with that, you can add a
;mime=<mime-type>;size=<content-size> to the end of the path of the titan url
(so before the query parameter) and do a somewhat normal request.
just that, after sending the first request line, you also immediately send the content
the user provided. the server then responds with a normal gemini response
edit: inserted the wrong link at first... silly me!
๐ clseibold [๐] ยท 2025-02-17 at 04:05:
Aside from the formal Titan spec, Lagrange has supported the edit link extension proposal, which allows for ";edit" to be appended to the end of Titan Links. What this does is the browser will automatically fetch the resource via an "edit" Titan request (and this will usually be in "raw" form), the Titan server responds with the content (and locks the resource, if needed), and then that content is automatically loaded into an edit textbox in the browser to then be edited and submitted with a regular Titan request. This is done for servers that need resource locking and for servers that need to separate the raw form of the resource from the presented form (which may have headers and footers attached).
Since it's not part of the formal Titan spec and most Titan clients don't support it, you have to manually enable this feature for Bubble in the user settings.
It is, however, a proposed spec:
@skyjake can probably give more details on this.
Sidenote: The biggest problem with the original Titan spec, imo, is there's no resource locking or versioning management. One solution is to add to Titan requests the datetime the document was originally requested via Gemini, and attaching that to the Titan request. Then the server can determine what version was being edited on upload and either do some merging stuff, or outright reject if it's not the latest version.
The locking system however, is also pretty cool, but still not the best solution. I do wish it was more integrated into the formal protocol spec though.
The best solution, imo, would be a tagging system. You just get the tag of a resource when you get the resource's content, then when you submit the edit, you attach the tag of the version you were editing. This is how it works in HTTP too. HTTP calls it an "etag".
I do not understand why some form of locking or etags were not in the original spec when Titan was developed for Wikis specifically. That's a humongous oversight, imo.
๐บ swee [OP] ยท 2025-02-17 at 04:48:
Hi guys, thanks for all your help.
I was able to implement Titan on Gem2Browser with ;edit support on a diff branch, I am going to work more on optimizing the editor before merging with main...
โ Ref: PR about Titan support
UPDATE: Now merged! :3
๐ skyjake [...] ยท 2025-02-18 at 16:10:
@clseibold: I do not understand why some form of locking or etags were not in the original spec when Titan was developed for Wikis specifically.
Probably for the same reason that Gemini lacks all kinds of useful features: keeping things simple, for a better bang-for-the-buck ratio.
I think clseibold explained the edit links well, I don't really have much to add.
Original Post
Does anyone have an idea on what Titan Edit is, and how do I implement it on my web client? A simple DDG search doesn't lead me to anywhere but confusion