#microformats 2025-05-28

2025-05-28 UTC
[morganm], barnaby, Dryusdan, [qubyte], duanin2, [artlung], [Murray] and [KevinMarks] joined the channel
#
[tantek]
capjamesg, do you have opinions about rel="repository"? even minor bikeshed considerations like rel="repository" vs rel="repo"?
#
capjamesg
[tantek] I like rel=repository.
#
capjamesg
I prefer "repository" over "repo"
#
[tantek]
that's good enough for me
#
[tantek]
capjamesg, I think we should write up drafts for rel="code" and rel="repository"
#
capjamesg
I don't know how many times I have written "This project is open source". Having an explicit rel both feels valuable, and adds almost no effort on the publisher's side.
#
[tantek]
exactly that!
#
[tantek]
we can capture both such plain text content/link use-cases and the (popular a while ago?) little graphic diagonal banner in the corner of various pages that said "This project is on GitHub" or something similar
#
[tantek]
like screenshots thereof
#
capjamesg
I think that graphic was popular because some of the default GitHub Pages themes had it.
#
capjamesg
https://pages-themes.github.io/cayman/ has a "View on GitHub" button at the top.
#
capjamesg
[edit] https://pages-themes.github.io/cayman/ has a "View on GitHub" button at the top.
#
[tantek]
oh! that's even more of a good reason. imagine if we got rel=repository into those default themes!
#
capjamesg
Indeed!
#
capjamesg
I can write a draft of rel=repository.
#
capjamesg
One point of clarification. rel=repository on its own should be used to link to the root of a repository?
#
[tantek]
nope, if your link means "root" of a repository, then you must use both: rel="repository root"
#
[tantek]
(I copied from indieweb dev chat)
#
[tantek]
capjamesg, did you see my additional brainstorms I noted on the source-code-brainstorming page?
#
capjamesg
Yes, I did. I don't quite understand " just the (presumably revision control) repository file for the current page"
#
capjamesg
Can you give an example of what that file would be?
#
capjamesg
(and how it differs from a source-code file)
#
[tantek]
those are all the examples where a page on the web links directly to the file in github
#
[tantek]
instead of say, the *repo* in github or even the *folder* that the file is in
#
capjamesg
So you wouldn't use rel=repository on its own?
#
[tantek]
re: "differs from a source-code file" – examples of plain "view source code" (not on a repo): wikis that require login to edit instead show a "View source" link/button that when clicked shows you a textarea you can copy out of (but not edit). E.g. http://indieweb.org, http://microformats.org/wiki, http://wiki.mozilla.org
#
[tantek]
no you would, I gave the use-cases
#
[tantek]
quoting from https://microformats.org/wiki/source-code-brainstorming#Alternatives "rel=repository. … for just the (presumably revision control) repository file for the current page, without asserting a 'code' semantic"
#
capjamesg
Ah, I see now.
#
capjamesg
So you may use rel=repository on its own if a file is say markdown or txt but not code?
#
[tantek]
or image file etc. etc.
#
[tantek]
and in all those cases, since none of those files can have a hyperlink *inside*, the rel value must be conveyed by HTTP LINK header
#
[tantek]
where or not your markdown is "code" is in the eye of the markdown author 🙂
#
[tantek]
but yea, I expect any user visible/clickable in-page links with rel=repository to have at least one other value, e.g. at most one of "code", "directory", or "root"
#
[tantek]
if you are linking directly to the code file in the repo, then rel="repository code"
#
[tantek]
if you are linking to the folder that the code file is in in the repo, then rel="repository directory"
#
[tantek]
if you are linking to the top level of the repo that the code file is somewhere inside, then rel="repository root"
#
[tantek]
there are all different and mutually exclusive
#
[tantek]
hmm, maybe a PDF with a hyperlink to itself in a repo could have rel="repository"?
#
[tantek]
since PDFs do support hyperlinks I believe
#
[tantek]
capjamesg, this makes me think we need to start thinking about a rel value validator, perhaps an addition to http://indiewebify.me
#
[tantek]
because a lot of this can be automatically checked to see if the right rel values are being used or not
#
capjamesg
Indeed.
#
capjamesg
I implemented rel=edit in indieweb-utils in Python.
balintm and [aciccarello] joined the channel
#
[KevinMarks]
A validator is a nice idea
#
capjamesg
What would the validator do for this application?
[Jo] joined the channel
#
[tantek]
It could detect if wrong combinations of rel values were being used with specific GitHub links
#
[tantek]
e.g. if someone links to a Github *directory* with rel=code, that's wrong.
#
[tantek]
or a repo with rel=code
sivoais joined the channel