Brightspace / render-docs-action

A GitHub Action to render docs for https://docs.d2l.dev
Apache License 2.0
1 stars 0 forks source link

Fix "edit" button when docsPath is not root #72

Closed cpacey closed 3 years ago

cpacey commented 3 years ago

Previously, the edit button was always relative to the input folder. When the input folder was not the repo root, this would result in the edit link going to the wrong place in GitHub. Sometimes this would 404 and sometimes this would open the wrong file for edit (e.g. README.md at docsRoot and repo root).

With this change, the code is aware of both the repo root and the path within the repo. We can then use this to create the correct edit link.