Menu

#200 Add the gemini:// URI scheme

None
pending-remind
nobody
None
5
2025-08-11
2022-12-20
No

Hello,

I am currently working on a tool to convert reStructuredText files to Gemtext and I noticed the gemini://... URIs (used by the Gemini Protocol) were not automatically converted into links.

I attached a small patch that adds the gemini scheme to the docutils.utils.urischemes.schemes dictionary.

1 Attachments

Discussion

  • Günter Milde

    Günter Milde - 2025-08-10
    • status: open --> pending-remind
     
  • Günter Milde

    Günter Milde - 2025-08-10

    Thank you for the contribution.
    Unfortunately, we cannot include the patch without a change in the Docutils specification,
    https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#standalone-hyperlinks,
    which limits the supported URI schemes to the ones listed in the Official IANA Registry of URI Schemes and the W3C's Retired Index of WWW Addressing Schemes.

    While I don't see a "gemini" URI scheme as a particular problematic case, adding non-registered schemes should be done with special care and consideration. Up to now, we (as Docutils developers) did not start to take this task onto ourselfs but relied on the abovementined sources.

    Mind, that the mapping in doctuils.utils.urischemes only considers the recognition of standalone hyperlinks. At places where an URI is expected (the link block of external hyperlink targets or the argument of an "image" or "figure" directive) any scheme is recognised, so the creation of valid "gemini" links is possible as, e.g.,

    A link_, `anonymous link`__, 
    `indirect link with embedded target <link_>`__, 
    `link with embedded URI <gemini://example.org/gemtext3>`__.
    
    The reference text of links with embedded target may also be omitted, in which case the URI will be duplicated for use as the reference text:
    so `<gemini://example.org/gemtext3>`__ gives the same result as a standalone hyperlink.
    
    gemini://example.org/other-gemtext
    .. _link: gemini://example.org/my-gemtext
    __ gemini://example.org/other-gemtext
    
     
  • Fabien LOISON

    Fabien LOISON - 2025-08-11

    Ok, thank you for the answer :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.