Automatic package links

In the Julia Zulip server, we have something called “linkifiers” which basically just use a regex to detect specific patterns in text, and turn them into links automatically. The main thing we use this for is to turn strings like “DifferentialEquations.jl” into an automatic link pointing to the JuliaHub page for DifferentialEquations:, which should work for any package on the general registry. (previously, we did a Github search, but we switched to JuliaHub around a month ago and it’s been mostly good!)

I find this feature quite nice and convenient, and learned recently that it’s actually also available on recent versions of Discourse as an built-in feature: Watched Words Reference Guide - admins - Discourse Meta and also for as an extension: Linkify Words - theme-component - Discourse Meta

Is this something people would be interested in having on Discourse? I quite like it in Zulip, so maybe if there’s enough interest, the admins here on Discourse could enable it?

Here’s a little poll if people want to weigh in that way:

  • I’d like this feature as described
  • I don’t want this specific implementation, but want something similar
  • I don’t want this feature at all
  • I don’t care
0 voters

I think this is a great idea! As a hosted instance, we don’t have regexes enabled on our watched words, but the theme component seems to work.

I see the Zulip has the following regexes, which I think we could just replicate here:


people voting for “I don’t want this specific implementation, but want something similar”, it’d be helpful to comment on what that similar thing you want is. Sorry, I should have mentioned in the original post.

Thanks everyone for your input! Looks like we have a solid majority in favor, let’s try it out. Here’s what I’ve implemented (note that you may need to refresh to get the links):

This is a Julia issue: julia#265
These are Julia commits: julia@7327a8f, julia@72cd63ce28c50c8c72e009df03dfec608802450e
This is a package issue: JuliaStats/Distributions.jl#123
This is a registered package info page on JuliaHub: Distributions.jl
This is a GitHub package link: JuliaStats/Distributions.jl

If you see anything awry or have other suggestions, please make your voice known!

@Mason, just FYI, I added \bs to the beginning of these regexes, which isn’t how it’s configured on Zulip. It may help reduce some false positives, like someone writing path/to/src/SubModule/SubModule.jl without ``s.

I wonder if and/or how we could display these rules. Unlike Zulip, by default Discourse doesn’t display these to users (I don’t think). Anyhow, these are the rules as of right now (the component doesn’t support named groups):


Just saw this today on DifferentialEquations.jl, such a great feature, thanks for adding!