May have found a way to keep relref functionality without the shortcode

Hi there,

I’ve been using the render-link hook Joe Mooring published in his very informative article on Veriphor for a short while now. I’ve made some minor modifications and may have come up with a way to get rid of the relref shortcode. It works very fine for me, but I’m not sure if it will in all circumstances.

The idea is to simply call the relref template function as a last resort inside the render-link hook to find a page, when .GetPage has failed.

You can find the template code snippet at the end of line 132 on GitHub.

I’ve also documented this approach in my documentation (beta).

Maybe this is a good idea and we can keep the relref functionality without the messy shortcode.

Have a nice day,
Georg

Thanks again, for your clever idea to use the render link for missing inline elements with an attribute. My implementation may not be optimal, but it works fine.

As I said, all the very useful checks for links and fragments at runtime in this hook haven’t been my idea. They are a little complicated but they help me to find erroneous links. If you want to learn more about them I would like to refer to the article from Joe Mooring again (Link in the first post).

To add the relref functionality was my idea and I know, that not everybody may need this because — like your special targets — it is not compatible with other Markdown renderers.