1

The following works :

[abc <br> def](test.md)

Because of this issue I need to use MediaWiki hyperlink syntax, however the following does not work.

[[abc <br> def | test]]

Is there a solution ?

enter image description here enter image description here

Florian
  • 2,796
  • 1
  • 15
  • 25
Baptistou
  • 1,749
  • 1
  • 13
  • 24

3 Answers3

1

Hierarchy:

- Home Page
- Test page

Home page:

## Title

[test<br />page](Test-page)

Test page:

## Test page

[Back to home page](Home)

Custom sidebar:

* [Hello<br />page](Home)
* [test<br />page](Test-page)

Everything works smoothly except for the preview but as a link points to a specific page name without the extension (.md) and relative paths (./ or ../), these links will always work, you don't even need to preview them.

Bandantonio
  • 816
  • 1
  • 7
  • 19
0

MediaWiki has inverted syntax for links, so this will work:

[[link to page | Link<br>text]]
Bandantonio
  • 816
  • 1
  • 7
  • 19
  • Could you please share your link syntax? I just tried to reproduce it in my [demo Wiki](https://github.com/bandantonio/travis-testing/wiki), everything works as expected. – Bandantonio May 06 '20 at 10:55
  • A little precision, I'm using Edit mode Markdown and not MediaWiki. – Baptistou May 06 '20 at 11:28
0

It seems like the only way to work around your specific case with Markdown Edit mode is to use syntax like this:

[abc <br> def](wiki/test.md)

Pay attention that the link doesn't work in preview mode. After saving the page the link will work correctly.

Bandantonio
  • 816
  • 1
  • 7
  • 19
  • But I can't use this syntax because of the mentioned issue – Baptistou May 06 '20 at 12:30
  • Make sure you added **wiki/** before the page name – Bandantonio May 06 '20 at 12:34
  • I quote : "This creates a relative url link, so if you happen to be in the same directory as the page you're trying to link to it works, otherwise, it does not. Specifically, if you'er on the Home page (http://.../project_name/wiki), this won't work, because all other pages are in the wiki directory, whereas the homepage isn't." – Baptistou May 06 '20 at 12:49
  • Well, another attempt. Please try this syntax: `[test
    page](Test-page)`. I created my custom sidebar and I have no issues navigating to any page
    – Bandantonio May 06 '20 at 12:49
  • Ok, without ```wiki/``` the link works in home page and test page, but the preview is still broken :/ – Baptistou May 06 '20 at 13:21
  • Well, Markdown is not almighty :) If your issue resolved, could you please mark the answer with this thread as accepted? – Bandantonio May 06 '20 at 13:35
  • This example was already cited in my question, it does not solve the issue with Github preview. – Baptistou May 06 '20 at 13:51