sbrl / Pepperminty-Wiki

A wiki in a box
https://peppermint.mooncarrot.space/
Mozilla Public License 2.0
178 stars 20 forks source link

[WikiMatrix] Inter-wiki links #154

Closed sbrl closed 5 years ago

sbrl commented 6 years ago

Reading through the feature list on Wiki Matrix whilst updating the release number on there revealed a pair of features that would be both (relatively) easy to implement and be rather useful!

This is one of them: What about inter-wiki links? It would be useful for a network of wikis about related topics (e.g. games by the same developer for example) to be able to link to each other's pages easily. Maybe we could use the Namespace: syntax in MediaWiki to mean specifying which wiki you want to link to?

We've got a few ways I can think of to approach this.

  1. Have a centralised tracking system to which every Pepperminty Wiki instance in existence reports to that can be queried
  2. Have other wikis specified in peppermint.json along with their aliases
  3. Have a setting for the URL of a csv file or something that contains definitions of a collection of wikis. Basically option #2 but in an external file

Personally, I'm not a fan of option #1 here - it's prone to spam for one! Other than that, I'm leaning towards #3 as it sounds easier to maintain for wiki administrators. We could even make a simple interface page that pulls the names & logos form the specified wikis and displays them alongside their urls and prefixes as a helpful tool for wiki admins to make sure that they've got the file written correctly.

sbrl commented 6 years ago

Displaying redlinks will be essential, but tricky I think. Maybe we can implement a page list cache or something? We'll have to take login-only wikis into account though.

SQL-enwiki commented 5 years ago

I'm not sure redlink detection for individual pages is really going to be possible, with IW links. There's a lot to consider there, as you mention login-only wikis, what if the wiki is temporarily down, etc.

On MW, the way it's handled is if the IW link is defined, it's blue. Otherwise - red.

e.g. https://en.wikipedia.org/wiki/User:SQL/IWsandbox

sbrl commented 5 years ago

Ah, I see @SQL-enwiki! Indeed. I think redlink detection for inter-wiki links is probably a separate issue that can be tackled at a later time.

sbrl commented 5 years ago

Yay! We've got interwiki link support online in the latest master, with documentation!

2c6bbb7e-1548-46a1-b3e4-5b24b425776a

Now just working on styling said links.

sbrl commented 5 years ago

Styling complete!

selection_104