w3c / wai-website

This repository hosts the WAI Website.
https://www.w3.org/WAI/
Other
46 stars 151 forks source link

Set default "github.repository" attribute for collection pages. #476

Closed remibetin closed 3 weeks ago

remibetin commented 1 month ago

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.

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

netlify[bot] commented 1 month ago

Deploy Preview for wai-website canceled.

Name Link
Latest commit 25b27a4ded23283e58ccb3bac83040f2a176b48b
Latest deploy log https://app.netlify.com/sites/wai-website/deploys/6655b239a3305a00089b6a1c