Added Linkify words in post Theme

It’s a component that’s been added to the existing themes. I think if you refresh, it should be active if you’re using the Light or Dark theme (Eric was saying that it doesn’t apply to the Default theme, so that might not work).

Okay, let’s see if member/2 works. I am using the light theme.

EDIT: I did a refresh before posting this, so I guess it is not working. SWI-Prolog works fine.

Shows up as a link for me :+1:

There are what I call two types of themes, primary themes that a user selects and component themes that can be included in a primary theme.

What James is doing is to take the exiting component theme and enhance it. Then the component theme is manually included in selected primary themes. If the component theme is included in all the themes then everyone gets the ability of the component theme by default.

As I write this I see that James did add the enhanced component theme to both the Dark, Light and the Neutral primary themes but the earlier component theme needs to be removed.

Give me a few to work with James on this.

Do you mean the member/2 in my post shows up as a link for you? It doesn’t on mine.

1 Like

I see, I switched to the Neutral theme and it works. I’ll wait 'till you add it to the Light theme

I put a second pair of eyes on the change, the component theme (discourse-linkify-prolog-predicates) is included in Light, Dark and Neutral.

AFAIK the Default theme no longer exist as a primary theme that can be selected by users. When I did this the option to select Default disappeared.

EDIT

I just did a quick check and the component theme James added is working on multiple themes, retains the basic functionality of Linkify words in post now has the ablity to link to SWI-Prolog documentation when predicate indicators are used.

Nice job James. :+1:

1 Like

I switched back to the Light theme and it doesn’t work; but it worked on the Dark theme (and also the Neutral).

I see it, checking it out.

I removed the older component theme that is no longer needed and expected to see three primary themes each with three component themes, but the Light theme is only showing two, but in checking the settings it is showing three. :thinking:

Can you also check to see if the Neutral has the same problem? I think Neutral was not really working. Definitely the Dark theme is working though. Good work James.

1 Like

@EricGT, the Light is working now! Good job both of you. Thanks!

EDIT: I did have to refresh after changing the theme to light. But it is working great!

1 Like

Not yet, we lost the ability to link for words in the link table like SWISH and SWI-Prolog.

I am creating a test page for all the things that should work so I don’t have to keep hunting around for test cases.

1 Like

@jamesnvc

I created Post for testing installed component themes and had to include the component theme Linkify words in post to get all of the test to work. Does Auto linkify Prolog predicates extend Linkify words in post? If so then there may be a bug, it not then all works as expected.

General note for the admins.

In adding component themes to primary themes it seems that when a component theme is added to all themes the component theme is not being added to the selected default primary theme. I was able to get the component theme that was expected to be added to the primary theme to add to the primary theme by using the settings in the primary theme selected as default and adding the component theme there.

No, to simplify the implementation, the Prolog predicates component just does the Prolog words, it doesn’t attempt to do the general linking stuff, so it’ll need the other component for general-purpose linkifying.

1 Like

Many of the words from the sets in the links below should be included. Granted not all of these words should be added e.g. string.

SWI-Prolog Glossary
SWI-Prolog GitHub repository names


SWI-Prolog packages - just the most popular 10 or 20
Famous people who have contributed to Prolog like Alain Colmerauer and Robert Kowalski
Titles of classic Prolog books

Common acronyms like LPN
Related Logic Programming Languages like Ciao and Logtalk.

Moved from here.

The specific theme you are noting Added Linkify words in post Theme was created so that others could type in predicate indicators located in the SWI-Prolog documentation. While I agree it would be nice to have it also link to the libraries, packages and packs, that was never part of the design.

Ok, thanks. It make sense, of course I didn’t followed the thread with sufficient attention.

1 Like

If you want to try your hand at adding the ability to linkify the libraries, packs and packages Discourse has a Theme sandbox, see: Theme Creator, create and show themes without installing Discourse!.

Also the source code for the two component themes is public at GitHub

  1. https://github.com/discourse/discourse-linkify-words
  2. https://github.com/jamesnvc/discourse-linkify-prolog-predicates

As @jamesnvc modifed discourse-linkify-words to create discourse-linkify-prolog-predicates I am sure he can offer useful advise.

If you get it working and can be installed, I will gladly support you for the parts needing admin help, e.g. installing and some quick testing. However if it is installed and found to cause a problem I would uninstall it at the drop of a hat.

2 Likes

Add linkify words

  • #devel_commits
  • #wasm_demo
  • #wasm_wiki

Note these three words require the # before the word to be automatically recognized and converted to a link.