site
site copied to clipboard
Edit on GitHub for content articles.
At the top of an article in the content app, we should show an "Edit on GitHub" button.
The button when clicked should lead to the GitHub page for that file - something like https://github.com/python-discord/site/blob/main/docs/configuration.md
The button should have a nice logo, maybe an edit pencil or a github icon.
Here's one such mock implementation:

Improvements on the mock design can be to reduce the visual weight of the button, or finding a way to make it smaller yet accessible.
Anyone who wants to implement this can propose alternative implementations, feel free to do so in #dev-contrib or #dev-dewikification.
We can also the put the share button on the article, like it is shown on the Microsoft docs you linked.
I would be willing to try and implement this as my first major contribution to the site 😁
Assigned!
Feel free to chat with us in #dev-contrib if you get stuck at any point, we'd be happy to help!
@doublevcodes has said on discord they let me take this one. Can I get assigned please? I've almost finished my implementation with a some improvements to the original and I'll open a PR after my exams are over.
I've added is_category to the context so that the button would only show up on articles (weird to say "edit on github" on categories). Not sure if there are already places in the existing context that can determine whether it's a category.
@hedyhli Sorry, didn't see your comment here. As we discussed in Discord as well a while back, you're welcome to take this PR.
Thanks!
I have taken the existing work on the PR and added finishing touches on top of it here: https://github.com/python-discord/site/pull/949