For the "Fork & Edit" link, the path to the file in GitHub is constructed as follows: https://github.com/{{repo}}/edit/{{branch}}/{{path}}
This PR simplify how we set repo when a page is part of a collection. We now use the existing github.repository page attribute instead of using a redundant collection attribute (named repository). We attribute a default value to all pages in a collection folder.
For the "Fork & Edit" link, the path to the file in GitHub is constructed as follows:
https://github.com/{{repo}}/edit/{{branch}}/{{path}}
This PR simplify how we set
repo
when a page is part of a collection. We now use the existinggithub.repository
page attribute instead of using a redundant collection attribute (namedrepository
). We attribute a default value to all pages in a collection folder.We achieve the same result, without maintaining a special case in the theme when a page is part of a collection.
Note: This will fix the "Fork & Edit link" in https://www.w3.org/WAI/perspective-videos/. See preview