-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
I'm trying to add an edit link and icon (next to the print icon and the optional git icon on the top right of each page).
The goal is to have that link point to the source markdown file when possible. So far, I've gotten almost there but not quite using
href="{{git_repository_url}}/tree/master/src/{{path}}".
This seems to work for every page -- except for the front page! In this case, the template path variable resolves to index.md, but there isn't actually an index.md in the source folder so the link gets a 404.
(I looked into special casing this, checking for path == index.md and then fixing it, but unfortunately default handlebars doesn't accept equality checks in if statements.)
Any thoughts on how to embed more reliable source file links?