gis-ops / 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

Gitlab local API #29

Open Dimitri281 opened 3 years ago

Dimitri281 commented 3 years ago

Versions Wordpress: 5.7.2 Documents for Git: 1.1.1

Hello i have one specific case to show you,

we are in closed environement , we working only with local resource, i see in class-base-loader.php the line for initiate the github api :

private static $GITHUB_MARKDOWN_API = 'https://api.github.com/markdown';

do u think it's verry hard to change for use a gitlab api V4 locally (https://my_own_gitlab.lan/api/v4/markdown) ?

TIA.

Dimitri

nilsnolde commented 3 years ago

Ah nice, I missed that Gitlab introduced its own markdown API recently! So thanks @Dimitri281!

It's not very hard but quite a bit of shuffling code around. In that case I'd like to make the whole markdown endpoint user-configurable in the settings.json. What do you think about that?

Maybe there are even other renderers I don't know about and honestly, Github's API is a little painful with anchor references (always need to prefix with user-content- :roll_eyes: ).

That being said, I see 2 options:

  1. You give it a shot yourself and I can review the PR
  2. You contact us on enquiry[at]gis-ops.com and we can send you an offer to implement the functionality
nilsnolde commented 3 years ago

ah well, maybe gitlab's markdown api is not that recent, was merged 3 years ago :sweat_smile:

Dimitri281 commented 3 years ago

😅 It is true that our use case is slightly specific but in any case you have really done a great job, and thank you for your quick response, I think to tweak a little trick on a corner of the table to meet our need but if I will take care of it in the next few days. It is with pleasure that I will send it to you, if I do not have time to look into it I will ask my superiors if we can imagine making a commercial request on this subject. . i wish u a good day and looking forward to conversing again.