site icon indicating copy to clipboard operation
site copied to clipboard

Edit on GitHub for content articles.

Open lemonsaurus opened this issue 4 years ago • 6 comments

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: image

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.

lemonsaurus avatar Mar 23 '21 09:03 lemonsaurus

We can also the put the share button on the article, like it is shown on the Microsoft docs you linked.

Shivansh-007 avatar Mar 26 '21 07:03 Shivansh-007

I would be willing to try and implement this as my first major contribution to the site 😁

doublevcodes avatar May 17 '21 20:05 doublevcodes

Assigned!

Feel free to chat with us in #dev-contrib if you get stuck at any point, we'd be happy to help!

jb3 avatar May 17 '21 20:05 jb3

Re: this comment

Can I take this if @doublevcodes is unable to finish it?

hedyhli avatar Oct 18 '21 13:10 hedyhli

@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 avatar Nov 01 '21 03:11 hedyhli

@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!

Xithrius avatar Nov 17 '21 22:11 Xithrius

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

jchristgit avatar Apr 21 '23 19:04 jchristgit