GetPage vs frontmatter date filename

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?

site.GetPage .RelPermalink is a bad idea. If you have the page reference (the “.” in .RelPermalink), youy already have the page.

It corresponds to the “logical path”, see Path