Franklin.jl relative links

I am migrating a site from Hugo to Franklin. Hugo has a special syntax for links, but in for Franklin.jl would one just use Markdown for both absolute or relative links? Eg as in

[some page within the site](/pages/blog/thatpage/)

gimme that [PDF](/assets/pdf/article.pdf)

heard about this programming language [Julia](


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 you can refer to it on page 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