💾 Archived View for rawtext.club › ~sloum › geminilist › 005420.gmi captured on 2024-03-21 at 16:41:42. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

<-- back to the mailing list

[SPEC] Backwards-compatible metadata in Gemini

Oliver Simmons oliversimmo at gmail.com

Mon Feb 22 00:46:22 GMT 2021

- - - - - - - - - - - - - - - - - - - 

On Sun, 21 Feb 2021 at 20:21, easrng <easrng at gmail.com> wrote:

Many of us strongly believe in the one pageload generates one request philosophy, including me, but metadata is also nice to have. While you could put metadata in other files, that would result in multiple requests being made. Instead, I am proposing a new file format, text/gemini-metadata+json, to be used in data URIs in Gemtext. It would be json (simply because it is popular and has wide support) with specified keys. Possible things to include in the metadata could be a favicon (be it emoji or otherwise), a theme color or color scheme to be used by the client as it wishes, etc.
It would be used like this:
```
# My super cool gemsite
Welcome!
=
data:text/gemini-metadata+json;charset=utf-8,{"favicon":"%E2%80%8D"} Page metadata
```
A Gemini client implementing this would add a check for links starting with data:text/gemini-metadata+json to it's rendering code and when it encounters one, decode it and take note of the metadata. Clients not implenenting it will just see a link to the data, degrading (imo) quite gracefully. I can't decide if the link should be hidden or not in browsers with support though. If the link is hidden then the client should make sure to expose the metadata elsewhere in the interface.
Please give all the feedback!

Whilst it does fallback gracefully, I think the method of putting itin a link is a bit "hack-y" and using the data: URI may pave the wayfor other things abusing it.Also for people that don't have nice link parsing it would look a mess.

I think something like this would be nicer:```# Boop, a website :)Free hugs for all!

^^^favicon: 🤗author: Bob McBobfacelast-edited: 22nd Feb 2021```

That is:```<PAGE>^^^<METADATA>```

For the metadata format I think a simple key:value list would workfine, nothing overcomplicated.To someone without support for it it should just look like a humanlist of metadata.

This way it would work with gemtext's current line-by-line method, andparsing should be simple.The delimiter would work similar to the opening ``` toggle and therewould be no closing one, enforcing placing it at the end of the file.The delimiter needs to be 3 chars long (as per current spec), andsomething people wouldn't want to use in their document elsewhere, Ithink ^^^ would work good for this.

I think this is given, but the metadata would be entirely optional.

- Oliver Simmons (GoodClover)