Skip to content

Commit

Permalink
allow using several Discourse instances
Browse files Browse the repository at this point in the history
You can add related links to several Discourse instances, not just
one, by specifying a dictionary for the `discourse_prefix`.
In most cases you'll still have one main Discourse though, so it
must be possible to specify both 'discourse' and `discourse_prefix`
without the `discourse_prefix` being automatically overwritten.

Signed-off-by: Ruth Fuchss <[email protected]>
  • Loading branch information
ru-fu committed Sep 19, 2023
1 parent 15e7843 commit f0d0330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
myst_enable_extensions.extend(custom_myst_extensions)

# Used for related links
if 'discourse' in html_context:
if not 'discourse_prefix' in html_context and 'discourse' in html_context:
html_context['discourse_prefix'] = html_context['discourse'] + '/t/'

# The default for notfound_urls_prefix usually works, but not for
Expand Down

0 comments on commit f0d0330

Please sign in to comment.