Franklin.jl relative links

Yes.

Two additional notes relative to anchors (which might not be of interest to you but the Hugo page mentions those as well so I’m just trying to be complete):

  1. you’ve probably already noted this but section headers are anchors so for instance if you have “## a section” in the markdown, it’s automatically made into an anchor with id a_section and you can point to it on the page with #a_section or from another page with /path/to/page/#a_section
  2. further to the previous point, there was a request to make it easy to point to anchors from other pages as well, you can use \reflink for this.

To clarify point (2), let’s say that you have a header ## Bayesian inference on page A.md you can refer to it on page B.md by doing [link to bayesian inference section](\reflink{Bayesian inference}) the \reflink thing will look for which page defines the relevant anchor and place the proper link there. So you could either use (/A/#bayesian_inference) or (\reflink{Bayesian inference})

Final note that you can place anchors anywhere on a page with \label{some anchor} and it will correspond to #some_anchor (or to \reflink{some anchor}).

Hope this kind of makes sense! I guess experimenting with a super simple sandbox site (newsite("TestWebsite", template="sandbox")) should help you get a feel for these things.

1 Like