GetPage accepts a parameter that corresponds to the “physical” path of the .md file.
Assuming content filenames prefixed with dates, when
[frontmatter]
date = [':filename', ':default']
is set (which strips dates from filenames when building slugs), GetPage RelPermalink doesn’t work, because .RelPermalink is stripped of dates i.e. it does not correspond to the the .md’s “physical” path.
Using (path.Join .File.Dir .File.BaseFileName) instead of .RelPermalink does the trick, but this means that changing frontmatter settings implies code changes.
Is this expected behaviour?