wpsharks / wp-kb-articles

KB Articles for WordPress; adds a new Custom Post Type.
http://wpkbarticles.com/
2 stars 1 forks source link

Feature Request: 'Edit on GitHub' link to access Markdown file from WordPress #82

Closed raamdev closed 9 years ago

raamdev commented 9 years ago

When using the GitHub Integration, KB Articles are only edited by changing the associated Markdown file. That means making edits to KB Articles requires finding the associated Markdown file on GitHub. Right now that process looks like this:

  1. Find KB Article in WordPress
  2. View or Preview KB Article in WordPress
  3. Click the "improve this article" link in the footer of the article to open the associated GitHub Issue
  4. Click the link to the Markdown file in the GitHub Issue
  5. Edit the Markdown file

I propose that we add a new YAML Key called markdown-file: that can contain a link to the Markdown file itself.

markdown-file: https://github.com/websharks/zencache-kb/blob/master/questions/33-define-wordpress-temp-directory.md

Then we can create convenient links to that Markdown file when the YAML Key is present:

2015-03-12_01-13-45 2015-03-12_01-11-23

jaswrks commented 9 years ago

Great idea. I believe we can generate the link which leads back to the file without needing a new YAML config. key. That would allow this to function for all existing articles, even if they do not contain the additional key; i.e., WPKBA already knows where the underlying file is located at GitHub.

Marking this as ready for work.

raamdev commented 9 years ago

we can generate the link which leads back to the file without needing a new YAML config. key.

Even better! That's awesome! I totally forgot that all that information was already available.

jaswrks commented 9 years ago

Adding this in the article footer on the front end, when the current user can edit the article. I'll leave this open so we can add it in the back end also.

2015-03-13_22-32-29

jaswrks commented 9 years ago

2015-03-13_22-50-39

2015-03-13_22-55-45

jaswrks commented 9 years ago

This is now shown in three places, as seen in the above screenshots.

raamdev commented 9 years ago

Beauuuutiful! Thank you!