Wikilinks support for Discourse

Description

Discourse is a highly flexible forum tool that works great for multi user collaboration.

It includes backlinks — where linking to a post will show a backlink on that post — which is a common feature of #tools-for-thought (TFT).

To make it even better, we’d like to use a [[wikilinks]] double bracket syntax to link to new and existing pages.

User Impact

Who would want to use this and why?

Use a format and feature familiar from TFT systems to be able to use Discourse as an interlinked digital garden of notes.

TFT systems today have weak multi player systems, and also don’t have the concept of comments / discussions as separate from long form content. Using Discourse brings in multiplayer and commenting, @-mentions, and more.

Features

Support [[wikilinks]] syntax to link to existing pages, with a way to automatically search. Like the tag selection interface that pops up when you type a # in the editor:

Linking to a page that doesn’t exist yet should also be supported.

Skills Required

There is an initial write up on the bounties board. https://github.com/fission-suite/bounties/issues/7

There is a discussion on the Discourse community forum that seems to indicate that this could initially be done at the theme component layer:

So CSS/JavaScript to start, with familiarity with the Discourse theming system being helpful.

Discourse itself is written in Ruby on Rails and Ember.js, so deeper customizations would need those skills.

5 Likes

I’ve written up a bounty that pretty much says the same thing https://github.com/fission-suite/bounties/issues/7

2 Likes

Glad I randomly found this! I’d love to see it implemented.

1 Like

Glad I’ve checked my spam folder. Considering that I open notifications from here it is weird that it had ended up in the spam folder.

I’ll read up on this in the bounties. You may know that I am aming to go meta, and provide constellations that let people solve these class of problems

1 Like

What counts as a ‘page’ here?

The real power of wikilinks comes from supporting interwiki prefixes. Support [[es:w:]] and [[wd:]] and [[wookie:]] and you’re really going places.

1 Like

[[wikilinks]] as brought in from #tools-for-thought more than “traditional” wikis.

Discourse does a good job of using OEmbed / Onebox support for all sorts of content being pasted in as links.

The goal for us is to have a multi player tool for thought which is subtly different than OG wikis.

But Discourse is very flexible — inter wiki links sound cool!

1 Like

One thing to figure out is that Discourse has a 15 character minimum for titles. This sucks for short words to be used as wikilinks. Can this be overridden?

1 Like

I’m actually surprised to read this. In talking to @expede and @Quinn, they mentioned that the lack of backlinks in Discourse is one of the primary drivers keeping them in Roam. Are there examples of posts within this Discourse listing backlinks?

1 Like

Backlinks are supported in Discourse, but Wikilinks are not.

Also, the way backlinks are themed / integrated is not as useful.

See this event post (which is transcluded / embedded here):

(And which will now have a backlink to this post added!) Here’s a screenshot:

The two links with chain emoji are backlinks.

Looks like I haven’t posted about it publicly, but an upgraded display / theme of backlinks (probably in a sidebar) would help improve the experience. And of course, since wikilinks aren’t supported, no “inline” backlinks.

3 Likes

Indeed, we should use the correct terminology: we want wikilinks in particular :wink:

We have a Discourse plugin by @dvargas92495 installed and enabled. You can embed wikilinks using the double-bracket format like so: [[Making and Removing Wiki Pages]]. Unfortunately, the wikilinks don’t yet transform into URLs.

Autocomplete and search also work. Some UX improvements coming.

2 Likes

Very cool! Testing this and it works on mobile.

Here’s a screenshot of me trying it out with autocompleting the new [[Bikeshedding or Parkinson’s Law of Triviality]] entry on mobile.

Feels fluid, seems to work great!

It appears to do full text search, not just title.

Future Feature: have a preference toggle “include full post text search for autocomplete” or maybe “restrict autocomplete to titles only” if you want to do it the other way around.

(Seriously, this is a great post initial release feature to have in the backlog and see if other people “vote” for it)

Fun fact: that bikeshedding entry has a long title because Discourse requires 15 character title minimums. That will definitely impact how wikilinks appear.

1 Like

Latest updates now auto renders wikilinks in the post preview and content:

I think I should try to grab reply preview and content as well. Gonna talk to @jessmartin in a bit about a better place to log upcoming milestones and updates

3 Likes

I’ve migrated the remaining roadmap I have so far to the Github Issues page: Issues · dvargas92495/discourse-wikilinks · GitHub.

I will post ongoing updates as comments that close the issue

Yes, working in public in GH Issues / a GH Project for Roadmap and Suggestions is a good pattern.

We want to improve and template best practices @dvargas92495, this is great. We can also help setup some eg. issue templates for things like feature requests. I’d like to experiment with only supporters even being allowed to post feature requests. Things to experiment with.

2 Likes

Just published the first Release on GitHub: Release Wikilinks Appearing on Linked Posts! · dvargas92495/discourse-wikilinks · GitHub

All future updates will take this form. I also am starting to do daily logs within the issues themselves in case anyone’s curious on more incremental updates.

Note that this is technically a release for last week’s milestone, targeting another release for this Friday!

4 Likes

Awesome! @forgondolin can you pull an update for this please.