Relative links in github vs firefox extension

Posted by xverges on
URL: https://discuss.asciidoctor.org/Relative-links-in-github-vs-firefox-extension-tp3011.html

Hi, Asciidoctor experts.

This is my first time here.

Short version:

I have an asciidoc file in a git repo. If I create a link to a file in the project with

link:adapters/.jshintrc[]

it is rendered properly by github, but the Firefox extension creates a link without href

Longer context:

I'm looking for a way to include small code samples in my document

In my firefox extension, this works nicely

[source, json]
----
include::adapters/.jshintrc[]
----

but the problem is in github. I am aware that inclusion is supposed to be changed by  a link, but what I get is something that will puzzle people landing in the github page:

<div class="highlight highlight-json">
    <pre>
        link:adapters/.jshintrc[]
    </pre>
</div>

Given this reasonable restriction, what approach would you recommend for my use case?

Thanks for your time.
-Xavier