nilsnolde / wordpress-markdown-git

:loop: WordPress plugin to add file content (Markdown, Jupyter notebooks) from a Git based VCS to a WordPress post; replaces https://github.com/gis-ops/md-github-wordpress
GNU General Public License v3.0
48 stars 14 forks source link

BUG: Server Error 500 #11

Closed eblabs closed 4 years ago

eblabs commented 4 years ago

Versions Wordpress: 5.3.1 Documents for Git: 0.1

Describe the bug Getting an error message when viewing a page with the shortcode (see below). 500 - Server Error

The page can be accessed here: https://eblabs.com/test-post/ pw: github

Paste the shortcode and the censored contents of config.json [git-github-markdown url="https://raw.githubusercontent.com/eblabs/eblabs_community/master/docs/RetimeTools/README.md"]

{
  "limit": 5,
  "classes": "",
  "Github": {
    "user": "xxxxxx",
    "token": "xxxxxxxx"
  },
  "Bitbucket": {
    "user": "",
    "token": ""
  },
  "Gitlab": {
    "user": "",
    "token": ""
  }
}

Here is how I configured my token image

Expected behavior I was expecting the md to display in the post. https://github.com/eblabs/eblabs_community/blob/master/docs/RetimeTools/README.md

Screenshots

image

image

Additional context Please let me know if you need any more info., thanks!!

nilsnolde commented 4 years ago

I can reproduce locally with your post. Will dig in quickly.

nilsnolde commented 4 years ago

Ooopy, actually quite obvious:

Don't specify the raw URL, just the file URL: https://github.com/eblabs/eblabs_community/blob/master/docs/RetimeTools/README.md

The plugin does that for you:)

nilsnolde commented 4 years ago

Great issue reporting btw!! Thanks!

eblabs commented 4 years ago

Easy fix, thanks so much @nilsnolde !!