"Recently Edited" section, with GitHub links for Commit Diff and File History

For anyone that uses this in the future, note that the .Path does not work for 2 reasons:

  1. There is some warning in the terminal that you need to do this (I don’t really understand it, but it works now without the depreciation warning. This is the code given in the warning.):
  {{ $path := "" }}
  {{ with .File }}
        {{ $path = .Path }}
  {{ else }}
        {{ $path = .Path }}
  {{ end }}
  1. $Path renders the link as a computer file. I.e. with a backslash instead of forward slash. You therefore have to do the following:
  {{path.Clean $path }}