The meta plugin, when used to add a stylesheet to a page, adds the following attributes by default:

  • rel="alternate stylesheet"
  • title="mystylesheet"

The intent of this feature, according to the documentation is to "add a stylesheet to a page".

The current default behavior of the plugin implies having the additional stylesheet not activated (if you don't set rel="stylesheet") or only one of them activated (if you add two stylesheets and not set the same title for both). This was hard to understand for two of us while working on https://labs.riseup.net/code/issues/9314 and until we went and read those W3C documents.

I think that to match better the description of that feature, and to be easier to comprehend in its default setting, the meta plugin should by default:

  • Set rel="stylesheet".
  • Not set any title.

If we agree on this proposal, I'm willing to provide a patch.

This applies to all versions since c8b4ba3 and until today.

— sajolida, 2015


I've just come across this bug for the first time whilst checking to see if there'd been any discussion about IkiWiki supporting alternate stylesheets. I hadn't realised the meta plugin had any kind of support for this. Sorry for replying over a decade later…

If the intention indeed was to allow applying some additional style to a single page (or sub-set of a wiki), setting "alternate" is a strange way to go about it. As I understand it, if the user's browser provides a way of selecting an alternate stylesheet, upon selection it will de-activate the non-alternate sheet. (That's at least how it worked when I played about with alternate stylesheets in the late 90s). For this use-case, I'd agree that setting rel=stylesheet, such that you could use meta to provide additional styling, made much more sense.

There's another use-case for alternate stylesheets: providing a site-wide alternative theme. We could, for example, have the default theme for this site continue to be the "antitheme", but provide actiontabs as an alternate. That would not be possible with meta as-is, though, without also finishing allow site-wide meta definitions. To support that use-case, I think it would make more sense to implement alternative site-wide theme support in another plugin or elsewhere than meta, at least.

So in conclusion I agree with what you suggest, but I need to do a bit of checking to see what the impact of changing it over would be for existing users, and whether anyone is likely to be bitten by it. I suspect nobody is using this feature.

Jon, 2025-10-21