Improve oneboxing for anchored links

For example when the topic was constructible polygon I post a link to https://en.wikipedia.org/wiki/Constructible_polygon then the oneboxing looks nice and very useful.

In above case, the onebox has a lot of value.

However, if the topic was about about something more specific such as Compass and straightedge constructions which requires an anchored link, the adding a link to https://en.wikipedia.org/wiki/Constructible_polygon#Compass_and_straightedge_constructions is much less useful.

Could this be improved somehow?

Ideas:

  • When # is in the link, ask the user if a onebox should be generated while typing?
  • Drop the generic image from og:image meta tag?
  • Add an image form that specific (wiki) chapter contained in the # anchored link, if any?
  • Add the title of the (wiki) specific chapter instead of the title of the (wiki) page (og:title)?
2 Likes

I think we have special handling for the Wikipedia ones that do link to the anchors?

Though looking at it, the image does appear to be the same, but it picks up the chapter title and paragraph.

The following link doesn’t work as expected with oneboxing for example:

https://www.whonix.org/wiki/Onion_Services#cite_note-11

Interesting. I am surprised by that. So I didn’t choose my example wisely. :slight_smile:

It works for wikimedia (which is based on mediawiki) but doesn’t seem to work for other websites based on mediawiki or other websites with anchors?